A way to blacklist 'provided' dependencies.
See original GitHub issueI have an appengine application, I would like to manage third party libraries with pip. I do this by adding each library to requirements.txt and executing pip -r requirements.txt -t libsubdir/. Then I arrange for appengine to add the libsubdir to the pythonpath. This works fine except when a third party package brings in a package normally provided by appengine (which may include native code that won’t work if loaded into the sandbox).
E.g. say I depend on ua-parser, it will bring in pyyaml, but pyyaml (3.10) is provided by appengine. So I’d like a way to exclude PyYAML in requirements.txt.
PyYAML would then be specified in the appengine app.yaml. It would probably have to be installed as a system dependency for local development, this would be managed by the developer just as for other common appengine provided libraries such as PyCrypto, PIL, etc.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:4
- Comments:15 (5 by maintainers)

Top Related StackOverflow Question
A similar question was posed on stackoverflow: Pip install to custom target directory and exclude specific dependencies.
These would be useful to me, as I has similar situation as @zenlambda : A feature like exclude/blacklist from a file:
pip install --log pip.log -r req.txt -target /mypath/pypkgs/ --exclude exclude.txtor exclude dependencies already available in current environment:
pip install --log pip.log -r req.txt -target /mypath/pypkgs/ --exclude-current-envThis would be useful for creating AWS lambda function zip packages. In this use case, many AWS packages are pre-installed in a layer. Therefore, we don’t need to package them into the ZIP file to upload.
The current process is:
pip install -r requirements.txtrm -rf boto3 botocoreetc.It would be faster to be able to: