[Distutils] Having problems with "scripts" section

Scott Kirkwood scottakirkwood at gmail.com
Fri Sep 9 04:06:09 CEST 2005


Ok, I give up. I'm using setuptools==0.5a13 and have the following problem.
I'm trying (under Ubuntu Linux) to have my easy_install.py install a script 
to run my utility. However, it's unable to find the utility and I don't know 
why.
The latest incarnation I changed the name of the script to runWx. Here's 
what happends when I run it:
 <distutils-sig at python.org> $ 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.5a13-py2.4.egg/pkg_resources.py",
line 111, in run_script
require(dist_spec)[0].metadata.run_script(script_name, ns)
File "/usr/lib/python2.4/site-packages/setuptools-0.5a13-py2.4.egg/pkg_resources.py",
line 627, in run_script
raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'runWx'

 it can't find runWx, ok, why not?

here's the egg list:
$ unzip -l dist/wxOptParse-0.1.2-py2.4.egg
Archive: dist/wxOptParse-0.1.2-py2.4.egg
 Length Date Time Name
 -------- ---- ---- ----
 21025 09-08-05 12:54 wxoptparse/__init__.py
 20091 09-08-05 22:26 wxoptparse/__init__.pyc
 1315 09-08-05 22:26 EGG-INFO/PKG-INFO
 11 09-08-05 22:26 EGG-INFO/top_level.txt
 0 09-08-05 22:26 EGG-INFO/zip-safe
 63 09-08-05 22:15 EGG-INFO/scripts/runWx
 -------- -------
 42505 6 files
 
Here's the contents of /usr/bin/wxRun which appears to have been created:
$ cat /usr/bin/runWx
#!/usr/bin/python
# EASY-INSTALL-SCRIPT: 'wxOptParse==0.1.2','runWx'
import pkg_resources
pkg_resources.run_script('wxOptParse==0.1.2', 'runWx')
 Contents of my original runWx
#!python

import wxoptparse

wxoptparse.handleCommandLine()
 My setup.py file:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages

# Notes to self:
# python setup.py sdist --formats=zip
# To create the zip file

# python setup.py --command-packages=setuptools.command bdist_egg
# To create the egg file

# python setup.py register
# to register with PyPI
#

setup(name="wxOptParse",
version="0.1.2",
description="wxOptParse: run the command line options from a dialog box.",
long_description="""\
wxOptParse is a Python program that brings up a graphical representation of 
the options
that another python program has for the command line, via the optparse 
module.

What this means is that if if you have a program that uses optparse you can 
click on checkboxes,
edit boxes, combo boxes, etc. instead of using the command line.
""",
author="Scott Kirkwood",
author_email="scottakirkwood at gmail.com",
url="http://wxoptparse.berlios.de/",
download_url='
http://developer.berlios.de/project/showfiles.php?group_id=2209&release_id=3368
',
packages=find_packages(exclude='tests'),
scripts=["runWx"],
keywords=['wxOptParse', 'optparse', 'python', 'wxPython'],
license='GNU GPL',
zip_safe=True,
platforms=['POSIX', 'Windows', 'MacOS X'],
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: OS Independent',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python',
],
# package_data={'': '*.xml'},
# install_requires=['wxPython>=2.5.3'], # Doesn't work on my machine
)
 And my MANIFEST.in file:
include setup.py
include ez_setup.py
include runWx
include wxoptparse/runWx
include README.txt
include docs/*.css
include docs/*.rst
include docs/*.gif
include docs/*.html
include docs/*.png
include wxoptparse/*.py
 Plus you can find all these files and more at 
http://developer.berlios.de/projects/wxoptparse/

Any help would be appreciated, this program won't be very useful if it's 
can't be run from the command line.

-Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/distutils-sig/attachments/20050908/247b7eb2/attachment.htm


More information about the Distutils-SIG mailing list