diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2020-09-23 20:25:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-23 20:25:03 -0400 |
| commit | cca3e01b03fe60945c4a01b8c23bcfa7ff0842b7 (patch) | |
| tree | 6300de4fda7c64f81ecc98e54c1ca3e3ea9bd5d5 /docs/deprecated/functionalities.txt | |
| parent | 662816b65fbbfaf4e8ff523e39a6034785a4d8eb (diff) | |
| parent | 8cca69b8ffd372ce5e3089cebbdbf92c071f3761 (diff) | |
| download | python-setuptools-git-cca3e01b03fe60945c4a01b8c23bcfa7ff0842b7.tar.gz | |
Merge pull request #2397 from pypa/feature/2093-docs-revamp
Apply docs revamp
Diffstat (limited to 'docs/deprecated/functionalities.txt')
| -rw-r--r-- | docs/deprecated/functionalities.txt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/deprecated/functionalities.txt b/docs/deprecated/functionalities.txt new file mode 100644 index 00000000..c6ea83b3 --- /dev/null +++ b/docs/deprecated/functionalities.txt @@ -0,0 +1,33 @@ +"Eggsecutable" Scripts +---------------------- + +.. deprecated:: 45.3.0 + +Occasionally, there are situations where it's desirable to make an ``.egg`` +file directly executable. You can do this by including an entry point such +as the following:: + + setup( + # other arguments here... + entry_points={ + "setuptools.installation": [ + "eggsecutable = my_package.some_module:main_func", + ] + } + ) + +Any eggs built from the above setup script will include a short executable +prelude that imports and calls ``main_func()`` from ``my_package.some_module``. +The prelude can be run on Unix-like platforms (including Mac and Linux) by +invoking the egg with ``/bin/sh``, or by enabling execute permissions on the +``.egg`` file. For the executable prelude to run, the appropriate version of +Python must be available via the ``PATH`` environment variable, under its +"long" name. That is, if the egg is built for Python 2.3, there must be a +``python2.3`` executable present in a directory on ``PATH``. + +IMPORTANT NOTE: Eggs with an "eggsecutable" header cannot be renamed, or +invoked via symlinks. They *must* be invoked using their original filename, in +order to ensure that, once running, ``pkg_resources`` will know what project +and version is in use. The header script will check this and exit with an +error if the ``.egg`` file has been renamed or is invoked via a symlink that +changes its base name.
\ No newline at end of file |
