-
Notifications
You must be signed in to change notification settings - Fork 44
Add Support for pip
's --platform
, --no-binary
, & --only-binary
options
#33
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
base: main
Are you sure you want to change the base?
Conversation
Can all that complexity not just go into the requirements file? Have you found out what versions of pip support all of these options? |
From the research I've done, any conditionals that are applied in the requirements file are applied to the system that is current running pip. Where I'm trying to build a relocatable Python Framework that is system agnostic (at least, for macOS). Example:
This creates an issue if trying to deploy at single relocatable framework Obviously a work around would be to simply create two different relocatable frameworks; one Intel based and one ARM based, but if Universal wheel binaries exist, this does allow for a single "universal" relocatable framework. |
Regarding what versions of From the
|
I feel like I'm missing something here, since the Munki pkg build script uses make_relocatable_python_framework.py to build a Universal framework, and pretty sure Autopkg does as well. |
The requirements file the Munki pkg build script uses is here: https://github.com/munki/munki/blob/main/code/tools/py3_requirements.txt and uses You can see how |
Ah, ok... So a couple things:
I think that clears some things up. I guess it just depends on which approach you wanted to take? |
Well, I dunno. I've tried the Example:
Even though cryptography built wheel is labeled
But if I do:
I get the desired results:
I've tried different combinations of things, including a different version of |
This feature allows the user to specify additional
pip
options to filter against when installing libraries.Particularly, I ran into an issue where I was wanting to build a "Universal" relocatable Python.Framework, but
pip
will natively install the a matching architecture wheel if available, even if a universal build is available.With the support for these three options, I also included the ability to pass multiple values for each option (which
pip
supports), butoptparse
does not, so a callback function was added inlocallibs/__init__.py
to support this.Example usage would be: