On 20. 02. 21 12:06, Frank R Dana Jr. wrote:
I recently committed[1] an updated package spec for python-webscrapbook[2].
Its setup.py file contains the following lines:
extras_require={
"adhoc_ssl": ["cryptography"],
},
I therefore wanted to include 'adhoc_ssl' as a Python Extras subpackage, as
documented[3] in the Packaging Guidelines.
However, if I remove the '%if 0' wrapper around line 36 in my spec file:
%{?python_extras_subpkg:%python_extras_subpkg -n
python%{python3_pkgversion}-%{pypi_name} -i %{python3_sitelib}/*.egg-info
adhoc_ssl }
a `fedpkg --release f33 local` build fails with the following errors:
~~~~~~~~~~~~~~~~
Processing files: python3-webscrapbook+adhoc-0.33.3-1.fc33.noarch
Error: The package name contains an extras name `adhoc` that was not found in
the metadata.
Check if the extras were removed from the project. If so, consider removing the
subpackage and obsoleting it from another.
error: Dependency tokens must begin with alpha-numeric, '_' or '/': ***
PYTHON_EXTRAS_NOT_FOUND_ERROR___SEE_STDERR ***
Error: The package name contains an extras name `adhoc` that was not found in
the metadata.
Check if the extras were removed from the project. If so, consider removing the
subpackage and obsoleting it from another.
error: Dependency tokens must begin with alpha-numeric, '_' or '/': ***
PYTHON_EXTRAS_NOT_FOUND_ERROR___SEE_STDERR ***
Provides: python-webscrapbook+adhoc = 0.33.3-1.fc33 python3-webscrapbook+adhoc
= 0.33.3-1.fc33 python3.9-webscrapbook+adhoc = 0.33.3-1.fc33
~~~~~~~~~~~~~~~~
...As you can see, it's trying to package a nonexistent extra named
'python3-webscrapbook+adhoc', rather than the expected
'python3-webscrapbook_adhoc_ssl'.
Running `pip3 install --user 'webscrapbook[adhoc_ssl]`, executes fine (and
checks
that the cryptography package was installed, as required by the adhoc_ssl
extra),
so 'adhoc_ssl' does appear to be a valid Python package extra name.
I tried wrapping the extra name in double quotes, I tried backslash-escaping the
underscore... nothing seems to work.
* Am I doing something wrong?
* Do the RPM macros for extras not support names with underscores?
* Is there any way to convince them to take an extra name containing an
underscore?
[1]:
https://src.fedoraproject.org/rpms/python-webscrapbook/c/26f5e10fe03aa5b66419026608408c105e870069?branch=rawhide
[2]: https://src.fedoraproject.org/rpms/python-webscrapbook
[3]:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_python_extras
This is a bug! Thanks for the report.
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam on the list, report it:
https://pagure.io/fedora-infrastructure