How to install optional python dependencies in setup.py

From razwiki
Revision as of 16:19, 25 February 2022 by Razzi (talk | contribs) (Created page with "For a setup.py that has a section: extras_require = { # Test dependencies 'tests': [ 'bandit>=1.5.0', 'flake8>=3.2.1', 'pytest>=6.1.0',...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

For a setup.py that has a section:

extras_require = {
    # Test dependencies
    'tests': [
        'bandit>=1.5.0',
        'flake8>=3.2.1',
        'pytest>=6.1.0',
    ],
    'prospector': [
        'prospector[with_everything]>=0.12.4',
        'pytest>=6.1.0',
    ],
}

Do

pip install .[prospector]