[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[minion-cvs] Zap warning about sys.path for good, I hope.



Update of /home/minion/cvsroot/src/minion
In directory moria.mit.edu:/tmp/cvs-serv9869

Modified Files:
	setup.py Makefile 
Log Message:
Zap warning about sys.path for good, I hope.

Index: setup.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/setup.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- setup.py	6 Jan 2003 12:18:45 -0000	1.28
+++ setup.py	7 Jan 2003 00:03:15 -0000	1.29
@@ -20,6 +20,8 @@
 
 import os, re, struct, shutil
 
+os.umask(022)
+
 VERSION= '0.0.2rc1'
 
 USE_OPENSSL=1
@@ -162,6 +164,13 @@
 from distutils.core import setup, Extension
 from distutils import sysconfig
 
+if os.environ.get("PREFIX") and 'install' in sys.argv:
+    # Try to suppress the warning about sys.path by appending to the end of
+    # the path temporarily.
+    sys.path.append(os.path.join(os.environ.get("PREFIX"),
+                                 "lib",
+                                 "python%s"%sys.version[:3],
+                                 "site-packages"))
 
 
 INCLUDE_DIRS.append("src")

Index: Makefile
===================================================================
RCS file: /home/minion/cvsroot/src/minion/Makefile,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- Makefile	6 Jan 2003 18:44:45 -0000	1.33
+++ Makefile	7 Jan 2003 00:03:16 -0000	1.34
@@ -91,8 +91,10 @@
 	  export PREFIX;                                                     \
 	  echo $$PYTHON setup.py install --prefix=$(PREFIX) --compile --optimize=1; \
 	  $$PYTHON setup.py install --prefix=$(PREFIX) --compile --optimize=1;\
-	  echo "MIXMINION SAYS: Ignore that warning about sys.path--It's taken care of.";\
 	fi
+
+#	  echo "MIXMINION SAYS: Please ignore the warning about sys.path:"
+#	  echo "  The installed script will adjust sys.path automatically."
 
 update:
 	@$(FINDPYTHON);                                                      \