Bug 2336950

Summary: python-setuptools-rust fails to build with Python 3.14: /builddir/build/BUILD/python-setuptools-rust-1.10.2-build/setuptools_rust-1.10.2/examples/hello-world/venv/bin/python: No module named pytest
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-setuptools-rustAssignee: Christian Heimes <cheimes>
Status: CLOSED NOTABUG QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cheimes, frenaud, ftrivino, ksurma, mhroncok, python-packagers-sig
Target Milestone: ---   
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: 2025-03-06 18:58:38 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: 2322407    

Description Karolina Surma 2025-01-10 15:50:55 UTC
python-setuptools-rust fails to build with Python 3.14.0a3.

+ ./venv/bin/pip install dist/hello_world-1.0-cp314-cp314-linux_x86_64.whl
Processing ./dist/hello_world-1.0-cp314-cp314-linux_x86_64.whl
Installing collected packages: hello-world
Successfully installed hello-world-1.0
+ ./venv/bin/python -Pm pytest tests/
/builddir/build/BUILD/python-setuptools-rust-1.10.2-build/setuptools_rust-1.10.2/examples/hello-world/venv/bin/python: No module named pytest

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08480299-python-setuptools-rust/

For all our attempts to build python-setuptools-rust with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-setuptools-rust/

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.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
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 Miro HronĨok 2025-01-10 17:05:54 UTC
Something's bad with venv --system-site-packages:

$ mock -r fedora-rawhide-python314 init
$ mock -r fedora-rawhide-python314 install python3-pytest
...
Installing:
 python3-pytest    noarch 8.3.4-2.fc42       python314    4.0 MiB
...
$ mock -r fedora-rawhide-python314 shell --unpriv
...
<mock-chroot> sh-5.2$ python3 -m pytest --version
pytest 8.3.4

<mock-chroot> sh-5.2$ /usr/bin/python3 -m venv venv --system-site-packages
<mock-chroot> sh-5.2$ ./venv/bin/python -m pytest --version
/builddir/venv/bin/python: No module named pytest

<mock-chroot> sh-5.2$ cat ./venv/pyvenv.cfg 
home = /usr/bin
include-system-site-packages = true
version = 3.14.0
executable = /usr/bin/python3.14
command = /usr/bin/python3 -m venv --system-site-packages /builddir/venv

<mock-chroot> sh-5.2$ ./venv/bin/pip list
Package Version
------- -------
pip     24.3.1




While:

$ mock -r fedora-rawhide-x86_64 init
$ mock -r fedora-rawhide-x86_64 install python3-pytest
...
Installing:                                                        
 python3-pytest          noarch 8.3.4-1.fc42   fedora      20.8 MiB
...
$ mock -r fedora-rawhide-x86_64 shell --unpriv
...
<mock-chroot> sh-5.2$ python3 -m pytest --version
pytest 8.3.4
<mock-chroot> sh-5.2$ /usr/bin/python3 -m venv venv --system-site-packages
<mock-chroot> sh-5.2$ ./venv/bin/python -m pytest --version
pytest 8.3.4

<mock-chroot> sh-5.2$ cat ./venv/pyvenv.cfg 
home = /usr/bin
include-system-site-packages = true
version = 3.13.1
executable = /usr/bin/python3.13
command = /usr/bin/python3 -m venv --system-site-packages /builddir/venv

<mock-chroot> sh-5.2$ ./venv/bin/pip list
Package   Version
--------- -------
iniconfig 1.1.1
packaging 24.2
pip       24.3.1
pluggy    1.5.0
pytest    8.3.4

Comment 2 Karolina Surma 2025-01-13 11:48:09 UTC
Reported in CPython bug tracker: https://github.com/python/cpython/issues/128779

Comment 3 Aoife Moloney 2025-02-26 13:22:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 4 Florence Blanc-Renaud 2025-03-06 17:48:53 UTC
@ksurma

The ticket https://github.com/python/cpython/issues/128779 has been closed as fixed and I can see that this build was successful: https://copr.fedorainfracloud.org/coprs/g/python/python3.14/build/8646647/

Can we close this ticket?