Greg
We do not have admin rights for our workstations here. After I was able to temporarily obtain admin rights and add python to the Path, your example works.
Thanks.
-----Original Message-----
From: Michael Delaney
Sent: Friday, September 23, 2005 1:20 PM
To: 'distutils-sig@python.org'
Subject: Distributing Python Modules - Error using foo.py in section 2.1
Greg Ward,
I am reading the documentation you wrote titled "Distributing Python Modules". In section 2.1 (A Simple Example), I made a simple script named foo.py but I am not able to get it running following the steps you provided. The error I receive is listed below and I have attached the files. I am executing this in a console prompt using Windows XP as the Operating System. Could you please tell me what I am doing incorrectly?
2.1 A Simple Example
foo.py
# A setup script.
#
from distutils.core import setup
setup(name="foo",
version="1.0",
py_modules=["foo"])
If all you want to do is distribute a module called foo, contained in a file foo.py,
then your setup script can be as simple as this:
from distutils.core import setup
setup(name="foo",
version="1.0",
py_modules=["foo"])
To create a source distribution for this module, you would create a setup script,
Setup.py, containing the above code, and run:
python setup.py sdist
The following error is displayed:
C:\Program Files\Python24>python setup.py
Traceback (most recent call last):
File "setup.py", line 7, in ?
py_modules=["foo"])
File "C:\Program Files\Python24\distutils\core.py", line 101,
in setup _setup_distribution=dist=Klass(attrs)
File "C:\Program Files\Python24\distutils\dist.py", line 130,
in __init__settattr(self, method_name, getattr(self.metadata, method_name))
Attribute Error: Distribution Metadata instance has no attribute 'get___doc___'
<<foo.py>>
<<setup.py>>
Thank you very much for your time.
Michael Delaney
Application Programmer
Checkout Direct®
200 Carillon Parkway
St. Petersburg, FL 33716
Ph: 727-579-5144
Michael.Delaney@CatalinaMarketing.com