[Distutils] executable egg & top-level __main__.py
aclark at aclark.net
Fri Jun 19 02:50:37 CEST 2015
On 6/18/15 4:46 PM, Dimitri Maziuk wrote:
> Hi all,
> I have the following directory structure:
> 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 - Distutils-SIG at python.org
Alex Clark · http://aclark.net
More information about the Distutils-SIG