Skip to content

Commit

Permalink
build: update pyproject.toml to use setuptools_scm for versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
MArpogaus committed Sep 13, 2024
1 parent 5c7fb40 commit 070432d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 59 deletions.
52 changes: 31 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools >= 61.0.0"]
requires = ["setuptools >= 61", "setuptools_scm>=7"]

[project]
classifiers = [
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"OSI Approved :: GNU General Public License v3 (GPLv3)"
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
]
dependencies = [
"dvc >= 2.12",
Expand All @@ -23,32 +24,41 @@ requires-python = ">=3.7"

[project.optional-dependencies]
develop = [
'autoflake',
'black',
'isort',
'commitizen',
'ipykernel',
'pre-commit',
'pytest',
'python-lsp-black',
'pylsp-rope',
'python-lsp-ruff',
'python-lsp-server[all]',
'ipykernel',
'tox'
'ruff'
]

[project.scripts]
dvc-stage = "dvc_stage.cli:cli"

[tool.autoflake]
expand-star-imports = true
ignore-init-module-imports = true
remove-all-unused-imports = true
remove-unused-variables = true
[project.urls]
Changelog = "https://github.com/MArpogaus/dvc-stage/blob/dev/CHANGELOG.md"
Documentation = "https://marpogaus.github.io/dvc-stage"
Issues = "https://github.com/MArpogaus/dvc-stage/issues"
Repository = "https://github.com/MArpogaus/dvc-stage"

[tool.commitizen]
major_version_zero = true
name = "cz_conventional_commits"
tag_format = "v$version"
update_changelog_on_bump = true
version_provider = "scm"
version_scheme = "pep440"

[tool.black]
# line-length = 88
target-version = ['py38']
[tool.ruff]
indent-width = 4
line-length = 88
target-version = "py37"

[tool.isort]
profile = "black"
[tool.ruff.lint]
select = ["I", "E", "F"]

[tool.setuptools.dynamic]
version = {attr = "dvc_stage.__version__"}
[tool.setuptools_scm]
# https://stackoverflow.com/a/74404703
# omits local version, useful because pypi does not support it
local_scheme = "no-local-version"
36 changes: 0 additions & 36 deletions setup.py

This file was deleted.

3 changes: 1 addition & 2 deletions src/dvc_stage/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
"""dvc-stage module."""
__version__ = "1.0.0-dev"
""".. include:: ../../README.md"""

0 comments on commit 070432d

Please sign in to comment.