-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Mark appnope as an unsafe package #277
Comments
ipython's reliance on appnope is annoying for this toolchain. If it's any help, we get around this with a bit of sed in our tox.ini, which solves the problem "well enough" for our purposes:
|
Agreed, this is annoying. I don't think we can guarantee desired behaviour here under all circumstances. In a way, pip-tools has to work with the output of pip, which on a single machine, is quite platform-specific. However, I would support a command line flag like |
tbh, I'm really not sure you should be trying to get around it because who knows how deep the rabbit hole goes. But maybe an Thoughts? |
How would you detect those without residing to parsing the package's metadata yourself? Right now, I'm basically letting pip do all the heavy lifting by simply asking it what the dependencies are. Not sure if we can detect from there is certain deps are platform specific. |
The As for labeling them in requirements.txt, in the worst case scenario, you could do dependency resolution twice, once with the above scheme and once in the regular way and take a set difference. Though there might be a simpler way to do this depending on how pip keeps track internally of its markers. |
Monkey patching sys.platform is likely going to pose issues around command invocation on Windows (pip-tools uses subprocess, which likely uses sys.platform to dispatch OS specific behaviour). As far as the other options we have, I'm unsure about. I agree it'd be nice to automatically exclude/ignore the platform-specific packages, and to add a command line flag to not do that by default. In that case, it may be good to still write the requirement into the requirements.txt file, but to comment it out. (So the user won't be surprised the package is not in there.) If you have time to prepare a PR for this, I'm happy to pull. |
We’d like to work around this issue by listing
… since we only use it in development and we all use Macs, and then having I guess that would depend on #206 |
Environment markers from requirements.in are now preserved, giving a solution to deal with environment specific dependencies. Given that and that |
or provide a way to configure unsafe packages via cli option on config file.
Ipython requires appnope on OSX only, so generated requirements.txt. fails on linux afterwards.
see PR #278
The text was updated successfully, but these errors were encountered: