summaryrefslogtreecommitdiff
path: root/pkg_resources.py
Commit message (Collapse)AuthorAgeFilesLines
* Snapshot pre-merger changes, mostly SSL support and a few bugfixesphillip.eby2013-05-151-15/+137
| | | | git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@88994 6015fed2-1504-0410-9fe1-9d1591cc4771
* Major updates and fixes include:phillip.eby2009-10-121-34/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix for the Python 2.6.3 build_ext API change * Support for the most recent Sourceforge download link insanity * Support for SVN 1.6 * Stop crashing on certain types of HTTP error * Stop re-trying URLs that already failed retrieval once * Fixes for various dependency management problems such as looping builds, re-downloading packages already present on sys.path (but not in a registered "site" directory), and randomly preferring local -f packages over local installed packages * Prevent lots of spurious "already imported from another path" warnings (e.g. when pkg_resources is imported late) * Ensure C libraries (as opposed to extensions) are also built when doing bdist_egg * Fixed running the "test" command under Python 2.6+ Other changes: * Misc. documentation fixes * Improved Jython support * Fewer warnings under Python 2.6+ * Warn when 'packages' uses paths instead of package names (because it causes other problems, like spurious "already imported" warnings) * Stop using /usr/bin/sw_vers on Mac OS (replaced w/'platform' module calls) Note: This is NOT a merge from Distribute; upon review, many of the tracker-submitted patches used as a basis for forking were incorrect, incomplete, introduced new bugs, or were not addressing the root causes. (E.g., one of the changes in this patch fixes three superficially unrelated issues in the setuptools bug tracker.) Careful review will be required if you want to merge this work back into Distribute. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@75384 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fix for http://bugs.python.org/setuptools/issue23phillip.eby2008-08-211-10/+10
| | | | git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@65939 6015fed2-1504-0410-9fe1-9d1591cc4771
* Misc. documentation updates/fixesphillip.eby2008-08-211-2/+3
| | | | git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@65934 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fixed issues with empty resource names for resource_listdir et al.phillip.eby2008-02-151-3/+3
| | | | git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@60847 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fix precedence issue between .egg and .egg-info packagesphillip.eby2007-09-041-2/+2
| | | | | | | when both are installed in site-packages. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@57943 6015fed2-1504-0410-9fe1-9d1591cc4771
* Misc. fixes:phillip.eby2007-05-311-1/+1
| | | | | | | | | | | * Don't treat directories with a '.' in the name as packages * Don't include ez_setup in find_packages() * HTML-decode URLs scraped from web pages (d'oh!) * Fix cache dir defaults on Windows when multiple env vars used * Doc updates git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@55711 6015fed2-1504-0410-9fe1-9d1591cc4771
* Add --local-snapshots-ok flag, to allow building eggs from projects phillip.eby2007-02-231-1/+1
| | | | | | | installed using "setup.py develop". git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@53876 6015fed2-1504-0410-9fe1-9d1591cc4771
* Get rid of 'sets' module usage under Python 2.4+, so that no warnings phillip.eby2007-02-231-2/+43
| | | | | | | are issued by Python 2.6. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@53870 6015fed2-1504-0410-9fe1-9d1591cc4771
* Support .egg-link paths being relativephillip.eby2007-02-151-1/+1
| | | | git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@53792 6015fed2-1504-0410-9fe1-9d1591cc4771
* Ensure extracted libraries have correct permissions on Posix systemsphillip.eby2007-02-081-1/+42
| | | | | | | (e.g. Cygwin, which is where I found the problem.) git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@53673 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fix "dev" versions being considered newer than release candidates. :(phillip.eby2006-09-251-1/+1
| | | | git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@52001 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fix a problem with eggs specified directly on PYTHONPATH on phillip.eby2006-07-211-3/+3
| | | | | | | | case-insensitive filesystems possibly not showing up in the default working set. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@50755 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fix a duplicate path insertion bug on case-insensitive filesystems, phillip.eby2006-06-071-11/+53
| | | | | | | found by Markku Mielityinen. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@46711 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fix entry point parsing when a standalone module name has whitespace phillip.eby2006-04-271-1/+1
| | | | | | | between it and the extras. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@45764 6015fed2-1504-0410-9fe1-9d1591cc4771
* Backport whitespace normalization from 2.5 trunk.phillip.eby2006-04-191-7/+6
| | | | git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@45554 6015fed2-1504-0410-9fe1-9d1591cc4771
* Split ``get_platform()`` into ``get_supported_platform()`` andphillip.eby2006-04-181-7/+7
| | | | | | | | ``get_build_platform()`` to work around a Mac versioning problem that caused the behavior of ``compatible_platforms()`` to be platform specific. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@45536 6015fed2-1504-0410-9fe1-9d1591cc4771
* Make errors __repr__ the same as the default exception repr in Python phillip.eby2006-04-181-2/+2
| | | | | | | 2.5, so doctests will work right. :( git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@45517 6015fed2-1504-0410-9fe1-9d1591cc4771
* Backport pkgutil, pydoc, and doctest from the 2.5 trunk to setuptools phillip.eby2006-04-181-95/+13
| | | | | | | | | | | | | 0.7 trunk. (Sideport?) Setuptools 0.7 will install these in place of the 2.3/2.4 versions (at least of pydoc and doctest) to let them work properly with eggs. pkg_resources now depends on the 2.5 pkgutil, which is included here as _pkgutil, to work around the fact that some system packagers will install setuptools without overriding the stdlib modules. But users who install their own setuptools will get them, and the system packaged people probably don't need them. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@45514 6015fed2-1504-0410-9fe1-9d1591cc4771
* Don't eagerly import namespace packages. This was the big reason for phillip.eby2006-04-141-2/+2
| | | | | | | | branching to 0.7 now, as I wanted this wart gone before anything went into Python 2.5. But it's gone now, yay! git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@45403 6015fed2-1504-0410-9fe1-9d1591cc4771
* Added ``ExtractionError`` and ``ResourceManager.extraction_error()`` so thatphillip.eby2006-03-291-43/+125
| | | | | | | | | cache permission problems get a more user-friendly explanation of the problem, and so that programs can catch and handle extraction errors if they need to. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@43426 6015fed2-1504-0410-9fe1-9d1591cc4771
* Eliminate spurious warnings due to case-insensitive file systemsphillip.eby2006-03-281-2/+2
| | | | git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@43403 6015fed2-1504-0410-9fe1-9d1591cc4771
* Added the ``extras`` attribute to ``Distribution``, the ``find_plugins()``phillip.eby2006-02-141-7/+130
| | | | | | | | method to ``WorkingSet``, and the ``__add__()`` and ``__iadd__()`` methods to ``Environment``. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@42358 6015fed2-1504-0410-9fe1-9d1591cc4771
* Added ``Distribution.clone()`` method, and keyword argument support to phillip.eby2006-02-071-10/+51
| | | | | | | | | other ``Distribution`` constructors. Added the ``DEVELOP_DIST`` precedence, and automatically assign it to eggs using ``.egg-info`` format. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@42259 6015fed2-1504-0410-9fe1-9d1591cc4771
* Implement more Mac OS X version handling stuff requested by Bobphillip.eby2006-02-071-23/+23
| | | | | | | Ippolito. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@42256 6015fed2-1504-0410-9fe1-9d1591cc4771
* Honor get_platform() for Mac OS X if it starts with 'macosx-'phillip.eby2006-02-041-4/+4
| | | | git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@42231 6015fed2-1504-0410-9fe1-9d1591cc4771
* ``safe_name()`` now allows dots in project names, and there is a newphillip.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. :( git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41994 6015fed2-1504-0410-9fe1-9d1591cc4771
* PyPI searches now use the exact spelling of requirements specified on phillip.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. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41942 6015fed2-1504-0410-9fe1-9d1591cc4771
* Make it clearer that Requirement.parse() is the only way for users phillip.eby2006-01-031-3/+3
| | | | | | | to create correct Requirement instances. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41909 6015fed2-1504-0410-9fe1-9d1591cc4771
* Modify resource extraction to bypass sandbox control so that eggphillip.eby2005-12-151-16/+16
| | | | | | | extraction during setup runs is not restricted. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41701 6015fed2-1504-0410-9fe1-9d1591cc4771
* Improve startup performance when sys.path contains a lot of eggs, byphillip.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. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41698 6015fed2-1504-0410-9fe1-9d1591cc4771
* Changed ``parse_version()`` to remove dashes before pre-release tags, sophillip.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. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41630 6015fed2-1504-0410-9fe1-9d1591cc4771
* Remove unneeded code that slipped into last commit.phillip.eby2005-12-061-1/+1
| | | | git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41616 6015fed2-1504-0410-9fe1-9d1591cc4771
* Added support for ``.egg-info`` files or directories with version/platformphillip.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. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41615 6015fed2-1504-0410-9fe1-9d1591cc4771
* If more than one URL appears to describe the exact same distribution, preferphillip.eby2005-11-261-1/+1
| | | | | | | | the shortest one. This helps to avoid "table of contents" CGI URLs like the ones on effbot.org. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41550 6015fed2-1504-0410-9fe1-9d1591cc4771
* Don't raise an error when an invalid (unfinished) distribution is foundphillip.eby2005-11-181-22/+22
| | | | | | | | unless absolutely necessary. Warn about skipping invalid/unfinished eggs when building an Environment. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41469 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fixed a problem with nested namespace packages (e.g. ``peak.util``) notphillip.eby2005-11-131-9/+9
| | | | | | | being set as an attribute of their parent package. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41431 6015fed2-1504-0410-9fe1-9d1591cc4771
* Normalize items in sys.path when determining where to insertphillip.eby2005-11-091-1/+1
| | | | | | | a new item. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41408 6015fed2-1504-0410-9fe1-9d1591cc4771
* * Improved runtime conflict warning message to identify a line in the user'sphillip.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. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41391 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fixed a problem with ``WorkingSet.resolve()`` that prevented versionphillip.eby2005-11-031-1/+1
| | | | | | | conflicts from being detected at runtime. (As reported by Ian Bicking.) git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41380 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fixed a problem extracting zipped files on Windows, when the egg inpje2005-10-221-5/+5
| | | | | | | question has had changed contents but still has the same version number. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41267 6015fed2-1504-0410-9fe1-9d1591cc4771
* Hurray! Our first dependency processing bug! This is cool because itpje2005-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. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41265 6015fed2-1504-0410-9fe1-9d1591cc4771
* Significantly enhanced support and docs for "non-root" installation,pje2005-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. :) git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41262 6015fed2-1504-0410-9fe1-9d1591cc4771
* Ensure that WorkingSet.resolve() (and therefore require() as well)pje2005-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. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41256 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fix a problem with inconsistent quoting of "extras", reported by Ianpje2005-09-241-15/+15
| | | | | | | Bicking on the distutils-sig. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41253 6015fed2-1504-0410-9fe1-9d1591cc4771
* Implement smart version conflict resolution for scripts, so thatpje2005-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. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41250 6015fed2-1504-0410-9fe1-9d1591cc4771
* Fix namespace packages not getting fixed up when the eggs are zipped andpje2005-08-191-2/+2
| | | | | | | | loaded late (i.e. via require). Thanks to Walter Doerwald for the bug report. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41208 6015fed2-1504-0410-9fe1-9d1591cc4771
* Add experimental support for merging non-empty namespace packages. Thispje2005-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.) git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41202 6015fed2-1504-0410-9fe1-9d1591cc4771
* Document "Distribution" objects. Now the API reference is complete, and Ipje2005-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. :) git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41197 6015fed2-1504-0410-9fe1-9d1591cc4771
* Make "run_script" a method of WorkingSet objects, thereby removing a globalpje2005-08-141-9/+9
| | | | | | | coupling. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41195 6015fed2-1504-0410-9fe1-9d1591cc4771