[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r10029 - trunk/gnue-common
From: |
reinhard |
Subject: |
[gnue] r10029 - trunk/gnue-common |
Date: |
Sat, 31 Oct 2009 17:41:13 -0500 (CDT) |
Author: reinhard
Date: 2009-10-31 17:41:13 -0500 (Sat, 31 Oct 2009)
New Revision: 10029
Modified:
trunk/gnue-common/setup-svn.py
trunk/gnue-common/setup.py
Log:
Let paths.py find out about the libarary path by analyzing its own __file__
location. This makes paths.py independent of the used Python version and thus
fixes the Python version dependency on Debian.
Modified: trunk/gnue-common/setup-svn.py
===================================================================
--- trunk/gnue-common/setup-svn.py 2009-10-31 21:03:10 UTC (rev 10028)
+++ trunk/gnue-common/setup-svn.py 2009-10-31 22:41:13 UTC (rev 10029)
@@ -485,8 +485,9 @@
# create path.py
output = open ("%s/paths.py" % GNUEDIR, "w")
output.write ("# This file was generated by setup-svn.py.\n")
+output.write ("import os\n")
output.write ("\n")
-output.write ("lib = \"%s\"\n" % GNUEDIR)
+output.write ("lib = os.path.dirname(os.path.dirname(__file__))\n")
output.write ("scripts = \"%s\"\n" % BINDIR)
output.write ("data = \"%s\"\n" % CONFDIR)
output.write ("config = \"%s/etc\"\n" % CONFDIR)
Modified: trunk/gnue-common/setup.py
===================================================================
--- trunk/gnue-common/setup.py 2009-10-31 21:03:10 UTC (rev 10028)
+++ trunk/gnue-common/setup.py 2009-10-31 22:41:13 UTC (rev 10029)
@@ -391,13 +391,18 @@
output.write("# This file was generated during installation.\n")
output.write("import os, sys\n")
output.write("\n")
- output.write("lib = \"%s\"\n" % self.__quote(self.install_lib))
+ # We don't store self.install_lib here because if the final install
+ # uses tools like Debian's python-support, the library will
+ # actually end up somewhere different than where we installed it.
+ # Additionally, with this hack, paths.py will be identical for
+ # different Python versions, which again helps python-support.
+ output.write("lib = os.path.dirname(os.path.dirname(__file__))\n")
output.write("scripts = \"%s\"\n" % \
self.__quote(self.install_scripts))
output.write("\n")
output.write("############################\n")
- output.write("# This is a workaround for McMillan packaging!!!\n")
- output.write("# McMillan sets sys.frozen=1 in packaged exe
file.\n")
+ output.write("# This is a workaround for py2exe packaging!!!\n")
+ output.write("# py2exe sets sys.frozen=1 in packaged exe file.\n")
output.write("############################\n")
output.write("if hasattr(sys, 'frozen') and sys.platform == " \
"'win32':\n")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r10029 - trunk/gnue-common,
reinhard <=