[Distutils] Distributing Python Modules - Error using foo.py in section 2.1

Michael Delaney Michael.Delaney at CatalinaMarketing.com
Fri Sep 23 19:19:42 CEST 2005


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(r)
200 Carillon Parkway
St. Petersburg, FL 33716
Ph: 727-579-5144
Michael.Delaney at CatalinaMarketing.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/distutils-sig/attachments/20050923/39be98ff/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.py
Type: application/octet-stream
Size: 46 bytes
Desc: foo.py
Url : http://mail.python.org/pipermail/distutils-sig/attachments/20050923/39be98ff/foo.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setup.py
Type: application/octet-stream
Size: 124 bytes
Desc: setup.py
Url : http://mail.python.org/pipermail/distutils-sig/attachments/20050923/39be98ff/setup.obj


More information about the Distutils-SIG mailing list