Skip to content

Commit

Permalink
Finish migration to setuptools_scm
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kislyuk committed Apr 27, 2024
1 parent 762194a commit c70bb8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@

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",
Expand Down

0 comments on commit c70bb8e

Please sign in to comment.