Skip to content

cpython: add python3.dll to the install for wheels #27329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Marc-Pierre-Barbier
Copy link
Contributor

@Marc-Pierre-Barbier Marc-Pierre-Barbier commented Apr 30, 2025

Summary

Changes to recipe: cpython/* to improve compatiblity with wheels.

Motivation

I was struggling with the prebuilt cryptography pypi package that was failing with the following error:

>>> import paramiko
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ANSYSDev\SpeosOneConan\build\Release\venv\3.10.16\lib\site-packages\paramiko\__init__.py", line 22, in <module>
    from paramiko.transport import (
  File "C:\ANSYSDev\SpeosOneConan\build\Release\venv\3.10.16\lib\site-packages\paramiko\transport.py", line 33, in <module>
    from cryptography.hazmat.primitives.ciphers import algorithms, Cipher, modes
  File "C:\ANSYSDev\SpeosOneConan\build\Release\venv\3.10.16\lib\site-packages\cryptography\hazmat\primitives\ciphers\__init__.py", line 11, in <module>
    from cryptography.hazmat.primitives.ciphers.base import (
  File "C:\ANSYSDev\SpeosOneConan\build\Release\venv\3.10.16\lib\site-packages\cryptography\hazmat\primitives\ciphers\base.py", line 10, in <module>
    from cryptography.hazmat.bindings._rust import openssl as rust_openssl
ImportError: DLL load failed while importing _rust: The specified module could not be found.

After spending a while debugging I found out that the _rust.pyd file was trying to load python3.dll which is the stable interface required by some wheels.

Details

Added "--include-stable" to the arguments of layout/main.py to supply the file.

This include add the python3.dll right next to the python3xx.dll


@Marc-Pierre-Barbier Marc-Pierre-Barbier marked this pull request as ready for review April 30, 2025 16:07
@Marc-Pierre-Barbier
Copy link
Contributor Author

Marc-Pierre-Barbier commented May 5, 2025

the pr was tested on my machine and using our rocky8 pipelines. It does add properly the python3.dll which is then used by our wheel pulled from our pypi repository.

This pr should be ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant