-
Notifications
You must be signed in to change notification settings - Fork 37
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
Support mounting wheels that use extensions without an EXTENSIONS
file
#222
Comments
@vsajip it looks like you were the original author any thoughts on an approach to solving this? |
stewartmiles@28a8c39 is a sketch of a solution, of course it needs a test. Using my manual test |
I've been away for a few weeks, so I've only just come across this. Will look into it soon. Thanks! |
@vsajip thanks for your reply. I've been working on a branch https://github.com/stewartmiles/distlib/tree/wheel_mount_extensions that adds source and build script for the test wheel |
This recreates the source to the `tests/minimext*.whl` wheels with a couple of differences: * The C extension is placed in the minimext package rather than being a top level package. * A Python implementation of the C extension is provided to make it easier for pure Python programmers to understand / modify. This also adds a script that will install Python interpreters and build the minimext wheel for different Python versions. Related to pypa#222
Updates `distlib.Wheel.mount()` to support mounting wheels with extension modules that are not indexed in the `*.dist-info/EXTENSIONS` directory within a wheel. Fixes pypa#222
This recreates the source to the `tests/minimext*.whl` wheels with a couple of differences: * The C extension is placed in the minimext package rather than being a top level package. * A Python implementation of the C extension is provided to make it easier for pure Python programmers to understand / modify. This also adds a script that will install Python interpreters and build the minimext wheel for different Python versions. Related to pypa#222
This recreates the source to the `tests/minimext*.whl` wheels with a couple of differences: * The C extension is placed in the minimext package rather than being a top level package. * A Python implementation of the C extension is provided to make it easier for pure Python programmers to understand / modify. This also adds a script that will install Python interpreters and build the minimext wheel for different Python versions. Related to pypa#222
This recreates the source to the `tests/minimext*.whl` wheels with a couple of differences: * The C extension is placed in the minimext package rather than being a top level package. * A Python implementation of the C extension is provided to make it easier for pure Python programmers to understand / modify. This also adds a script that will install Python interpreters and build the minimext wheel for different Python versions. Related to pypa#222
This recreates the source to the `tests/minimext*.whl` wheels with a couple of differences: * The C extension is placed in the minimext package rather than being a top level package. * A Python implementation of the C extension is provided to make it easier for pure Python programmers to understand / modify. This also adds a script that will install Python interpreters and build the minimext wheel for different Python versions. Related to pypa#222
This recreates the source to the `tests/minimext*.whl` wheels with a couple of differences: * The C extension is placed in the minimext package rather than being a top level package. * A Python implementation of the C extension is provided to make it easier for pure Python programmers to understand / modify. This also adds a script `build_wheels.sh` that will install Python interpreters and build the minimext wheel for different Python versions with and without adding the `EXTENSIONS` metadata file. Related to pypa#222
This recreates the source to the `tests/minimext*.whl` wheels with a couple of differences: * The C extension is placed in the minimext package rather than being a top level package. * A Python implementation of the C extension is provided to make it easier for pure Python programmers to understand / modify. This also adds a script `build_wheels.sh` that will install Python interpreters and build the minimext wheel for different Python versions with and without adding the `EXTENSIONS` metadata file. Related to pypa#222
Updates `distlib.Wheel.mount()` to support mounting wheels with extension modules that are not indexed in the `*.dist-info/EXTENSIONS` directory within a wheel. Fixes pypa#222
This recreates the source to the `tests/minimext*.whl` wheels with a couple of differences: * The C extension is placed in the minimext package rather than being a top level package. * A Python implementation of the C extension is provided to make it easier for pure Python programmers to understand / modify. This also adds a script `build_wheels.sh` that will install Python interpreters and build the minimext wheel for different Python versions with and without adding the `EXTENSIONS` metadata file. Related to pypa#222
Updates `distlib.Wheel.mount()` to support mounting wheels with extension modules that are not indexed in the `*.dist-info/EXTENSIONS` directory within a wheel. Fixes pypa#222
@vsajip I've sent a few pull requests related to this and opened a few other issues associated with the patch series. If you want to see all patches applied and everything working end-to-end you can pull https://github.com/stewartmiles/distlib/tree/wheel_mount_extensions . The only patch I haven't added to a pull request yet is the final one in the series 0ad2e29 . Any idea when you'll be able to take a look? I would prefer to not have to maintain a fork. |
I hope to be able to look at this early next week. Thanks for looking into this! |
This recreates the source to the `tests/minimext*.whl` wheels with a couple of differences: * The C extension is placed in the minimext package rather than being a top level package. * A Python implementation of the C extension is provided to make it easier for pure Python programmers to understand / modify. This also adds a script `build_wheels.sh` that will install Python interpreters and build the minimext wheel for different Python versions with and without adding the `EXTENSIONS` metadata file. Related to #222
Is your feature request related to a problem? Please describe.
To test out
distlib.Wheel.mount()
I tried downloading and mounting thewrapt
wheel for Python 3.8 on Linux. Unfortunately,Wheel.mount()
fails to extract the extension module from the wheel and load it.Describe the solution you'd like
I would like to be able to mount wheels with extension modules.
Describe alternatives you've considered
I'm considering building a fork of
distlib.Wheel.mount()
that searches the wheel for all possible extension modules (.so
,.dylib
,.dll
), unpacks them and loads them when imported.Additional context
I downloaded the
wrapt
wheel as it's simple and contains a single extension module:I attempted to mount it using the script:
However this fails with:
The problem is due to
Wheel._get_extensions()
which requires anEXTENSIONS
file in thedist-info
directory.distlib/distlib/wheel.py
Line 746 in 888c48b
However,
wrapt
for Python 3.8 on Linux only contains:Interestingly according to the - AFAIK - official wheel spec the required
EXTENSIONS
file is not part of the spec (see here) so it seems a bit unfair to expect wheels using extensions to publish it.The text was updated successfully, but these errors were encountered: