TL;DR: Is there a way to hook setuptool's 'develop' to install a set of development requirements when running python setup.py develop
?
I'm building my first python package using setuptools. I'm specifying the requirements as:
requirements = [
'click',
'ansible',
'fabric',
'gitpython',
'pyyaml',
'jinja2',
'yapsy'
]
test_requirements = [
'pytest',
'pytest-pep8',
'pytest-cov',
]
setup(
...
install_requires=requirements,
tests_require=test_requirements,
...
)
During development, I've been installing the package (in a virtual environment) with:
python setup.py develop
and uninstalling with:
python setup.py develop -u
The package uses entry_points to install some command line scripts, so this sets up the commands for me and allows me to edit the package while testing the command at the same time.
I also have some dependencies that I use for development ... sphinx + extensions and a couple other things (things that aren't needed to use the package). I'm just manually installing them in the virtual environment at the moment. I didn't see any documentation (and haven't found any examples on the googles) about how to wire them in with setuptools.
Maybe there's a way to hook 'setup.py develop' to install an additional set of requirements? Another method I haven't read about?
requirements.txt
to pin package versions for a development environment, then runpip install -r requirements.txt
to deploy that environment. That's the kind of use case it's there for. – Bogbeandevelop_requires
entry... – Tyrolienne