Module not included when running "setup.py sdist"

L

Leaf

I'm running Python 2.5.2 on Ubuntu Hardy. I'm trying to write a
Distutils setup script to distribute and upload to PyPI a module I
wrote called "Wyzard." My setup script looks like:

setup(name='Wyzard',
version='0.8',
author='LeafStorm/Pacific Science',
author_email='(e-mail address removed)',
url='http://pac-sci.homeip.net/index.cgi/swproj/wyzard',
description='A *very* simple library for command-line wizards.',
long_description=documentation,
py_modules=['wyzard'],
classifiers=['Environment :: Console',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public
License (GPL)',
'Natural Language :: English',
'Programming Language :: Python :: 2.5',
])

Where documentation is a string I had defined earlier in the file. I
created this setup script in a directory called "~/Code/distrib/
wyzard", whose contents were just the setup script. (The file
"wyzard.py" itself lived in "~/Code", which was in sys.path.) Upon
running the "python setup.py install", I got this output:

running sdist
reading manifest file 'MANIFEST'
creating Wyzard-0.8
making hard links in Wyzard-0.8...
hard linking setup.py -> Wyzard-0.8
tar -cf dist/Wyzard-0.8.tar Wyzard-0.8
gzip -f9 dist/Wyzard-0.8.tar
removing 'Wyzard-0.8' (and everything under it)

I then ran tar -tf dist/Wyzard-0.8.tar.gz, and recieved this:

Wyzard-0.8/
Wyzard-0.8/PKG-INFO
Wyzard-0.8/setup.py

I did not see "wyzard.py" anywhere in there, so I copied wyzard.py to
"~/Code/distrib/wyzard" (so that it was living next to the setup
script), deleted the tarball created by the first try, and ran
"setup.py sdist" again. It still hadn't copied to the tarball. I tried
again several times, but nothing happened. Can anyone explain what I
have to do to get Distutils to include the module?
 
M

Martin v. Löwis

I did not see "wyzard.py" anywhere in there, so I copied wyzard.py to
"~/Code/distrib/wyzard" (so that it was living next to the setup
script), deleted the tarball created by the first try, and ran
"setup.py sdist" again. It still hadn't copied to the tarball. I tried
again several times, but nothing happened. Can anyone explain what I
have to do to get Distutils to include the module?

You need to delete the MANIFEST, or rerun with --force-manifest.
Otherwise, the manifest will only get regenerated when setup.py changes.

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,516
Members
44,985
Latest member
rsts

Latest Threads

Top