Skip to content
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

RFC: Add convert_to_generic_platform function to wheeltools module #2

Open
jcfr opened this issue May 27, 2019 · 7 comments
Open

RFC: Add convert_to_generic_platform function to wheeltools module #2

jcfr opened this issue May 27, 2019 · 7 comments

Comments

@jcfr
Copy link
Collaborator

jcfr commented May 27, 2019

When creating wheels packaging executable and tools that (1) are compiled and (2) do not have any dependency on the python ABI, it is convenient to update the wheel to capture that.

Doing so avoid to compile a set of wheels for each python release.

For example, these wheels

awesometool-1.2.3-cp27-cp27m-manylinux1_i686.whl 
awesometool-1.2.3-cp27-cp27mu-manylinux1_x86_64.whl 
awesometool-1.2.3-cp34-cp34m-macosx_10_6_x86_64.whl
awesometool-1.2.3-cp36-cp36m-win_amd64.whl

can be updated to:

awesometool-1.2.3-py2-none-manylinux1_i686.whl 
awesometool-1.2.3-py2-none-manylinux1_x86_64.whl 
awesometool-1.2.3-py3-none-macosx_10_6_x86_64.whl
awesometool-1.2.3-py3-none-win_amd64.whl

In the context of the cmake-python-distributions, we already wrote a CLI (that depends on wheeltools) to perform this transformation.

See convert_to_generic_platform_wheel.py

Since we would like to easily re-use the corresponding functionality in other projects (e.g ninja-python-distributions), it would be nice to contribute the functionality to this project.

@anthrotype What do you think ?

@jcfr
Copy link
Collaborator Author

jcfr commented Jun 6, 2019

Following discussion with @anthrotype, the project has been transferred to the scikit-build organization. See here for more details about this.

@anthrotype
Copy link
Member

Yes, I'd like that!
I use similar hacks in another project of mine where I embed a shared library (that in turn does not link with cpython) as package_data and wrap it with ctypes.
I won't be able to work on this feature though.

@jcfr
Copy link
Collaborator Author

jcfr commented Jun 10, 2019

Thanks for the feedback.

I should be able to move this forward in the next few weeks. In the mean time, does the name convert_to_generic_platform make sense ?

@anthrotype
Copy link
Member

to me, that sounds a bit ambiguous because the "platform" (e.g. manylinux1_x86_64 or win_amd64) is still very specific; what's generic is the (what I belive they call) abi tag in the middle which is set to none to signal that the wheel doesn't have any implementation-specific ABI requirements.

@jcfr
Copy link
Collaborator Author

jcfr commented Jun 10, 2019

Thanks for the feedback. Makes sense.

What about :

strip_abi_tags_from_wheel

or

strip_abi_tags

@anthrotype
Copy link
Member

yeah, both of the latter work better than convert_to_generic_platform.
Thanks

@anthrotype
Copy link
Member

came across this possibly related upstream wheel issue: pypa/wheel#175

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

No branches or pull requests

2 participants