Bug 1898164 - 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)
Summary: python-coverage_pth fails to build with Python 3.10: regex in setup.py doesn'...
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-coverage_pth
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Dan Radez
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: PYTHON3.10 1898087
TreeView+ depends on / blocked
Reported: 2020-11-16 15:09 UTC by Miro Hrončok
Modified: 2021-02-09 16:23 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-12-09 17:41:32 UTC
Type: Bug

Attachments (Terms of Use)

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:

For all our attempts to build python-coverage_pth with Python 3.10, see:

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:

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@hroncok.cz>
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@redhat.com>

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

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.

Note You need to log in before you can comment on or make changes to this bug.