aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools.txt
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-09-22 00:09:06 +0000
committerPJ Eby <distutils-sig@python.org>2006-09-22 00:09:06 +0000
commitae347c1ed3e39fb2c00b8b9fc8aedcf507313c20 (patch)
tree2d8a9c2f40a70b768050625aa200b49d3325ebd2 /setuptools.txt
parent4ef57c26cbeee3f3afd21f86877bbdcadf0f69c1 (diff)
downloadexternal_python_setuptools-ae347c1ed3e39fb2c00b8b9fc8aedcf507313c20.tar.gz
external_python_setuptools-ae347c1ed3e39fb2c00b8b9fc8aedcf507313c20.tar.bz2
external_python_setuptools-ae347c1ed3e39fb2c00b8b9fc8aedcf507313c20.zip
Add support for "eggsecutable" headers: a /bin/sh script that is prepended
to an .egg file to allow it to be run as a script on Unix-ish platforms. (This is mainly so that setuptools itself can have a single-file installer on Unix, without doing multiple downloads, dealing with firewalls, etc.) (Backport from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4051969
Diffstat (limited to 'setuptools.txt')
-rwxr-xr-xsetuptools.txt43
1 files changed, 43 insertions, 0 deletions
diff --git a/setuptools.txt b/setuptools.txt
index 43e0e610..26874c88 100755
--- a/setuptools.txt
+++ b/setuptools.txt
@@ -498,6 +498,43 @@ on "entry points" in general, see the section below on `Dynamic Discovery of
Services and Plugins`_.
+"Eggsecutable" Scripts
+----------------------
+
+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 excecutable
+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``.
+
+This feature is primarily intended to support bootstrapping the installation of
+setuptools itself on non-Windows platforms, but may also be useful for other
+projects as well.
+
+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.
+
+
Declaring Dependencies
======================
@@ -2567,6 +2604,12 @@ Release Notes/Change History
* Fix ``upload`` command not uploading files built by ``bdist_rpm`` or
``bdist_wininst`` under Python 2.3 and 2.4.
+ * Add support for "eggsecutable" headers: a ``#!/bin/sh`` script that is
+ prepended to an ``.egg`` file to allow it to be run as a script on Unix-ish
+ platforms. (This is mainly so that setuptools itself can have a single-file
+ installer on Unix, without doing multiple downloads, dealing with firewalls,
+ etc.)
+
0.6c3
* Fixed breakages caused by Subversion 1.4's new "working copy" format