[Distutils] Newbie questions about setuptools

Edward Ream edreamleo at charter.net
Tue Jun 19 16:45:53 CEST 2007


I have some questions and comments about setuptools and easy_install.

What I like best about setuptools is that setup eliminates the need to
maintain manifest.in and MANIFEST files.  Assuming that everything in the
cvs tree is part of the distribution is a clever idea, and it works for me.
This is reason enough for me to want to use setuptools.

However, I have the following problems with setuptools.  These are serious
enough so that for now I just use setuptools to create .zip files.

1. On both XP and Ubuntu, running

python setup.py bdist_egg

gives a .egg file with a suffix of py2.5.egg, even though the version arg to
setup is '4.4.3preview9' I was expecting a suffix of all.egg, because
platforms = ['all',] Can anyone explain what is going on?

Here is the complete call to setup:

setuptools.setup (
    name='leo',
    version='4.4.3preview9',
    author='Edward K. Ream',
    author_email='edreamleo at charter.net',
    url='http://webpages.charter.net/edreamleo/front.html',
    download_url='http://downloads.sourceforge.net/leo/leo-4.4.3preview9.egg',
    packages = setuptools.find_packages(),
    include_package_data = True,
    exclude_package_data = { '': ['*.pyc','*.pyo']},
    zip_safe=False,
    install_requires=[],
    description = 'Leo: Literate Editor with Outlines',
    license='Python',
    platforms=['all',],
    long_description = long_description,
    keywords = 'outline, outliner, ide, editor, literate programming',
)

2.  The resulting egg file is much larger than the .zip file created by
'python setup.py sdist' in spite of exclude_package_data = { '':
['*.pyc','*.pyo']},

Is there any way to exclude .pyc and .pyo files?

3. 'python setup.py register' works fine, but 'python setup.py upload' fails
with an 'invalid request' returned from the server.  Maybe because the egg
is over 8Meg?

4. 'easy_install leo' is supposed to use the download_url link arg.  This is
a great idea.  Alas, for me it is spoiled by the setuptools pre/post release
naming convention. The problem is that this convention is applied to all the
links on the download_url page.  Because I can't upload to the Python Cheese
Shop, I used Leo's SourceForge download page for the main Leo project.  The
setup.py script is supposed to find the latest release on the page, but
setup.py thinks that the latest match is something like Leo-4.2.1.zip (!!)
This in spite of the fact that Leo-4.4.3rc1.zip exists on the page.

I can't change the filenames on Leo's SourceForge page, and I can't change
setuptools's naming conventions.  How is 'easy_install leo' going to find
the proper version?

5. setuptools is advertised as an 0.x release.  This post appeared over a
year ago,

http://bitworking.org/news/Please_stop_using_setuptools__at_least_exclusively__for_now____

This post may be obsolete, but it troubles me.  I suppose I wouldn't worry
so much were it not for these other issues.

Any help would be greatly appreciated.  Thanks.

Edward
--------------------------------------------------------------------
Edward K. Ream   email:  edreamleo at charter.net
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------





More information about the Distutils-SIG mailing list