Global requirements for OpenStack
Go to file
Nguyen Van Trung aee6e95380 Allow Pygments in openstack/requirements
Projects that want to enable a comprehensive doc8 check of code,
including D000, need Pygmnets to be installable.  It's an option library
used by docutils so we need to track it here.

While this isn't really a linter, neither is it really required at
runtime for the projects using it so it's added to the blacklist

Is the library actively maintained?
Yes - https://bitbucket.org/birkenfeld/pygments-main

Is the library good code?
Yes - It is the defacto syntax highlighting code in Python

Is the library python 3 compatible?
Yes

Is the library license compatible?
Yes - BSD

Is the library already packaged in the distros we target (Ubuntu latest / Fedora latest)?
Yes

Is the function of this library already covered by other libraries in global-requirements.txt?
No

Is the library required for OpenStack project or related dev or infrastructure setup? (Answer to this should be Yes, of course) Which?
Yes - for doc8 checking where there is code snippets.
It is also a transient dependancy of sphinx - https://github.com/sphinx-doc/sphinx/blob/master/setup.py#L21

Change-Id: I643c7632a02c87820c9c51f03fa34f0764384783
Close-bug: #1771479
2018-05-17 14:00:54 +07:00
.zuul.d trigger requirements-check if the lower-constraints.txt file changes 2018-03-29 12:58:57 -04:00
babel-test Babel Integration tests 2016-04-24 17:21:18 -05:00
doc/source Fix bug URL for report a bug link 2017-08-27 10:42:10 +02:00
openstack_requirements Merge "Trivial: Update pypi url to new url" 2018-04-21 05:46:48 +00:00
playbooks skip virtualenv setup when there is already a virtualenv 2018-04-11 20:09:56 +00:00
tools Merge "Trivial: Update pypi url to new url" 2018-04-21 05:46:48 +00:00
.gitignore Add .pot to the ignored files 2016-05-27 09:20:30 +00:00
.gitreview Added .gitreview 2012-08-06 17:05:39 -05:00
.testr.conf Move tests into openstack_requirements. 2015-06-08 22:07:01 +12:00
bindep.txt Update bindep.txt for ubuntu-bionic 2018-03-06 22:04:37 -05:00
blacklist.txt Allow Pygments in openstack/requirements 2018-05-17 14:00:54 +07:00
detail.py Trivial: Update pypi url to new url 2018-04-21 02:32:36 +00:00
global-requirements.txt Allow Pygments in openstack/requirements 2018-05-17 14:00:54 +07:00
lower-constraints-xfails.txt remove mitmproxy 2018-03-22 13:50:56 -05:00
lower-constraints.txt Allow Pygments in openstack/requirements 2018-05-17 14:00:54 +07:00
MANIFEST.in Make openstack.requirements installable. 2013-07-05 00:31:50 -04:00
projects.txt Retire kolla-kubernetes project - step 1 stop requirements sync 2018-05-14 14:50:37 +08:00
README.rst remove readme content that moved to project-team-guide 2018-04-12 17:41:00 -04:00
requirements.txt Updated from global requirements 2018-03-04 10:29:16 +00:00
setup.cfg Update and replace http with https for doc links 2017-07-22 11:14:40 +08:00
setup.py Updated from global requirements 2017-03-02 11:55:44 +00:00
test-requirements.txt Updated from global requirements 2018-03-15 08:08:00 +00:00
tox.ini Add a global coinstallable lower-requirements set 2018-03-03 19:48:11 +01:00
update.py Move commands into cmds subdir. 2015-06-29 15:27:25 +12:00
upper-constraints-xfails.txt remove mitmproxy 2018-03-22 13:50:56 -05:00
upper-constraints.txt Allow Pygments in openstack/requirements 2018-05-17 14:00:54 +07:00

Global Requirements for OpenStack Projects

image

Why Global Requirements?

Refer to the Dependency Management section of the Project Team Guide for information about the history of the project and the files involved.

Tools

All the tools require openstack_requirements to be installed (e.g. in a Python virtualenv). They all have help, which is the authoritative documentation.

update-requirements

This will update the requirements in a project from the global requirements file found in .. Alternatively, pass --source to use a different global requirements file:

update-requirements --source /opt/stack/requirements /opt/stack/nova

Entries in all requirements files will have their versions updated to match the entries listed in the global requirements. Excess entries will cause errors in hard mode (the default) or be ignored in soft mode.

generate-constraints

Compile a constraints file showing the versions resulting from installing all of global-requirements.txt:

generate-constraints -p /usr/bin/python2.7 -p /usr/bin/python3 \
  -b blacklist.txt -r global-requirements.txt > new-constraints.txt

edit-constraints

Replace all references to a package in a constraints file with a new specification. Used by DevStack to enable git installations of libraries that are normally constrained:

edit-constraints oslo.db "-e file://opt/stack/oslo.db#egg=oslo.db"

Proposing changes

Look at the Review Guidelines and make sure your change meets them.

All changes to global-requirements.txt may dramatically alter the contents of upper-constraints.txt due to adding or removing transitive dependencies. As such you should always generate a diff against the current merged constraints, otherwise your change may fail if it is incompatible with the current tested constraints.

A change to the minimum specified vesion of a library in global-requirements.txt currenty requires adjusting the lower-constraints.txt file alongside with the new constrainted coinstallable version of minimums.

Regenerating involves five steps.

  1. Install the dependencies needed to compile various Python packages:

    sudo apt-get install $(bindep -b)
  2. Create a reference file (do this without your patch applied):

    generate-constraints -p /usr/bin/python2.7 -p /usr/bin/python3 \
      -b blacklist.txt -r global-requirements.txt > baseline
  3. Apply your patch and generate a new reference file:

    generate-constraints -p /usr/bin/python2.7 -p /usr/bin/python3 \
      -b blacklist.txt -r global-requirements.txt > updated
  4. Diff them:

    diff -p baseline updated
  5. Apply the patch to upper-constraints.txt. This may require some fiddling. edit-constraint can do this for you when the change does not involve multiple lines for one package.

Resources