Skip to content

Commit 36261df

Browse files
committed
Fixed incorrect package version in build; Increased pipdeptree version
Details: * For reasons not fully understood, the new setuptools-scm version 9.2.0 caused the 'python -m setuptools_scm' command to display a version with one character less in the commit ID (when the directory was not clean) than the 'build' package did. By using the 9.2.0 version as a minimum and by building without isolation (build --no-isolation), the issue could be fixed. * In order to verify the correct package version, the distribution archives are now listed in the make rule that builds them, so that any issues are surfaced immediately and not as a follow-up error somewhere else. The list commands issue some analysis commands if they fail. * Increased minimum version of pipdeptree to 2.24.0 (latest version still supporting Python 3.8), in order to solve the issue that the previously used version 2.2.0 did not find the version for package name 'ruamel-yaml' that is specified as a dependency of the 'safety' package, presumably because it did not properly match that dependent package name with the installed package name of 'ruamel.yaml'. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
1 parent e0f4af0 commit 36261df

File tree

7 files changed

+20
-9
lines changed

7 files changed

+20
-9
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,16 +504,18 @@ AUTHORS.md: _always
504504
echo '```' >>AUTHORS.md.tmp
505505
git shortlog --summary --email | cut -f 2 | sort >>AUTHORS.md.tmp
506506
echo '```' >>AUTHORS.md.tmp
507-
sh -c "if ! diff -q AUTHORS.md.tmp AUTHORS.md; then mv AUTHORS.md.tmp AUTHORS.md; else rm AUTHORS.md.tmp; fi"
507+
bash -c "if ! diff -q AUTHORS.md.tmp AUTHORS.md; then mv AUTHORS.md.tmp AUTHORS.md; else rm AUTHORS.md.tmp; fi"
508508

509509
$(sdist_file): pyproject.toml $(dist_dependent_files)
510510
@echo "Makefile: Building the source distribution archive: $(sdist_file)"
511-
$(PYTHON_CMD) -m build --sdist --outdir $(dist_dir) .
511+
$(PYTHON_CMD) -m build --no-isolation --sdist --outdir $(dist_dir) .
512+
bash -c "ls -l $(sdist_file) || ls -l $(dist_dir) && echo package_level=$(package_level) && $(PYTHON_CMD) -m setuptools_scm"
512513
@echo "Makefile: Done building the source distribution archive: $(sdist_file)"
513514

514515
$(bdist_file) $(version_file): pyproject.toml $(dist_dependent_files)
515516
@echo "Makefile: Building the wheel distribution archive: $(bdist_file)"
516-
$(PYTHON_CMD) -m build --wheel --outdir $(dist_dir) -C--universal .
517+
$(PYTHON_CMD) -m build --no-isolation --wheel --outdir $(dist_dir) -C--universal .
518+
bash -c "ls -l $(bdist_file) $(version_file) || ls -l $(dist_dir) && echo package_level=$(package_level) && $(PYTHON_CMD) -m setuptools_scm"
517519
@echo "Makefile: Done building the wheel distribution archive: $(bdist_file)"
518520

519521
$(done_dir)/flake8_$(pymn)_$(PACKAGE_LEVEL).done: $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done Makefile $(flake8_rc_file) $(check_py_files)

base-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77

88
pip>=25.0
99
setuptools>=70.0.0
10-
setuptools-scm[toml]>=8.1.0
10+
setuptools-scm[toml]>=9.2.0
1111
wheel>=0.41.3

dev-requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,16 @@ importlib-metadata>=4.8.3
104104
mypy>=1.2.0
105105

106106
# Package dependency management tools
107-
pipdeptree>=2.2.0
107+
pipdeptree>=2.24.0
108108
# pip-check-reqs 2.3.2 is needed to have proper support for pip>=21.3 and below.
109109
# pip-check-reqs 2.4.3 fixes a speed issue on Python 3.11.
110110
# pip-check-reqs 2.5.0 has issue https://github.com/r1chardj0n3s/pip-check-reqs/issues/143
111111
pip-check-reqs>=2.4.3,!=2.5.0; python_version == '3.8'
112112
pip-check-reqs>=2.5.1; python_version >= '3.9'
113113

114+
# packaging (used by pytest, safety)
115+
packaging>=24.1
116+
114117
# pytz (used by TBD)
115118
pytz>=2019.1
116119

docs/changes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ Released: not yet
1818

1919
* Addressed safety issues up to 2025-06-29.
2020

21+
* Dev: Fixed issue where the package version used for distribution archive file
22+
names were generated inconsistently between setuptools_scm (used in Makefile)
23+
and the 'build' module, by using no build isolation ('--no-isolation' option
24+
of the 'build' module) and increasing the minimum version of 'setuptools-scm'
25+
to 9.2.0, which fixes a number of version related issues.
26+
2127
**Enhancements:**
2228

2329
**Cleanup:**

minimum-constraints-develop.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ importlib-metadata==4.8.3
9494
mypy==1.2.0
9595

9696
# Package dependency management tools
97-
pipdeptree==2.2.0
97+
pipdeptree==2.24.0
9898
pip-check-reqs==2.4.3; python_version <= '3.8'
9999
pip-check-reqs==2.5.1; python_version >= '3.9'
100100

101101
# packaging (used by pytest, safety)
102-
packaging==22.0
102+
packaging==24.1
103103

104104
# pluggy (used by pytest, tox)
105105
pluggy==0.13.1

minimum-constraints-install.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
pip==25.0
1111
setuptools==70.0.0
1212
# Note on not specifying 'setuptools-scm[toml]': Extras cannot be in constraints files
13-
setuptools-scm==8.1.0
13+
setuptools-scm==9.2.0
1414
wheel==0.41.3
1515

1616

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ requires = [
88
# Keep in sync with base-requirements.txt and the base dependencies in
99
# minimum-constraints-install.txt
1010
"setuptools>=70.0.0",
11-
"setuptools-scm[toml]>=8.1.0",
11+
"setuptools-scm[toml]>=9.2.0",
1212
"wheel>=0.41.3"
1313
]
1414
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)