mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 22:23:15 +00:00
a2ca6ef26f
builds-sr-ht: init at 0.45.13 dispatch-sr-ht: init at 0.11.0 git-sr-ht: init at 0.32.3 hg-sr-ht: init at 0.13.0 lists-sr-ht: init at 0.36.3 man-sr-ht: init at 0.12.4 meta-sr-ht: init at 0.34.3 paste-sr-ht: init at 0.5.1 todo-sr-ht: init at 0.46.8
44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
diff --git a/setup.py b/setup.py
|
|
index e6ecfb6..89fa92a 100755
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -5,28 +5,16 @@ import os
|
|
import site
|
|
import sys
|
|
|
|
-if hasattr(site, 'getsitepackages'):
|
|
- pkg_dirs = site.getsitepackages()
|
|
- if site.getusersitepackages():
|
|
- pkg_dirs.append(site.getusersitepackages())
|
|
- for pkg_dir in pkg_dirs:
|
|
- srht_path = os.path.join(pkg_dir, "srht")
|
|
- if os.path.isdir(srht_path):
|
|
- break
|
|
- else:
|
|
- raise Exception("Can't find core srht module in your site packages "
|
|
- "directories. Please install it first.")
|
|
-else:
|
|
- srht_path = os.getenv("SRHT_PATH")
|
|
- if not srht_path:
|
|
- raise Exception("You're running inside a virtual environment. "
|
|
- "Due to virtualenv limitations, you need to set the "
|
|
- "$SRHT_PATH environment variable to the path of the "
|
|
- "core srht module.")
|
|
- elif not os.path.isdir(srht_path):
|
|
- raise Exception(
|
|
- "The $SRHT_PATH environment variable points to an invalid "
|
|
- "directory: {}".format(srht_path))
|
|
+srht_path = os.getenv("SRHT_PATH")
|
|
+if not srht_path:
|
|
+ raise Exception("You're running inside a virtual environment. "
|
|
+ "Due to virtualenv limitations, you need to set the "
|
|
+ "$SRHT_PATH environment variable to the path of the "
|
|
+ "core srht module.")
|
|
+elif not os.path.isdir(srht_path):
|
|
+ raise Exception(
|
|
+ "The $SRHT_PATH environment variable points to an invalid "
|
|
+ "directory: {}".format(srht_path))
|
|
|
|
subp = subprocess.run(["make", "SRHT_PATH=" + srht_path])
|
|
if subp.returncode != 0:
|