[Python-checkins] r43417 - sandbox/trunk/setuptools/setuptools/command/easy_install.py

phillip.eby python-checkins at python.org
Wed Mar 29 07:41:41 CEST 2006


Author: phillip.eby
Date: Wed Mar 29 07:41:40 2006
New Revision: 43417
Modified:
 sandbox/trunk/setuptools/setuptools/command/easy_install.py
Log:
Support complex .pth files in win32.exe->.egg conversion; this addition 
lets easy_install handle pywin32... well, almost. You still have to 
deal with the "system" DLLs yourself.
Modified: sandbox/trunk/setuptools/setuptools/command/easy_install.py
==============================================================================
--- sandbox/trunk/setuptools/setuptools/command/easy_install.py	(original)
+++ sandbox/trunk/setuptools/setuptools/command/easy_install.py	Wed Mar 29 07:41:40 2006
@@ -1291,13 +1291,14 @@
 if name.endswith('-nspkg.pth'):
 continue
 if parts[0] in ('PURELIB','PLATLIB'):
- pth = z.read(name).strip()
- prefixes[0] = ('PURELIB/%s/' % pth), ''
- prefixes[1] = ('PLATLIB/%s/' % pth), ''
- break
+ for pth in yield_lines(z.read(name)):
+ pth = pth.strip().replace('\\','/')
+ if not pth.startswith('import'):
+ prefixes.append((('%s/%s/' % (parts[0],pth)), ''))
 finally:
 z.close()
 
+ prefixes.sort(); prefixes.reverse()
 return prefixes
 
 
@@ -1309,7 +1310,6 @@
 "Not a URL, existing file, or requirement spec: %r" % (spec,)
 )
 
-
 class PthDistributions(Environment):
 """A .pth file with Distribution paths in it"""
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /