diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-03-11 16:53:39 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-03-11 16:53:39 -0300 |
commit | 51624331cdc592c322eb8ab2aad8c0e889cca0bf (patch) | |
tree | 692c7213de99fdfe7e38efc00fffdd5a149c6554 /pkg/utils.py | |
parent | 060984df444dbf407e9078de638ef7486ef7b0a0 (diff) |
Add PySide as a dependency and a way to skip it through an env var
Diffstat (limited to 'pkg/utils.py')
-rw-r--r-- | pkg/utils.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/utils.py b/pkg/utils.py index c6c57652..0b1ea019 100644 --- a/pkg/utils.py +++ b/pkg/utils.py @@ -23,13 +23,18 @@ def parse_requirements(reqfiles=['requirements.txt', 'requirements.pip', 'pkg/requirements.pip']): """ - Parses the requirement files provided + Parses the requirement files provided. + + Checks the value of LEAP_VENV_SKIP_PYSIDE to see if it should + return PySide as a dep or not. Don't set, or set to 0 if you want + to install it through pip. @param reqfiles: requirement files to parse @type reqfiles: list of str """ requirements = [] + skip_pyside = os.getenv("LEAP_VENV_SKIP_PYSIDE", "0") != "0" for line in get_reqs_from_files(reqfiles): # -e git://foo.bar/baz/master#egg=foobar if re.match(r'\s*-e\s+', line): @@ -47,6 +52,8 @@ def parse_requirements(reqfiles=['requirements.txt', # adding it to the requirements list screws distro installs elif line == 'argparse' and sys.version_info >= (2, 7): pass + elif line == 'PySide' and skip_pyside: + pass else: if line != '': requirements.append(line) |