FAQ
Python 2.6 can run a zip file, searching for __main__.py in the root
of the zip archive and running it.
How can I create such an archive using distutils (and not
setuptools) ?

If I use
# python setup.py bdist --format=zip
I get a "dumb" zip file with a deep tree structure from "/" and I
cannot put the __main__.py in the root archive

If I use
# python setup.py sdist --format=zip
I get a more compact tree. But the tree start bellow directory named
"mypackage-version",

my-package-1.0/
setup.py
__main__.py
........

If I use setuptool, generating .EGG I get exacly what I want !
But I read it is bad to use setuptool and EGGs since pip is
available :-)

I was hopping distutils have been updated when adding the zip trick,
but I didn't find the trick.

Help

Search Discussions

  • Alain.spineux at Feb 15, 2011 at 9:45 am
    I answer myself to put my question on top of the list again.

    On Feb 12, 7:47?pm, aspineux wrote:
    Python 2.6 can run a zip file, searching for __main__.py in the root
    of the zip archive and running it.
    How can I create such an archive using distutils (and not
    setuptools) ?

    If I use
    # python setup.py bdist --format=zip
    I get a "dumb" zip file with a deep tree structure from "/" and I
    cannot put the __main__.py in the root archive

    If I use
    # python setup.py sdist --format=zip
    I get a more compact tree. But the tree start bellow directory named
    "mypackage-version",

    my-package-1.0/
    ? setup.py
    ? __main__.py
    ? ........

    If I use setuptool, generating .EGG I get exacly what I want !
    But I read it is bad to use setuptool and EGGs since pip is
    available :-)

    I was hopping distutils have been updated when adding the zip trick,
    but I didn't find the trick.

    Help

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedFeb 12, '11 at 6:47p
activeFeb 15, '11 at 9:45a
posts2
users2
websitepython.org

2 users in discussion

Alain.spineux: 1 post Aspineux: 1 post

People

Translate

site design / logo © 2022 Grokbase