[Distutils] zip eggs not accessible when running setuptools under IIS
primco
primco at gmail.com
Mon Sep 11 20:12:41 CEST 2006
Phillip J. Eby wrote:
>
> At 07:12 PM 9/8/2006 -0700, primco wrote:
>>Sorry, it's a DistributionNotFound error. Here's the end of the traceback.
>>...
>>pkg_resources.DistributionNotFound: Routes>=1.4.1
>
> So this is with a Routes .egg zipfile, but if you extract it to an .egg
> directory, it works? And if you run it without IIS, it works even with
> the
> zipped .egg?
>
> Is that a correct summary of the problem?
>
Yes. This is correct.
Mark Hammond is helping me on this as well and we may have a fix that I'm
testing right now.
from Mark:
That one is strange! Inside an IIS6 environment (but not IIS5), that
advanced.py sample shows the following error upon reloading:
Traceback (most recent call last):
File "C:\src\python-2.4-svn\lib\threading.py", line 442, in __bootstrap
self.run()
File "\\?\C:\src\pywin32\isapi\samples\advanced.py", line 72, in run
OSError: [Errno 2] No such file or directory:
'\\\\?\\C:\\src\\pywin32\\isapi\\samples\\advanced.py'
As you can see, inside the IIS environment, we are getting filenames in the
'unlimited length' style supported by Windows - note the leading '\\?'. The
Python (ie, c runtime) file routines don't know how to deal with that. I
just took a hacky approach, by changing advanced.py thusly:
self.filename = __file__
# IIS6 will give an 'unlimited length' style filename (eg,
# '\\?\C:\foo...' - for now, just hack around this.
if self.filename.startswith('\\\\?\\'):
self.filename = self.filename[4:]
However, this is possibly *not* the best fix for this. If you look at
sys.path, you will notice that sys.path[0] is a string in this format - it
seems more appropriate that we fix that pathname at the source - but I'm out
of time to dig any deeper than that right now - but there is a reasonable
possibility your egg problem directly relates to this...
--
View this message in context: http://www.nabble.com/zip-eggs-not-accessible-when-running-setuptools-under-IIS-tf2242368.html#a6251930
Sent from the Python - distutils-sig forum at Nabble.com.
More information about the Distutils-SIG
mailing list