summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-07-22 16:55:29 -0400
committerKali Kaneko <kali@leap.se>2015-07-22 16:55:29 -0400
commit4f4c50f159ea191e12abf3165157fb112c4e985e (patch)
tree0efcbf49749d5210bcdc86754ece19ace2b986a8 /setup.py
parent7482e04ab1e75ba4b3d98a1129f8d044919a4b02 (diff)
[bug] do not attempt to install data files inside a venv
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/setup.py b/setup.py
index 6a4bced3..1a6a7edf 100755
--- a/setup.py
+++ b/setup.py
@@ -447,15 +447,20 @@ IS_MAC = _system == "Darwin"
data_files = []
+
if IS_LINUX:
# XXX use check_for_permissions to install data
# globally. Or make specific install command. See #3805
- data_files = [
- ("share/polkit-1/actions",
- ["pkg/linux/polkit/se.leap.bitmask.policy"]),
- ("/usr/sbin",
- ["pkg/linux/bitmask-root"]),
- ]
+ isset = lambda var: os.environ.get(var, None)
+ if isset('VIRTUAL_ENV') or isset('LEAP_SKIP_INIT'):
+ data_files = None
+ else:
+ data_files = [
+ ("share/polkit-1/actions",
+ ["pkg/linux/polkit/se.leap.bitmask.policy"]),
+ ("/usr/sbin",
+ ["pkg/linux/bitmask-root"]),
+ ]
extra_options = {}