Skip to content

6.1.1: problem with Version in src/pytest.egg-info/PKG-INFO anfter install #7891

@kloczek

Description

@kloczek

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions