aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2014-08-16 16:56:36 -0700
committerBrian Dolbec <dolsen@gentoo.org>2014-08-16 17:07:38 -0700
commit04caf38bdd7f7a5e8782e66124c5a615b0d393d4 (patch)
tree8f84a1aae66d681b4287ec3b0931d2c2b880cebe /setup.py
parentmounter.py: Renames "repo" var to "repos", _check_selection() (diff)
downloadlayman-04caf38bdd7f7a5e8782e66124c5a615b0d393d4.tar.gz
layman-04caf38bdd7f7a5e8782e66124c5a615b0d393d4.tar.bz2
layman-04caf38bdd7f7a5e8782e66124c5a615b0d393d4.zip
setup.py: Make the modules selectable for install
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py23
1 files changed, 10 insertions, 13 deletions
diff --git a/setup.py b/setup.py
index 9ec217f..4e7fc69 100755
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
+import os
import sys
from distutils.core import setup
@@ -8,20 +9,16 @@ from distutils.core import setup
sys.path.insert(0, './')
from layman.version import VERSION
+SELECTABLE = "bzr cvs darcs git g_sorcery mercurial rsync squashfs svn tar"
+# get the USE from the environment, default to all selectable modules
+# split them so we don't get substring matches
+USE = os.environ.get("USE", SELECTABLE).split()
-modules = [
- 'layman.overlays.modules.bzr',
- 'layman.overlays.modules.cvs',
- 'layman.overlays.modules.darcs',
- 'layman.overlays.modules.git',
- 'layman.overlays.modules.g_sorcery',
- 'layman.overlays.modules.mercurial',
- 'layman.overlays.modules.rsync',
- 'layman.overlays.modules.squashfs',
- 'layman.overlays.modules.stub',
- 'layman.overlays.modules.svn',
- 'layman.overlays.modules.tar',
- ]
+modules = ['layman.overlays.modules.stub']
+
+for mod in SELECTABLE.split():
+ if mod in USE:
+ modules.append('layman.overlays.modules.%s' %mod)
setup(name = 'layman',