Module not included when running "setup.py sdist"

Discussion in 'Python' started by Leaf, Nov 22, 2008.

  1. Leaf

    Leaf Guest

    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='',
    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?
    Leaf, Nov 22, 2008
    #1
    1. Advertising

  2. > 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
    Martin v. Löwis, Nov 22, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miki
    Replies:
    0
    Views:
    238
  2. Charles Comstock

    ri Module#included entry is incorrect

    Charles Comstock, May 22, 2004, in forum: Ruby
    Replies:
    0
    Views:
    92
    Charles Comstock
    May 22, 2004
  3. Replies:
    4
    Views:
    108
    Robert Klemme
    Feb 23, 2005
  4. hmmm
    Replies:
    3
    Views:
    146
    Robert Klemme
    Jan 11, 2006
  5. Prince Nez
    Replies:
    3
    Views:
    240
    Robert Klemme
    Aug 18, 2009
Loading...

Share This Page