[Distutils] bdist_eggs soiling pure packages

Phillip J. Eby pje at telecommunity.com
Wed May 9 20:26:01 CEST 2007

At 12:14 PM 5/5/2007 +0200, Christoph Zwerschke wrote:
>I just stumbled over the following problem, maybe someone can help me
>understand whether its a problem that should be fixed in setuptools or
>whether I'm misunderstanding something.
>I was packaging an application (a TurboGears quickstarted project) that
>has one a pure Python start script with bdist_egg. I'm using
>/usr/bin/env for finding the Python interpreter in the shebang line of
>the start script in order to make the whole thing as platform
>independent as possible.
>Now bdist_egg replaces my shebang line with the path to the python
>interpreter of the build platform. I just saw that this was already
>mentioned as a problem on the list recently:
>I agree that this should be changed as suggested there.
>Currently, even though an application may be completely platform
>independent, setuptools creates "impure" eggs by putting a platform
>dependent path into the scripts. I.e. I cannot package the application
>on one platform and easy_installing it on a different platform.
>I think the real problem is that setuptools replaces the shebang line
>when *building* the egg, not when *installing* the egg.

Use entry point scripts instead; they don't have this problem:


More information about the Distutils-SIG mailing list