-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Ignore package? #219
Comments
@ariscn there's no way to make however, in general building on OSX and targeting a Linux runtime is a very common case given some forethought. the approach we use for platform-native deps is to pre-compile those into binary distributions (e.g. eggs or wheels) on a Linux machine (via something like: another common solution is to eliminate platform-specific deps altogether (e.g. use pure-python libs like |
Rather than conditionally ignoring dependencies, is there any way to specify build options for requirements? For example, in order to build pip install python-ldap \
--global-option=build_ext \
--global-option="-I$(xcrun --show-sdk-path)/usr/include/sasl" Is there any way to accomplish the equivalent using pex, or is hand-building a egg/wheel bdist the recommended workaround for such things? |
@benley yeah - the recommended approach would be to build a bespoke bdist and then let pex resolve against bdists at build time. most folks create a "wheelhouse" type store that just contains wheels for this purpose and then use this will not only make your builds generally faster (less compilation work to be done on each build), but also more repeatable and reliable (eliminates an entire class of problems that arise from environmental variance in compilation from dev machine to dev machine). |
@ariscn Pex has since grown support for
@benley Pex switched to using Pip as its resolver in 2.x and you can now pass Pip options. For your case I downloaded the libsasl tarball, unpacked it and made a top-level symlink in the unpacked tarball from sasl -> include. This allows:
And to show it really works, this fails with the
|
I'm using pex to build from several different requirements.txt files. The catch is that I'm on OS X and building for Linux. Even with
--platform
, I'm unable to run my pex on Linux because of missing packages that don't exist on the platform, most notably gnureadline.I can work around this by maintaining a separate requirements file with gnureadlines removed, but this is a bit hacky. Is there a way to have pex ignore a package at either build time or runtime?
The text was updated successfully, but these errors were encountered: