The PEAK Developers' Center   Diff for "setuptools" UserPreferences
 
HelpContents Search Diffs Info Edit Subscribe XML Print View
Differences between version dated 2006-10-11 14:54:40 and 2009-10-20 10:09:23 (spanning 17 versions)
Deletions are marked like this.
Additions are marked like this.

            '': ['*.txt', '*.rst'],
            # And include any *.msg files found in the 'hello' package, too:
            'hello': ['*.msg'],
        },
        }
 
        # metadata for upload to PyPI
        author = "Me",

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
======================
 

you use any option at all.
 
(By the way, if you're using some other revision control system, you might
consider submitting a patch to the ``setuptools.command.sdist`` module,
so we can include support for your system.)
consider creating and publishing a `revision control plugin for setuptools`_.)
 
 
.. _revision control plugin for setuptools: `Adding Support for Other Revision Control Systems`_
 
 
Making your package available for EasyInstall

    a requirement can be met using a distribution that is already available in
    a directory on ``sys.path``, it will not be copied to the staging area.
 
``--egg-path=DIR``
    Force the generated ``.egg-link`` file to use a specified relative path
    to the source directory. This can be useful in circumstances where your
    installation directory is being shared by code running under multiple
    platforms (e.g. Mac and Windows) which have different absolute locations
    for the code under development, but the same *relative* locations with
    respect to the installation directory. If you use this option when
    installing, you must supply the same relative path when uninstalling.
 
In addition to the above options, the ``develop`` command also accepts all of
the same options accepted by ``easy_install``. If you've configured any
``easy_install`` settings in your ``setup.cfg`` (or other distutils config

 
``--repository=URL, -r URL``
    The URL of the repository to upload to. Defaults to
    http://www.python.org/pypi (i.e., the main PyPI installation).
    http://pypi.python.org/pypi (i.e., the main PyPI installation).
 
 
------------------------------------

  inform the user of the missing program(s).
 
 
A Note Regarding Dependencies
-----------------------------
 
If the project *containing* your distutils/setuptools extension(s) depends on
any projects other than setuptools, you *must* also declare those dependencies
as part of your project's ``setup_requires`` keyword, so that they will
already be built (and at least temprorarily installed) before your extension
project is built.
 
So, if for example you create a project Foo that includes a new file finder
plugin, and Foo depends on Bar, then you *must* list Bar in both the
``install_requires`` **and** ``setup_requires`` arguments to ``setup()``.
 
If you don't do this, then in certain edge cases you may cause setuptools to
try to go into infinite recursion, trying to build your dependencies to resolve
your dependencies, while still building your dependencies. (It probably won't
happen on your development machine, but it *will* happen in a full build
pulling everything from revision control on a clean machine, and then you or
your users will be scratching their heads trying to figure it out!)
 
 
Subclassing ``Command``
-----------------------
 

Release Notes/Change History
----------------------------
 
0.6c11
 * Fix "bdist_wininst upload" trying to upload same file twice
 
0.6c10
 * Fix for the Python 2.6.3 build_ext API change
 
 * Ensure C libraries (as opposed to extensions) are also built when doing
   bdist_egg
 
 * Support for SVN 1.6
 
0.6c9
 * Fixed a missing files problem when using Windows source distributions on
   non-Windows platforms, due to distutils not handling manifest file line
   endings correctly.
 
 * Updated Pyrex support to work with Pyrex 0.9.6 and higher.
 
 * Minor changes for Jython compatibility, including skipping tests that can't
   work on Jython.
 
 * Fixed not installing eggs in ``install_requires`` if they were also used for
   ``setup_requires`` or ``tests_require``.
 
 * Fixed not fetching eggs in ``install_requires`` when running tests.
 
 * Allow ``ez_setup.use_setuptools()`` to upgrade existing setuptools
   installations when called from a standalone ``setup.py``.
 
 * Added a warning if a namespace package is declared, but its parent package
   is not also declared as a namespace.
 
 * Support Subversion 1.5
 
 * Removed use of deprecated ``md5`` module if ``hashlib`` is available
 
 * Fixed ``bdist_wininst upload`` trying to upload the ``.exe`` twice
 
 * Fixed ``bdist_egg`` putting a ``native_libs.txt`` in the source package's
   ``.egg-info``, when it should only be in the built egg's ``EGG-INFO``.
 
 * Ensure that _full_name is set on all shared libs before extensions are
   checked for shared lib usage. (Fixes a bug in the experimental shared
   library build support.)
 
 * Fix to allow unpacked eggs containing native libraries to fail more
   gracefully under Google App Engine (with an ``ImportError`` loading the
   C-based module, instead of getting a ``NameError``).
 
0.6c7
 * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and
   ``egg_info`` command failing on new, uncommitted SVN directories.
 
 * Fix import problems with nested namespace packages installed via
   ``--root`` or ``--single-version-externally-managed``, due to the
   parent package not having the child package as an attribute.
 
0.6c6
 * Added ``--egg-path`` option to ``develop`` command, allowing you to force
   ``.egg-link`` files to use relative paths (allowing them to be shared across
   platforms on a networked drive).
 
 * Fix not building binary RPMs correctly.
 
 * Fix "eggsecutables" (such as setuptools' own egg) only being runnable with
   bash-compatible shells.
 
 * Fix ``#!`` parsing problems in Windows ``.exe`` script wrappers, when there
   was whitespace inside a quoted argument or at the end of the ``#!`` line
   (a regression introduced in 0.6c4).
 
 * Fix ``test`` command possibly failing if an older version of the project
   being tested was installed on ``sys.path`` ahead of the test source
   directory.
 
 * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in
   their names as packages.
 
0.6c5
 * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg``
   packages under Python versions less than 2.5.
 
 * Fix uploaded ``bdist_wininst`` packages being described as suitable for
   "any" version by Python 2.5, even if a ``--target-version`` was specified.
 
0.6c4
 * Overhauled Windows script wrapping to support ``bdist_wininst`` better.
   Scripts installed with ``bdist_wininst`` will always use ``#!python.exe`` or
   ``#!pythonw.exe`` as the executable name (even when built on non-Windows
   platforms!), and the wrappers will look for the executable in the script's
   parent directory (which should find the right version of Python).
 
 * 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.)
 
 * Fix problem with empty revision numbers in Subversion 1.4 ``entries`` files
 
 * Use cross-platform relative paths in ``easy-install.pth`` when doing
   ``develop`` and the source directory is a subdirectory of the installation
   target directory.
 
 * Fix a problem installing eggs with a system packaging tool if the project
   contained an implicit namespace package; for example if the ``setup()``
   listed a namespace package ``foo.bar`` without explicitly listing ``foo``
   as a namespace package.
 
0.6c3
 * Fixed breakages caused by Subversion 1.4's new "working copy" format
 

   receive an ``args`` option containing the rest of the command line.
 
0.3a2
 * Added new options to ``bdist_egg`` to `allow tagging`_ the egg's version number
 * Added new options to ``bdist_egg`` to allow tagging the egg's version number
   with a subversion revision number, the current date, or an explicit tag
   value. Run ``setup.py bdist_egg --help`` to get more information.
 

0.3a1
 * Initial release.
 
.. _allow tagging the: http://grin-optics.org/
Mailing list
============
 
Mailing List and Bug Tracker
============================
 
Please use the `distutils-sig mailing list`_ for questions and discussion about
setuptools.
setuptools, and the `setuptools bug tracker`_ ONLY for issues you have
confirmed via the list are actual bugs, and which you have reduced to a minimal
set of steps to reproduce.
 
.. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/
.. _setuptools bug tracker: http://bugs.python.org/setuptools/
 

PythonPowered
ShowText of this page
EditText of this page
FindPage by browsing, title search , text search or an index
Or try one of these actions: AttachFile, DeletePage, LikePages, LocalSiteMap, SpellCheck