summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index dc030b5a..57a3f8f2 100644
--- a/Makefile
+++ b/Makefile
@@ -20,8 +20,12 @@ DOCDIR ?= doc/pydoc
 PREFIX ?= /usr
 MANPREFIX ?= /share/man
 PYOPTIMIZE ?= 1
-PYTHON_SITE_DEST ?= $(shell $(PYTHON) -c 'import sys; sys.stdout.write( \
-	[p for p in sys.path if "site" in p][0])' 2> /dev/null)
+# this finds the shortest item in sys.path that contains "site" or "dist"
+# for example: /usr/lib/python2.6/site-packages
+PYTHON_SITE_DEST ?= $(shell $(PYTHON) -c 'import sys; \
+	dests = sorted([p for p in sys.path if "site" in p or "dist" in p], \
+	key=lambda dest: len(dest)); \
+	sys.stdout.write(dests[0])' 2> /dev/null)
 BMCOUNT ?= 5  # how often to run the benchmarks?
 
 CWD = $(shell pwd)
ision' href='/akkartik/mu/blame/ex2.mu?h=hlt&id=f66de6139270475828f1dffd1985d68325bef34d'>^
0daf12c5 ^
7bf8adb8 ^
0daf12c5 ^

74f1512f ^
0daf12c5 ^
0daf12c5 ^

74f1512f ^
0daf12c5 ^
1e02d840 ^

0f5b9a15 ^
0daf12c5 ^






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28