summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-03-11 16:53:39 -0300
committerTomás Touceda <chiiph@leap.se>2013-03-11 16:53:39 -0300
commit51624331cdc592c322eb8ab2aad8c0e889cca0bf (patch)
tree692c7213de99fdfe7e38efc00fffdd5a149c6554 /pkg
parent060984df444dbf407e9078de638ef7486ef7b0a0 (diff)
Add PySide as a dependency and a way to skip it through an env var
Diffstat (limited to 'pkg')
-rw-r--r--pkg/requirements.pip3
-rw-r--r--pkg/utils.py9
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)