diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-05-27 05:43:58 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-05-27 05:43:58 +0000 |
commit | f6556a2032951954f5e3960041ed5e18c5f03679 (patch) | |
tree | 620648bc0101b952c81051938e9d5a1238cb04be /tools | |
parent | cc1e163ddcd4de0deb58ff8caeb2afc62200c001 (diff) | |
parent | 874249e30f2a6f9fbd96455f7146b367d1c71072 (diff) | |
download | oslo-f6556a2032951954f5e3960041ed5e18c5f03679.tar.gz oslo-f6556a2032951954f5e3960041ed5e18c5f03679.tar.xz oslo-f6556a2032951954f5e3960041ed5e18c5f03679.zip |
Merge "Add support for requirements.txt."
Diffstat (limited to 'tools')
-rw-r--r-- | tools/patch_tox_venv.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/patch_tox_venv.py b/tools/patch_tox_venv.py index e23cf74..a3340f2 100644 --- a/tools/patch_tox_venv.py +++ b/tools/patch_tox_venv.py @@ -20,13 +20,25 @@ import sys import install_venv_common as install_venv +def first_file(file_list): + for candidate in file_list: + if os.path.exists(candidate): + return candidate + + def main(argv): root = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) venv = os.environ['VIRTUAL_ENV'] - pip_requires = os.path.join(root, 'tools', 'pip-requires') - test_requires = os.path.join(root, 'tools', 'test-requires') + pip_requires = first_file([ + os.path.join(root, 'requirements.txt'), + os.path.join(root, 'tools', 'pip-requires'), + ]) + test_requires = first_file([ + os.path.join(root, 'test-requirements.txt'), + os.path.join(root, 'tools', 'test-requires'), + ]) py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1]) project = 'oslo' install = install_venv.InstallVenv(root, venv, pip_requires, test_requires, |