Lines 1-6
Link Here
|
1 |
--- installp.py Sat Mar 20 02:34:29 1999 |
1 |
--- installp.py.orig 1999-02-03 21:59:11.000000000 -0700 |
2 |
+++ installp.py.orig Sat Mar 20 02:33:44 1999 |
2 |
+++ installp.py 2014-05-29 09:23:31.000000000 -0700 |
3 |
@@ -14,7 +14,7 @@ |
3 |
@@ -14,17 +14,22 @@ |
4 |
print "Usage: %s [-f] pymodule [npymodule...]" % sys.argv[0] |
4 |
print "Usage: %s [-f] pymodule [npymodule...]" % sys.argv[0] |
5 |
sys.exit(1) |
5 |
sys.exit(1) |
6 |
for opt in opts: |
6 |
for opt in opts: |
Lines 9-11
Link Here
|
9 |
|
9 |
|
10 |
v = sys.version[:3] |
10 |
v = sys.version[:3] |
11 |
|
11 |
|
|
|
12 |
+ try: |
13 |
+ destdir = os.environ['DESTDIR'] |
14 |
+ except KeyError: |
15 |
+ destdir = "" |
16 |
+ |
17 |
if string.atof(v) >= 1.5: |
18 |
- sp = "%s/lib/python%s/site-packages" % (sys.prefix, v) |
19 |
+ sp = "%s%s/lib/python%s/site-packages" % (destdir, sys.prefix, v) |
20 |
if not os.path.exists(sp): |
21 |
- os.mkdir(sp) |
22 |
+ os.makedirs(sp) |
23 |
else: |
24 |
print "looks like Python is older than 1.5" |
25 |
- sp = "%s/lib/python%s" % (sys.prefix, v) |
26 |
+ sp = "%s%s/lib/python%s" % (destdir, sys.prefix, v) |
27 |
|
28 |
if not FORCE: |
29 |
ans = raw_input("Install Python modules into %s? [y] " % sp) |