I had to pull the git urls out of the main requirements files because in order to install offline (--no-index), we need pip to install from local package archives rather than cloning repo. The weird `cat` thing going on in the Makefile is because we need to install everything as part of a single `pip install` transaction. Without this, installing only requirements_git.txt will result in dependencies getting unintentionally updated.
The requirements.txt and requirements_ansible.txt files are generated from requirements.in and requirements_ansible.in, respectively, using pip-tools pip-compile. The following commands should do this if ran inside the tower_tools container.
virtualenv /buildit
source /buildit/bin/activate
pip install pip-tools
pip install pip --upgrade
pip-compile requirements/requirements.in > requirements/requirements.txt
pip-compile requirements/requirements_ansible.in > requirements/requirements_ansible.txt
Known Issues
-
Remove the
-efrom packages of the form-e git+https://github.com...in the generated.txt. Failure to do so will result in a "bad" RPM and DEB due to thepip installlaying down a symbolic link with an absolute path from the virtualenv to the git repository that will differ from when the RPM and DEB are build to when the RPM and DEB are installed on a machine. By removing the-ethe symbolic egg link will not be created and all is well. -
As of
pip-tools1.8.1pip-compiledoes not resolve packages specified using a git url. Thus, dependencies for things likedm.xmlsec.bindingdo not get resolved and output torequirements.txt. This means that:- can't use
pip install --no-depsbecause other deps WILL be sucked in - all dependencies are NOT captured in our
.txtfiles. This means you can't rely on the.txtwhen gathering licenses.
- can't use