Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92836

executable egg?

X-Received by 10.50.13.97 with SMTP id g1mr45810156igc.13.1434646434828; Thu, 18 Jun 2015 09:53:54 -0700 (PDT)
X-Received by 10.182.186.7 with SMTP id fg7mr123518obc.40.1434646434798; Thu, 18 Jun 2015 09:53:54 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!h15no3821100igd.0!news-out.google.com!kd3ni10280igb.0!nntp.google.com!h15no5097123igd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Thu, 18 Jun 2015 09:53:54 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=144.92.167.179; posting-account=pe5__woAAADdVNw2dobT5IqWq42MP-my
NNTP-Posting-Host 144.92.167.179
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <d0a50110-66af-45cd-bdd2-7f8ecba68981@googlegroups.com> (permalink)
Subject executable egg?
From dmaziuk <dmaziuk@bmrb.wisc.edu>
Injection-Date Thu, 18 Jun 2015 16:53:54 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.python:92836

Show key headers only | View raw


Hi all,

Here's my directory structure:

myegg/
    pkg1/
        __init__.py
        ...
    pkg2/
        __init__.py
        ...
    pkg3/
        __init__.py
        ...
    setup.py

I can make an egg with "python setup.py bdist_egg" and it works just fine. I'd like to make it executable with "python myegg.egg" which is supposed to be doable in 2.6+. According to everything I can find, all I need is to add

myegg/
    __main__.py

The end result, however, is "/usr/bin/python: can't find '__main__' module". It is correct: checking the egg with unzip -l shows that __main__.py is indeed not in it. So I played with options for including package data, also made a stab or two at entry_points with no luck.

So, what am I missing. Or does it only work with one package in the egg?

(I'm using 2.7 & 2.6 on centos 7 & 6 resp.)
TIA,

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

executable egg? dmaziuk <dmaziuk@bmrb.wisc.edu> - 2015-06-18 09:53 -0700

csiph-web