views:

56

answers:

2

i am using setuptools to create and upload a sdist package to PyPI.

however everytime i run python setup.py sdist, it includes the dist/ folder and its contents, which i dont want . this behavoir does NOT happen when i use distutils.

here is my file structure:

/
-myModule/
--__init_.py,
-- ...
-docs/
-examples/
-dist/
setup.py

this is also my svn trunk root. here is my setup.py

import ez_setup
ez_setup.use_setuptools()

from setuptools import setup, find_packages
setup(name='mymodule',
    version='1.0',
    license='gpl',
    description='blahn',
    author='me',
    author_email='myemail',
    url='http://code.google.com/p/mymodule/',
    packages= find_packages(),
    install_requires = [
        'numpy>=1.3.0',
        'scipy>=0.7.1',
        'matplotlib>=1.0.0'
        ],
    )

when see this output, which indicates the problem

python setup.py sdist
...
making hard links in mwavepy-1.0...
hard linking MANIFEST.in -> mwavepy-1.0
hard linking ez_setup.py -> mwavepy-1.0
hard linking setup.py -> mwavepy-1.0
hard linking dist/mwavepy-1.0.tar.gz -> mwavepy-1.0/dist
hard linking dist/mwavepy-1.0.win32.exe -> mwavepy-1.0/dist
hard linking dist/mwavepy-1.0.zip -> mwavepy-1.0/dist
hard linking doc/generate_docs.py -> mwavepy-1.0/doc
hard linking doc/mwavepy.calibration.html -> mwavepy-1.0/doc
hard linking doc/mwavepy.calibrationAlgorithms.html -> mwavep
...
A: 

Try to remove find_packages() statement and replace it with

setup(
    ...
    packages = ['myModule'],
    package_dir = {'myModule' : 'myModule_path'},
    ...)
ohe
A: 

You could alternatively pass an argument to find_packages():

setup(
    #...
    packages= find_packages(exclude='dist'),
    # ...
)
jathanism