[Zconfig] Re: [pymon] python eggs and ZConfig

Duncan McGreggor duncan.mcgreggor at gmail.com
Mon Nov 14 09:54:43 EST 2005


On Nov 14, 2005, at 7:29 AM, Duncan McGreggor wrote:

> All the doctests tests pass with flying colors. However, as soon as I  
> create an egg, ZConfig pukes when it tries to do this import from  
> inside the egg, giving an error that it can't find the file in a  
> temporary egg location, one that was created during the egg build  
> process (Traceback below).

...

> ZConfig.ConfigurationError: error opening file  
> /Users/oubiwann/.python-eggs/PyMonitor-0.3.2-py2.3.egg-tmp/conf/ 
> schema-services.xml: [Errno 2] No such file or directory:  
> '/Users/oubiwann/.python-eggs/PyMonitor-0.3.2-py2.3.egg-tmp/conf/ 
> schema-services.xml'

Actually, it looks like that's the cache path. So, for some reason,  
during the extraction of the egg, the other schema files do not get get  
extracted and cached, despite the fact that they are packacked in the  
egg. Sounds like this might actually be a question for Phillip Eby, and  
maybe not a problem with ZConfig...

Phillip, when I unzip the egg, and look in the conf directory,  
everything is there:

cocwsx01:oubiwann 07:44:48 $ ls -al conf/
total 40
drwxr-xr-x   7 oubiwann  wheel   238 14 Nov 07:44 .
drwxr-xr-x  10 oubiwann  wheel   340 14 Nov 07:44 ..
-rw-r--r--   1 oubiwann  wheel  3484 14 Nov 04:10 example-pymon.conf
-rw-r--r--   1 oubiwann  wheel  2122 14 Nov 04:55 schema-http-status.xml
-rw-r--r--   1 oubiwann  wheel  1947 14 Nov 04:55 schema-ping.xml
-rw-r--r--   1 oubiwann  wheel   688 14 Nov 04:42 schema-services.xml
-rw-r--r--   1 oubiwann  wheel  3678 14 Nov 07:19 schema.xml

However, when pkg_resources._extract_resource fires off, they don't get  
extracted:

cocwsx01:oubiwann 07:50:54 $ ls -al  
~/.python-eggs/PyMonitor-0.3.2-py2.3.egg-tmp/conf
total 16
drwxr-xr-x  4 oubiwann  oubiwann   136 14 Nov 07:45 .
drwxr-xr-x  3 oubiwann  oubiwann   102 14 Nov 07:45 ..
-rw-------  1 oubiwann  oubiwann  3484 14 Nov 04:10 example-pymon.conf
-rw-------  1 oubiwann  oubiwann  3678 14 Nov 07:19 schema.xml

Looking at the source, if size and stamp match, they're not supposed to  
get extracted... I'm not really sure where to look next; is this a  
problem with setuptools? Or with ZConfig? Or me?!

Thanks,

d



More information about the ZConfig mailing list