[Distutils] Having problems with "scripts" section

Scott Kirkwood scottakirkwood at gmail.com
Sat Sep 10 04:29:34 CEST 2005


With Phillips's help I figured out the problem:
*
* scott at scott:~/scott/python/wxoptparse$ runWx
Traceback (most recent call last):
 File "/usr/bin/runWx", line 4, in ?
 pkg_resources.run_script('wxOptParse==0.1.2', 'runWx')
 File "/usr/lib/python2.4/site-packages/setuptools-0.6a1c2-py2.4.egg/pkg_resources.py",
line 407, in run_script
 self.require(requires)[0].run_script(script_name, ns)
 File "/usr/lib/python2.4/site-packages/setuptools-0.6a1c2-py2.4.egg/pkg_resources.py",
line 914, in run_script
 raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'runWx'
scott at scott:~/scott/python/wxoptparse$ cd ..
scott at scott:~/scott/python$ runWx
usage: wxoptparse.py <programtorun>
**
*
*Basically, I was testing within my source directory and it was getting 
confused when it saw a folder called wxoptparse. The error was not very 
helpful in this case.
*
**distutils-sig at python.org*
On 9/9/05, Phillip J. Eby <pje at telecommunity.com> wrote:
> 
> At 01:11 PM 9/9/2005 -0300, Scott Kirkwood wrote:
> >Sorry I forgot to add the script to subversion, that's not the problem.
> >
> >I've updated subversion now, so the scripts directory should be OK.
> 
> Here's what I did. I'm running on cygwin, not Linux, but it seems like it
> should be similar. In any case, I'm not getting the problem. I wonder if
> perhaps you have a PYTHONPATH set up that is somehow finding the wrong
> version of your egg? (i.e., a version that doesn't have the script). Just
> a thought.
> 
> pje at pje-2 ~/projects/wxoptparse
> $ svn up
> A scripts/runWx
> Updated to revision 7.
> 
> pje at pje-2 ~/projects/wxoptparse
> $ python setup.py install
> running install
> running bdist_egg
> running egg_info
> writing ./wxOptParse.egg-info/PKG-INFO
> writing top-level names to ./wxOptParse.egg-info/top_level.txt
> installing library code to build/bdist.cygwin-1.5.12-i686/egg
> running install_lib
> running build_py
> installing scripts to build/bdist.cygwin-1.5.12-i686/egg/EGG-INFO/scripts
> running install_scripts
> running build_scripts
> copying scripts/runWx -> build/scripts-2.3
> creating build/bdist.cygwin-1.5.12-i686/egg/EGG-INFO/scripts
> copying build/scripts-2.3/runWx ->
> build/bdist.cygwin-1.5.12-i686/egg/EGG-INFO/s
> cripts
> changing mode of build/bdist.cygwin-1.5.12-i686/egg/EGG-INFO/scripts/runWx
> to 77
> 7
> copying ./wxOptParse.egg-info/PKG-INFO ->
> build/bdist.cygwin-1.5.12-i686/egg/EGG
> -INFO
> copying ./wxOptParse.egg-info/top_level.txt ->
> build/bdist.cygwin-1.5.12-i686/eg
> g/EGG-INFO
> creating dist
> creating 'dist/wxOptParse-0.1.2-py2.3.egg' and adding
> 'build/bdist.cygwin-1.5.12
> -i686/egg' to it
> removing 'build/bdist.cygwin-1.5.12-i686/egg' (and everything under it)
> Processing wxOptParse-0.1.2-py2.3.egg
> Copying wxOptParse-0.1.2-py2.3.egg to /usr/lib/python2.3/site-packages
> Adding wxOptParse 0.1.2 to easy-install.pth file
> Installing runWx script to /usr/bin
> 
> Installed /usr/lib/python2.3/site-packages/wxOptParse-0.1.2-py2.3.egg
> Processing dependencies for wxOptParse==0.1.2
> 
> pje at pje-2 ~/projects/wxoptparse
> $ runWx
> Traceback (most recent call last):
> File "/usr/bin/runWx", line 4, in ?
> pkg_resources.run_script('wxOptParse==0.1.2', 'runWx')
> File "/home/pje/setuptools/pkg_resources.py", line 407, in run_script
> self.require(requires)[0].run_script(script_name, ns)
> File "/home/pje/setuptools/pkg_resources.py", line 927, in run_script
> exec script_code in namespace, namespace
> File "/usr/bin/runWx", line 3, in ?
> import pkg_resources
> File "build/bdist.cygwin-1.5.12-i686/egg/wxoptparse/__init__.py", line
> 5, in ?
> 
> ImportError: No module named elementtree
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/distutils-sig/attachments/20050909/73797aa6/attachment.htm


More information about the Distutils-SIG mailing list