summaryrefslogtreecommitdiff
path: root/pkg_resources.py
Commit message (Collapse)AuthorAgeFilesLines
* Added the ``extras`` attribute to ``Distribution``, the ``find_plugins()``PJ Eby2006-02-141-7/+130
| | | | | | | | | method to ``WorkingSet``, and the ``__add__()`` and ``__iadd__()`` methods to ``Environment``. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4042358
* Added ``Distribution.clone()`` method, and keyword argument support toPJ Eby2006-02-071-10/+51
| | | | | | | | | | other ``Distribution`` constructors. Added the ``DEVELOP_DIST`` precedence, and automatically assign it to eggs using ``.egg-info`` format. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4042259
* Implement more Mac OS X version handling stuff requested by BobPJ Eby2006-02-071-23/+23
| | | | | | | | Ippolito. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4042256
* Honor get_platform() for Mac OS X if it starts with 'macosx-'PJ Eby2006-02-041-4/+4
| | | | | | --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4042231
* ``safe_name()`` now allows dots in project names, and there is a newPJ Eby2006-01-101-11/+11
| | | | | | | | | | | | | | | ``to_filename()`` function that escapes project names and versions for safe use in constructing egg filenames from a Distribution object's metadata. Note that allowing dots may now cause problems for projects with '.' in the name that were previously installed, since such projects had to be spelled with a '-' before. The '-' name will no longer match the '.' project, and there is no real room for backward compatibility here. :( --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041994
* PyPI searches now use the exact spelling of requirements specified onPJ Eby2006-01-071-10/+10
| | | | | | | | | | | the command line or in a project's ``install_requires``. Previously, a normalized form of the name was used, which could lead to unnecessary full-index searches when a project's name had an underscore (``_``) in it. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041942
* Make it clearer that Requirement.parse() is the only way for usersPJ Eby2006-01-031-3/+3
| | | | | | | | to create correct Requirement instances. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041909
* Modify resource extraction to bypass sandbox control so that eggPJ Eby2005-12-151-16/+16
| | | | | | | | extraction during setup runs is not restricted. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041701
* Improve startup performance when sys.path contains a lot of eggs, byPJ Eby2005-12-151-11/+11
| | | | | | | | | | caching normalized versions of path entries. It appears that normalizing paths using os.path.realpath is extremely expensive on at least Windows. Caching cuts the overhead by around 30X. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041698
* Changed ``parse_version()`` to remove dashes before pre-release tags, soPJ Eby2005-12-061-2/+2
| | | | | | | | | | | that ``0.2-rc1`` is considered an *older* version than ``0.2``, and is equal to ``0.2rc1``. The idea that a dash *always* meant a post-release version was highly non-intuitive to setuptools users and Python developers, who seem to want to use ``-rc`` version numbers a lot. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041630
* Remove unneeded code that slipped into last commit.PJ Eby2005-12-061-1/+1
| | | | | | --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041616
* Added support for ``.egg-info`` files or directories with version/platformPJ Eby2005-12-061-29/+29
| | | | | | | | | | | information embedded in the filename, so that system packagers have the option of including ``PKG-INFO`` files to indicate the presence of a system-installed egg, without needing to use ``.egg`` directories, zipfiles, or ``.pth`` manipulation. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041615
* If more than one URL appears to describe the exact same distribution, preferPJ Eby2005-11-261-1/+1
| | | | | | | | | the shortest one. This helps to avoid "table of contents" CGI URLs like the ones on effbot.org. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041550
* Don't raise an error when an invalid (unfinished) distribution is foundPJ Eby2005-11-181-22/+22
| | | | | | | | | unless absolutely necessary. Warn about skipping invalid/unfinished eggs when building an Environment. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041469
* Fixed a problem with nested namespace packages (e.g. ``peak.util``) notPJ Eby2005-11-131-9/+9
| | | | | | | | being set as an attribute of their parent package. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041431
* Normalize items in sys.path when determining where to insertPJ Eby2005-11-091-1/+1
| | | | | | | | a new item. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041408
* * Improved runtime conflict warning message to identify a line in the user'sPJ Eby2005-11-041-15/+15
| | | | | | | | | | | program, rather than flagging the ``warn()`` call in ``pkg_resources``. * Avoid giving runtime conflict warnings for namespace packages, even if they were declared by a different package than the one currently being activated. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041391
* Fixed a problem with ``WorkingSet.resolve()`` that prevented versionPJ Eby2005-11-031-1/+1
| | | | | | | | conflicts from being detected at runtime. (As reported by Ian Bicking.) --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041380
* Fixed a problem extracting zipped files on Windows, when the egg inPJ Eby2005-10-221-5/+5
| | | | | | | | question has had changed contents but still has the same version number. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041267
* Hurray! Our first dependency processing bug! This is cool because itPJ Eby2005-10-181-1/+1
| | | | | | | | | | | | | means that people are finally doing enough things with setuptools to have real-life version conflict scenarios. Luckily, the fix is trivial: use breadth-first instead of depth-first dependency processing, which I thought we were already doing anyway, but weren't. And we were giving precedence to already-installed packages, which means upgrades didn't work so well. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041265
* Significantly enhanced support and docs for "non-root" installation,PJ Eby2005-10-171-10/+51
| | | | | | | | | | | | | | | | | | | | including both "virtual" and PYTHONPATH-based installs. The activation precedence of distributions has also changed so that PYTHONPATH-based non-root installs can include eggs that override system-defined packages (whether managed or unmanaged). This version should eliminate most common installation complaints from non-root Python users. Note: this version includes a hacked 'site.py' to support processing .pth files in directories that come *before* site-packages on sys.path. However, because of its placement, it should only come into play when a user puts the setuptools .egg file *directly* on PYTHONPATH, so it doesn't affect "virtual" or "root" installations. It's strictly to provide support for luddites who refuse to give up their existing non-root PYTHONPATH setup unless you pry it from their cold, dead hands. :) --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041262
* Ensure that WorkingSet.resolve() (and therefore require() as well)PJ Eby2005-09-261-7/+7
| | | | | | | | | | returns a list of the relevant distributions, even if they are found in the working set rather than the environment. This fixes some problems in the 0.6a3 release. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041256
* Fix a problem with inconsistent quoting of "extras", reported by IanPJ Eby2005-09-241-15/+15
| | | | | | | | Bicking on the distutils-sig. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041253
* Implement smart version conflict resolution for scripts, so thatPJ Eby2005-09-241-21/+21
| | | | | | | | | | | | | | | installed applications will not have their eggs overridden by packages installed locally on sys.path. This should also make things work a bit better for "traditional" non-root Python setups on Unixy operating systems. See: http://mail.python.org/pipermail/distutils-sig/2005-September/005164.html for more details. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041250
* Fix namespace packages not getting fixed up when the eggs are zipped andPJ Eby2005-08-191-2/+2
| | | | | | | | | loaded late (i.e. via require). Thanks to Walter Doerwald for the bug report. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041208
* Add experimental support for merging non-empty namespace packages. ThisPJ Eby2005-08-141-14/+14
| | | | | | | | | | | | | lets you have one distribution containing a non-empty __init__.py for the package, as long as you call 'declare_namespace()' from that __init__.py and all other __init__.py files for the namespace package, and do *not* declare it as a namespace package in setup() (so that it won't be automatically imported if it's on sys.path, the way empty namespace packages are.) --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041202
* Document "Distribution" objects. Now the API reference is complete, and IPJ Eby2005-08-141-1/+1
| | | | | | | | | just need to write the Overview and Developer's Guide sections so that most people won't have to actually *read* the API reference. :) --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041197
* Make "run_script" a method of WorkingSet objects, thereby removing a globalPJ Eby2005-08-141-9/+9
| | | | | | | | coupling. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041195
* Document the "Environment" class, and simplify its API.PJ Eby2005-08-141-55/+55
| | | | | | --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041194
* Added docs for main EntryPoint APIs, and cleaned up the API itself a bit.PJ Eby2005-08-131-20/+20
| | | | | | | | Also fixed a few bugs. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041192
* Fix bugs reported by Ian Bicking, Walter Doerwald, and Vincenzo Di Massa.PJ Eby2005-08-111-2/+2
| | | | | | --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041189
* Fix a bug introduced by making split_sections() not lowercase sectionPJ Eby2005-08-091-4/+2
| | | | | | | | headings. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041188
* Add docs for exceptions, and for much of the ResourceManager API.PJ Eby2005-08-071-27/+27
| | | | | | --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041186
* Document utility routines. Made ``split_sections()`` not lowercase itsPJ Eby2005-08-071-12/+14
| | | | | | | | | section headers any more, since e.g. entry point group names are case-sensitive. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041185
* Renamed AvailableDistributions -> Environment. Add sketch of pkg_resourcesPJ Eby2005-08-071-6/+6
| | | | | | | | manual outline. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041184
* Fix WorkingSet yielding the same distribution more than once if more thanPJ Eby2005-08-061-23/+23
| | | | | | | | one path entry points to it. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041182
* Allow specifying an environment and/or installer for entry-point loading.PJ Eby2005-08-061-4/+4
| | | | | | | | | This will be used by setuptools to automatically install eggs that may be needed as part of a build process, or to invoke a particular command. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041179
* Performance boosts: don't create environment during require()/resolve()PJ Eby2005-08-061-10/+10
| | | | | | | | | | | if all requirements can be met with items already in the working set. Don't eagerly determine whether a path is a directory. Avoid redundant path operations, etc. These changes dropped the test suite runtime from over 3.4 seconds to around .34 seconds. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041176
* Fix a problem with zip paths reported by Ashley Walsh.PJ Eby2005-08-031-1/+1
| | | | | | --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041173
* Misc. bugs reported by Ian Bicking and Ashley Walsh.PJ Eby2005-07-311-2/+2
| | | | | | --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041168
* Misc. bug fixes and doc additions. Add 'iter_entry_points()' API.PJ Eby2005-07-251-58/+56
| | | | | | --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041153
* Implement "entry points" for dynamic discovery of drivers and plugins.PJ Eby2005-07-241-40/+247
| | | | | | | | | | Change setuptools to discover setup commands using an entry point group called "distutils.commands". Thanks to Ian Bicking for the suggestion that led to designing this super-cool feature. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041152
* Fix eager resource extraction. Add eager_resources setup() argument. AddPJ Eby2005-07-241-73/+73
| | | | | | | | | support for obtaining project-level resources by making get_provider() accept Requirement objects. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041151
* Improved backward compatibility of Mac OS platform string changes, thanksPJ Eby2005-07-211-18/+59
| | | | | | | | to more help from Kevin Dangoor. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041143
* Tweak Mac OS platform string based on Mac SIG feedback: remove "micro"PJ Eby2005-07-211-7/+7
| | | | | | | | version number, and map "PowerPC" and "Power_Macintosh" to "ppc". --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041142
* Added support for handling MacOS platform information in ``.egg``PJ Eby2005-07-211-20/+61
| | | | | | | | | | | | | filenames, based on a contribution by Kevin Dangoor. (NOTE: this may make eggs compiled for OS X with older versions of setuptools unusable! If you have eggs whose file/directory names end with ``-darwin-*.egg``, you will probably need to rename them to ``-macosx-*.egg``, substituting your current Mac OS version for the darwin kernel version in the version number. Or, you can just delete and reinstall the problematic eggs.) --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041141
* Catch a few missed terminology changes.PJ Eby2005-07-181-8/+8
| | | | | | --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041137
* Massive API refactoring; see setuptools.txt changelog for details. Also,PJ Eby2005-07-181-1/+1
| | | | | | | | | add ``#egg=project-version`` link support, and docs on how to make your package available for EasyInstall to find. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041136
* Massive API refactoring; see setuptools.txt changelog for details. Also,PJ Eby2005-07-181-138/+299
| | | | | | | | | add ``#egg=project-version`` link support, and docs on how to make your package available for EasyInstall to find. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041135
* The ``path`` attribute of ``Distribution`` objects is now ``location``,PJ Eby2005-07-171-25/+28
| | | | | | | | | | | because it isn't necessarily a filesystem path (and hasn't been for some time now). ``Distribution`` objects now have an ``as_requirement()`` method that returns a ``Requirement`` for the distribution's project name and version. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041134