On 6/18/15 4:46 PM, Dimitri Maziuk wrote:
Hi all,

I have the following directory structure:

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

If I zip this into myegg.egg and run "python myegg.egg", that runs the
top-level __main__.py. If I run "python setup.py bdist_egg" and run the
resulting egg, I get "/usr/bin/python: can't find '__main__.py'" in the
egg. That is correct: according to "unzip -l" __main__.py is not there.

How do I get it included?

Or more to the point, how do I make that egg directly executable? --
note that I want it to run a script that isn't in any of the bundled
packages (but imports from them).

(centos 6 with python 2.6 and python-setuptools-0.6.10 and centos 7 with
python 2.7 and python-setuptools-0.9.8)


Probably can't answer that without seeing setup.py where there should at least be ``packages = find_packages()``. Also sounds like you may be looking for console_scripts.





_______________________________________________
Distutils-SIG maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/distutils-sig


--
Alex Clark ยท http://aclark.net


_______________________________________________
Distutils-SIG maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to