pytest: 6.1.1: problem with Version in src/pytest.egg-info/PKG-INFO anfter install
I just found that my rpm package with pytest has some issiu. It reports wrong version because in installed pytest-*.egg-info/PKG-INFO is reported wrong version.
Dist src/pytest.egg-info/PKG-INFO is OK:
[tkloczko@barrel pytest-6.1.1]$ grep Version src/pytest.egg-info/PKG-INFO
Metadata-Version: 2.1
Version: 6.1.1
After /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s' still everything is the same version in that file however
+ /usr/bin/python3 setup.py install -O1 --skip-build --root /home/tkloczko/rpmbuild/BUILDROOT/python-pytest-6.1.1-2.fc34.x86_64
writing src/pytest.egg-info/PKG-INFO <<#### HERE
and than after setup.py install suddenly:
[tkloczko@barrel pytest-6.1.1]$ grep Version src/pytest.egg-info/PKG-INFO
Metadata-Version: 2.1
Version: 0.0.0
That version is used by rpm dependencies generator which is causing that rpm package has in provides
python3.8dist(pytest) = 0
python3dist(pytest) = 0
By this my rpm package is broken because for example my other package with python pytest-forked require pytest >= 3.1.
Lookinng on dist tar ball 6.1.1 setup.cfg and setup.py I dont see anywhere defined version
[tkloczko@barrel pytest-6.1.1]$ grep -i version setup.cfg setup.py
setup.cfg: importlib-metadata>=0.12;python_version<"3.8"
setup.cfg: pathlib2>=2.2.0;python_version<"3.6"
setup.cfg: src/_pytest/_version.py
so probably by this (re)generated version in PKG-INFO is 0.0.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (9 by maintainers)
And updating setuptools-scm requires tomli which requires flit which requires flit-core which requires itself. Hmm. I’ll pass.
… and it can be fixed either by https://github.com/pytest-dev/pytest/issues/7891#issuecomment-707446905 or not forgetting to install toml 🤦
FWIW I’d like to discuss dropping
setuptools_scm- no personal offense intended, but I still think it’s causing far more problems than it solves… I’d much rather just have a version number insetup.cfg- we have automated releases, so it really doesn’t hurt to update a version number before creating a git tag, no?