Donate Share

Python for Windows extensions

Tracker: Patches

5 Patch for a successful "setup.py --prefix" - ID: 2896067
Last Update: Attachment added ( nearfar )

Since APy build scripts run "setup.py install --prefix=<path to image
dir>",
we should use distutils' self.prefix (instead of sys.prefix - that points
to
the Python build directory) when finding previously installed file.
Index: pywin32/setup.py
===================================================================
--- pywin32/setup.py.orig 2009-11-10 17:00:30.000000000 -0800
+++ pywin32/setup.py 2009-11-10 17:00:49.000000000 -0800
@@ -1283,7 +1283,7 @@
if not self.dry_run and not self.root:
# We must run the script we just installed into Scripts, as
it
# may have had 2to3 run over it.
- filename = os.path.join(sys.prefix, "Scripts",
"pywin32_postinstall.py")
+ filename = os.path.join(self.prefix, "Scripts",
"pywin32_postinstall.py")
if not os.path.isfile(filename):
raise RuntimeError("Can't find '%s'" % (filename,))
print "Executing post install script..."


Sridhar Ratnakumar ( nearfar ) - 2009-11-11 17:25

5

Open

None

Nobody/Anonymous

None

None

Public


Comments

No follow-up comments have been posted.

Attached File ( 1 )

Filename Description Download
use_distutils_prefix.patch Download

Change ( 1 )

Field Old Value Date By
File Added 350475: use_distutils_prefix.patch 2009-11-11 17:26 nearfar