diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/requirements.pip | 3 | ||||
-rw-r--r-- | pkg/utils.py | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/pkg/requirements.pip b/pkg/requirements.pip index 0f2e804e..7336d436 100644 --- a/pkg/requirements.pip +++ b/pkg/requirements.pip @@ -7,4 +7,5 @@ srp>=1.0.2 pyopenssl keyring pyxdg -argparse
\ No newline at end of file +argparse +PySide
\ No newline at end of file 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) |