[pywin32-checkins] pywin32 pywin32_postinstall.py,1.11,1.12
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: Mark H. <mha...@us...> - 2004-09-24 07:33:15
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27829 Modified Files: pywin32_postinstall.py Log Message: Write the .pth file in the site-packages directory rather than the main Python dir. Index: pywin32_postinstall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pywin32_postinstall.py 2 Jul 2004 04:21:57 -0000 1.11 --- pywin32_postinstall.py 24 Sep 2004 07:33:03 -0000 1.12 *************** *** 126,131 **** import distutils.sysconfig import traceback lib_dir = distutils.sysconfig.get_python_lib(plat_specific=1) ! fname = os.path.join(sys.prefix, "pywin32.pth") if verbose: print "Creating .PTH file %s" % fname --- 126,135 ---- import distutils.sysconfig import traceback + # Create the .pth file in the site-packages dir, and use only relative paths lib_dir = distutils.sysconfig.get_python_lib(plat_specific=1) ! # Used to write this directly to sys.prefix - clobber it. ! if os.path.isfile(os.path.join(sys.prefix, "pywin32.pth")): ! os.unlink(os.path.join(sys.prefix, "pywin32.pth")) ! fname = os.path.join(lib_dir, "pywin32.pth") if verbose: print "Creating .PTH file %s" % fname *************** *** 136,142 **** # Create entries for the PTH file, and at the same time # add the directory to sys.path so we can load win32api below. ! path = os.path.join(lib_dir, name) ! pthfile.write(path + "\n") ! sys.path.append(path) # It is possible people with old versions installed with still have # pywintypes and pythoncom registered. We no longer need this, and stale --- 140,145 ---- # Create entries for the PTH file, and at the same time # add the directory to sys.path so we can load win32api below. ! pthfile.write(name + "\n") ! sys.path.append(os.path.join(lib_dir, name)) # It is possible people with old versions installed with still have # pywintypes and pythoncom registered. We no longer need this, and stale |