Skip to main content

Generate a flat list of packages Pip would install.

Project description

pip-package-list

License PyPi test

A small and definitely faulty tool that tries to form a list of packages that you depend on. This is useful in mono-repo's where all dependencies are split into dozens of requirements.txt and setup.py files.

One particular use-case that fueled the development of this tool was to create a flat list of dependencies to pre-install in a Docker base image.

Although there is a number of tools that parse and resolve requirement files, I did not find any that parse setup.py files and extract install_requires.

Usage

usage: pip-package-list [-h] [--recurse-recursive] [--recurse-editable] [--recurse-path]
                        [--inline-constraints] [--dedupe] [--remove-editable] [--remove-path]
                        [--remove-recursive] [--remove-constraints] [--remove-vcs] [--remove-wheel]
                        [--remove-unversioned] [--remove-index-urls]
                        file_paths [file_paths ...]

positional arguments:
  file_paths            list of requirements.txt or setup.py files

optional arguments:
  -h, --help            show this help message and exit
  --recurse-recursive   recurse into -r entries
  --recurse-editable    recurse into -e entries
  --recurse-path        recurse into local path entries
  --inline-constraints  recurse into -c entries and inline them
  --dedupe              de-duplicate the resulting list
  --remove-editable     remove editable requirements from the final list
  --remove-path         remove path requirements from the final list
  --remove-recursive    remove recursive requirements (-r) from the final list
  --remove-constraints  remove constaints (-c) from the final list
  --remove-vcs          remove vcs requirements from the final list
  --remove-wheel        remove wheel requirements from the final list
  --remove-unversioned  remove requirements without a version number from the final list
  --remove-index-urls   remove -i entries (index urls) from the final list

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pip_package_list-0.0.11-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file pip_package_list-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: pip_package_list-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for pip_package_list-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 f2c20eb01352e262386b60e583d93cff434044d00008121819e922419426f5ef
MD5 34bcf8d535a6747acd00fdd328a8811b
BLAKE2b-256 8e5a7d23bc389748db86cc94cf8aae3de71599b264a1af6aa391c75b0e05f8c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page