One of the things I enjoy about building projects with nodejs
is using npm, specifically the devDependencies
part ofpackage.json
. This allows you to have one set of dependencies that are
installed in production, but have extra dependencies installed for development,
such as test libraries, deploy tools, etc. To get the development dependencies
with npm
you run:
1 | $ npm intall --dev |
how about pip
It turns out if you are using pip
1.2 or newer, you can now do the same thing
in your setup.py
file for Python packages.
An example setup.py
file:
1 | #!/usr/bin/env python |
To install this normally (in “edit” mode) you’d run:
1 | $ pip install -e . |
To install the develop
set of dependencies you can run:
1 | $ pip install -e .[develop] |
As you can see, you can have multiple sets of extra dependencies and call them
whatever you want.
Have fun,
Aaron