diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 71824594..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,12 +0,0 @@ -include AUTHORS.rst -include CONTRIBUTING.rst -include HISTORY.md -include LICENSE -include README.md -include RELEASE.md - -recursive-include tests * -recursive-exclude * __pycache__ -recursive-exclude * *.py[co] - -recursive-include docs *.md *.rst conf.py Makefile make.bat *.jpg *.png *.gif diff --git a/Makefile b/Makefile index c37b7307..b6e790df 100644 --- a/Makefile +++ b/Makefile @@ -196,23 +196,23 @@ git-push-tags-stable: ## Push tags and stable to github .PHONY: bumpversion-release bumpversion-release: ## Bump the version to the next release - bumpversion release + bump-my-version bump release .PHONY: bumpversion-patch bumpversion-patch: ## Bump the version to the next patch - bumpversion --no-tag patch + bump-my-version bump patch --no-tag .PHONY: bumpversion-candidate bumpversion-candidate: ## Bump the version to the next candidate - bumpversion candidate --no-tag + bump-my-version bump candidate --no-tag .PHONY: bumpversion-minor bumpversion-minor: ## Bump the version the next minor skipping the release - bumpversion --no-tag minor + bump-my-version bump minor --no-tag .PHONY: bumpversion-major bumpversion-major: ## Bump the version the next major skipping the release - bumpversion --no-tag major + bump-my-version bump major --no-tag .PHONY: bumpversion-revert bumpversion-revert: ## Undo a previous bumpversion-release @@ -222,7 +222,7 @@ bumpversion-revert: ## Undo a previous bumpversion-release CLEAN_DIR := $(shell git status --short | grep -v ??) CURRENT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) -CURRENT_VERSION := $(shell grep "^current_version" setup.cfg | grep -o "dev[0-9]*") +CURRENT_VERSION := $(shell grep "^current_version" pyproject.toml | grep -o "dev[0-9]*") CHANGELOG_LINES := $(shell git diff HEAD..origin/stable HISTORY.md 2>&1 | wc -l) .PHONY: check-clean diff --git a/pyproject.toml b/pyproject.toml index 413576f9..c82d4656 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ 'Topic :: Scientific/Engineering :: Artificial Intelligence', ] keywords = [ 'copulas' ] -version = '0.10.1.dev0' +dynamic = ["version"] license = { text = 'BSL-1.1' } requires-python = '>=3.8,<3.12' readme = 'README.md' @@ -41,6 +41,9 @@ dependencies = [ requires = ['setuptools', 'wheel'] build-backend = 'setuptools.build_meta' +[tool.setuptools.dynamic] +version = {attr = 'copulas.__version__'} + [project.optional-dependencies] tutorials = [ 'markupsafe<=2.0.1', @@ -60,7 +63,7 @@ dev = [ # general 'pip>=9.0.1', - 'bumpversion>=0.5.3,<0.6', + 'bump-my-version>=0.18.3,<1', 'watchdog>=0.8.3,<0.11', # docs @@ -132,7 +135,55 @@ add-ignore = ['D107', 'D407', 'D417'] [tool.setuptools] include-package-data = true +license-files = ['LICENSE'] [tool.setuptools.packages.find] include = ['copulas', 'copulas.*'] namespaces = false + +[tool.setuptools.package-data] +'*' = [ + 'AUTHORS.rst', + 'CONTRIBUTING.rst', + 'HISTORY.md', + 'README.md', + 'RELEASE.md', + '*.md', + '*.rst', + 'conf.py', + 'Makefile', + 'make.bat', + '*.jpg', + '*.png', + '*.gif' +] +'tests' = ['*'] + +[tool.setuptools.exclude-package-data] +'*' = [ + '* __pycache__', + '*.py[co]', +] + +[tool.bumpversion] +current_version = "0.10.1.dev0" +commit = true +tag = true +parse = '(?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+)(?P\d+))?' +serialize = [ + '{major}.{minor}.{patch}.{release}{candidate}', + '{major}.{minor}.{patch}' +] + +[tool.bumpversion.parts.release] +optional_value = 'release' +values = [ + 'dev', + 'release' +] + +[[tool.bumpversion.files]] +filename = 'copulas/__init__.py' +search = "__version__ = '{current_version}'" +replace = "__version__ = '{new_version}'" + diff --git a/setup.cfg b/setup.cfg index 555d6304..92037528 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,32 +1,3 @@ -[bumpversion] -current_version = 0.10.1.dev0 -commit = True -tag = True -parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+)(?P\d+))? -serialize = - {major}.{minor}.{patch}.{release}{candidate} - {major}.{minor}.{patch} - -[bumpversion:part:release] -optional_value = release -first_value = dev -values = - dev - release - -[bumpversion:part:candidate] - -[bumpversion:file:pyproject.toml] -search = version='{current_version}' -replace = version='{new_version}' - -[bumpversion:file:copulas/__init__.py] -search = __version__ = '{current_version}' -replace = __version__ = '{new_version}' - -[bdist_wheel] -universal = 1 - [flake8] max-line-length = 99 exclude = docs, .git, __pycache__, .ipynb_checkpoints