skip to navigation
skip to content

Not Logged In

setupext-pip 1.0.5

Setuptools extension for installing requirements

A setuptools extension that installs requirements based on pip requirements files.

Wait… Why? What??

Installing runtime dependencies is already handled by setuptools right? It’s as easy as running python setup.py develop?! Not quite…

setup.py is a great tool and the develop command is useful for setting up basic development and installing the dependencies identified by the setup_requires keyword. What it does not do is install any tools that are used for actually hacking on the code base. Many projects include a pip-formatted requirements file named requirements.txt for this very purposes. It contains the dependencies that you need to have installed to work on the project instead of use it. This extension aims to automate that pattern and make it easier to set up a development environment by providing a new setup command named requirements.

Having a separate requirements.txt is a good pattern but it is not without its flaws. Having dependencies identified in two places is an outright violation of the Don’t Repeat Yourself principle. That is something else that we can solve pretty easily with a function that you can read a pip-formatted requirements file and generate a list that is usable as the setup setup_requires, install_requires, or tests_require keywords. This is where the setupext.pip.read_requirements_from_file function comes in. You can use this function to populate the setup_requires, tests_require, and extras_require keywords.

 
File Type Py Version Uploaded on Size
setupext-pip-1.0.5.tar.gz (md5) Source 2014-08-15 8KB
setupext_pip-1.0.5-py2.py3-none-any.whl (md5) Python Wheel 2.7 2014-08-15 6KB
  • Downloads (All Versions):
  • 18 downloads in the last day
  • 86 downloads in the last week
  • 526 downloads in the last month