diff options
author | Andrey Kislyuk <andrey.kislyuk@color.com> | 2024-04-27 08:37:34 -0700 |
---|---|---|
committer | Andrey Kislyuk <andrey.kislyuk@color.com> | 2024-04-27 08:37:36 -0700 |
commit | c70bb8ecd11a6345bb671153b4271539f2144a41 (patch) | |
tree | 17a670c8bd0b6ca8578466b42d4d7cc7f42da8c0 | |
parent | 762194a326b653bb6f4a35a4eeb54e1e683bb886 (diff) |
Finish migration to setuptools_scm
The initial migration never disabled the manual writing of version to
setup.py. setuptools_scm version 8 ceased support for overwriting the
version when it is already set. Disable manual writing and remove the
version restriction on setuptools_scm.
Fixes #190
-rw-r--r-- | common.mk | 1 | ||||
-rw-r--r-- | pyproject.toml | 3 | ||||
-rwxr-xr-x | setup.py | 9 |
3 files changed, 6 insertions, 7 deletions
@@ -21,7 +21,6 @@ release: @if ! type -P twine; then echo "Please install twine"; exit 1; fi git pull git clean -x --force $$(python setup.py --name) - sed -i -e "s/version=\([\'\"]\)[0-9]*\.[0-9]*\.[0-9]*/version=\1$${TAG:1}/" setup.py git add setup.py TAG_MSG=$$(mktemp); \ echo "# Changes for ${TAG} ($$(date +%Y-%m-%d))" > $$TAG_MSG; \ diff --git a/pyproject.toml b/pyproject.toml index 3317b5d..f76dfb4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,3 +21,6 @@ ignore_missing_imports = true [[tool.mypy.overrides]] module = "yq.version" ignore_missing_imports = true + +[tool.setuptools_scm] +version_file = "yq/version.py" @@ -4,18 +4,15 @@ from setuptools import find_packages, setup setup( name="yq", - version="3.4.2", url="https://github.com/kislyuk/yq", license="Apache Software License", author="Andrey Kislyuk", author_email="kislyuk@gmail.com", description="Command-line YAML/XML processor - jq wrapper for YAML/XML documents", long_description=open("README.rst").read(), - python_requires=">=3.6", - use_scm_version={ - "write_to": "yq/version.py", - }, - setup_requires=["setuptools_scm >= 7, <8"], + python_requires=">=3.8", + use_scm_version=True, + setup_requires=["setuptools_scm >= 7"], install_requires=[ "PyYAML >= 5.3.1", "xmltodict >= 0.11.0", |