Skip to content

Specify the PIP_REQUIREMENTS_FILE to use the fully frozen version, generated...

David Diederich requested to merge specify-pip-requirements into master

Specify the PIP_REQUIREMENTS_FILE to use the fully frozen version, generated by the compile-and-unit-test stage. This fully frozen version is reported via an artifact, named all-requirements.txt

Gemnasium Workaround

Note that there is a reported bug in GitLab, requiring a workaround before_script

Extra Index URLs

In doing this, I noticed that some requirements files need extra index URLs in order to work. So, there's now two ways to specify extra index urls.

  1. The existing way, by adding them to the requirements file in the form: --extra-index-url URL. These are now greped out, uniqified, and prepended to the all-requirements.txt file for use there.
  2. By setting a variable, PIP_EXTRA_INDEX_URLS, with a space-delimited list of extra index urls. These URLS are added both to the all-requirements.txt file and to every pip install operation.

Complete Override of Frozen Requirements

By setting the REQ_COLLECT variable to a script or series of bash commands, projects can completely override the method to create a list of all dependencies. This can be used if the default operations -- the concatenation of the PIP_EXTRA_INDEX_URLS environment variable and any --extra-index-url lines in the PIP_REQUIREMENTS -- doesn't provide a correct set of all dependencies.

Testing

Multi Pipeline Test, though this doesn't exercise all possible paths to utilizing this.

Edited by David Diederich

Merge request reports

Loading