Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1898164

Summary: python-coverage_pth fails to build with Python 3.10: regex in setup.py doesn't work with two-digit minor versions (such as 3.10)
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-coverage_pthAssignee: Dan Radez <dradez>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dradez, gordon.messmer, mhroncok, python-sig, thrnciar
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-30 12:41:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1890881, 1898087    

Description Miro Hrončok 2020-11-16 15:09:32 UTC
python-coverage_pth fails to build with Python 3.10.0a2.

+ /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -s'
I'm having trouble finding your site-packages directory.  Is it where you expect?
sysconfig.get_python_lib() returns '/usr/lib/python3.10/site-packages'
Exception was: 'NoneType' object has no attribute 'group'
error: Bad exit status from /var/tmp/rpm-tmp.09ORUv (%build)
    Bad exit status from /var/tmp/rpm-tmp.09ORUv (%build)

There is a regex:

... python\d(\.\d)* ...


This fails with python3.10.

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01767870-python-coverage_pth/

For all our attempts to build python-coverage_pth with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-coverage_pth/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Dan Radez 2020-12-09 17:41:32 UTC
Closing this, looks like it was fixed in:
commit c70eca7563d5fb1bcf30bcdeec1478dd78bfe4bb
Author: Miro Hrončok <miro>
Date:   Mon Jul 13 21:04:30 2020 +0200

    Replace Python version glob with macro (needed for Python 3.10+)
    
    See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/PQIGCQCRNBYNXBX2ICWEM3PLDLNOG2ZT/
    
    Co-authored-by: Tomas Hrnciar <thrnciar>

diff --git a/python-coverage_pth.spec b/python-coverage_pth.spec
index 79f3cdf..30c87dd 100644
--- a/python-coverage_pth.spec
+++ b/python-coverage_pth.spec
@@ -44,7 +44,7 @@ cp %{SOURCE1} .
 %files -n python3-%{pypi_name}
 %license LICENSE.txt
 %doc README.rst
-%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
 %{python3_sitelib}/%{pypi_name}.pth
 
 %changelog

Comment 2 Miro Hrončok 2020-12-09 19:11:32 UTC
It wasn't. My commit is spec file only. The bug is in setup.py.

Comment 3 Dan Radez 2020-12-09 20:24:03 UTC
Ah, thx for the correction, I'll get a patch in upstream.

Comment 4 Ben Cotton 2021-02-09 15:25:12 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 5 Gordon Messmer 2021-03-24 05:03:40 UTC
I've sent a PR:

https://github.com/dougn/coverage_pth/pull/6

Comment 6 Gordon Messmer 2021-03-24 05:13:57 UTC
Until upstream accepts that PR, I have a PR for the Fedora package as well:

https://src.fedoraproject.org/rpms/python-coverage_pth/pull-request/1

Comment 7 Tomáš Hrnčiar 2021-03-24 07:10:45 UTC
Thank you, package builds well with Python 3.10.

https://copr.fedorainfracloud.org/coprs/g/python/python3.10/build/2093546/

Comment 8 Dan Radez 2021-04-30 12:41:40 UTC
I think this just resolved it self upstream. Closing out.