Search code examples
pythonsetuptoolspython-packagingopenwisp

How can I specify optional dependencies using setup.py and extra_requires?


Is there a way to specify optional dependencies when using python setup.py develop?

For example, say I have this package:

pip install openwisp-utils[users]

How can I install openwisp-utils for development by telling setuptools to install the optional dependencies listed in extra_requires['users']?


Solution

  • I found an alternative to python setup.py develop (which unfortunately doesn't seem to support extra_requires):

    pip install -e .[users]