question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A way to blacklist 'provided' dependencies.

See original GitHub issue

I 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:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

13reactions
bscipiocommented, Feb 23, 2016

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.txt

or exclude dependencies already available in current environment: pip install --log pip.log -r req.txt -target /mypath/pypkgs/ --exclude-current-env

8reactions
jpuskarcommented, Jan 21, 2019

This 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.txt rm -rf boto3 botocore etc.

It would be faster to be able to:

pip install -r requrements.txt \
  --force-exclude-deps boto3 botocore \
  --allow-me-to-do-bad-things \
  --i_accept_all_the_blame \
  --please_just_do_it_this_way \
  --i_admit_i_am_a_bad_person
Read more comments on GitHub >

github_iconTop Results From Across the Web

Apache Maven Enforcer Built-In Rules – Banned Dependencies
Banned Dependencies. This rule checks the dependencies and fails if any of the matching excludes are found.
Read more >
Maven assembly plugin: how to include provided ...
I want A to retrieve C (eg: download the jar locally), be it via assembly descriptor or maven-dependency-plugin:copy-dependencies or some other ...
Read more >
Mastering Maven: the DependencyManagement block
The <dependencyManagement> block has a couple of uses, the first is to help resolving versions of transitive dependencies, no matter where ...
Read more >
4. Dependency Management - Gradle Beyond the Basics [Book]
Different kinds of dependencies are resolved into files in different ways. ... to achieve the same effect as the Apache Maven dependency scope...
Read more >
Project - Gradle DSL Version 7.6
Map) method, or by using the PluginDependenciesSpec plugins script block. ... These are used when no tasks names are provided when starting the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found