Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Find extraneous pip packages not listed in your requirements.txt or as a sub-dependency.

License

Notifications You must be signed in to change notification settings

arrai-innovations/extraneous

Repository files navigation

extraneous

Find extraneous pip packages not listed in your requirements.txt or as a sub-dependency.

NOTICE: This software supports pip <= 20.3.4. Arrai Innovations is no longer actively developing or maintaining this software. We recommend users look at pipenv, poetry, or PDM for package management; extraneous has become extraneous.

extraneous logo

PYPI

main

Tests Coverage

Tests Coverage

Tests Coverage

Tests Coverage

Flake8

Install

$ pip install extraneous

Help

$ extraneous.py -h
usage: extraneous.py [-h] [--verbose] [--include paths] [--exclude names]
[--full]

Identifies packages that are installed but not defined in requirements files.
Prints the 'pip uninstall' command that removes these extraneous packages and
any non-common dependencies. Looks for packages matching '*requirements*.txt'
in the current working directory.

optional arguments:
-h, --help
    show this help message and exit
--verbose, -v
    Prints installed site-package folders and requirements files.
--include paths, -i paths
    Additional directories to look for '*requirements*.txt' files in.
--exclude names, -e names
    Package names to not consider extraneous. ['extraneous', 'pipdeptree',
     'pip', 'setuptools'] are not considered extraneous packages.
--full, -f
    Allows ['extraneous', 'pipdeptree', 'pip', 'setuptools'] as extraneous
     packages.

Example output

$ extraneous.py
extraneous packages:
        smbprotocol
uninstall via:
        pip uninstall -y smbprotocol cryptography dataclasses pyspnego

Development

  1. Clone the repo.
  2. Setup and activate a new venv.
  3. Install requirements.txt into your venv.

Testing

  1. Install test_requirements.txt into your venv.
  2. Run $ python setup.py test.

Build and Publish

  1. Install build_requirements.txt into your venv.
  2. Run $ python setup.py bdist_wheel.
  3. Run $ twine upload dist/*t.

About

Find extraneous pip packages not listed in your requirements.txt or as a sub-dependency.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages