On 11/30/20 7:08 PM, Mattia Verga wrote:
I've just received [1] this bug report about wrong generated
Provides for py3dist() and py3.9dist() for package python-pytest-filter-subpackage.
It seems that the %py_provides macro doesn't generate the correct Provides. I think I
have another case with python-graphql-server [2].
Do you think this is really a bug in the %py_provides macro? What package should I fill a
ticket against?
The %py_provides macro does not provide py3dist() and py3.9dist(). It only
provide "compatibility names", e.g. %py_provides python3-foo provides python-foo
and python3.9-foo.
The py3dist() and py3.9dist() provides are generated automatically from upstream
metadata.
The fact that the package provides python3dist(pytest-filter-subpackage) = 0 is
caused by the fact, that the upstream metadata says the version is 0.0.0.
Usually, the cause can be debugged from the build.log. E.g. in
python-pytest-filter-subpackage:
...
/usr/lib64/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution
option: 'use_scm_version'
warnings.warn(msg)
...
Copying pytest_filter_subpackage.egg-info to
/builddir/build/BUILDROOT/python-pytest-filter-subpackage-0.1.1-1.fc34.noarch/usr/lib/python3.9/site-packages/pytest_filter_subpackage-0.0.0-py3.9.egg-info
...
setuptools doesn't understand the use_scm_version option, has no version and
fallbacks to 0.0.0. The option is not recognized, because setuptools_scm is not
installed. Adding this should fix the problem:
BuildRequires: python3-setuptools_scm
Consider using
https://src.fedoraproject.org/rpms/pyproject-rpm-macros and
generating the buildrequires from pyproject.toml (setuptools_scm is listed there).
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok