Commit Graph

3145 Commits

Author SHA1 Message Date
PJ Eby 0398b84fb3 Enhance unpack_* utilities to allow on-the-fly redirection of where files
are extracted to.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041066
2005-06-15 02:11:09 +00:00
PJ Eby d4efc98ade Bump version # for release.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041065
2005-06-14 15:48:44 +00:00
PJ Eby 8a1ba5d6cd Add support for quiet/verbose/dry-run/optimize flags.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041064
2005-06-14 15:30:32 +00:00
PJ Eby a085f6619e Support downloading packages that were uploaded to PyPI (by scanning all
links on package pages, not just the homepage/download links).

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041062
2005-06-14 12:46:35 +00:00
PJ Eby 0c5da9d627 Update to version 0.4a3
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041059
2005-06-14 01:29:59 +00:00
PJ Eby 5c31d27554 Add lots of progress messages, so people know what the package search is
doing.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041056
2005-06-14 01:26:26 +00:00
PJ Eby 26a5ebfbad Add 'ez_setup' bootstrap installer. Prep for 0.4a2 release.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041054
2005-06-12 21:47:34 +00:00
PJ Eby 18b9ae1e5d Restructure easy_install as a distutils "Command" object, so that it can
access the distutils configuration and logging infrastructure, and can
"inherit" options from a distutils setup script that wants to use it to
install its own dependencies.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041052
2005-06-12 15:49:54 +00:00
PJ Eby 8f64fbe5e5 Move package index/downloading stuff to setuptools.package_index module.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041051
2005-06-12 03:44:07 +00:00
PJ Eby 449f35743f Rebalance responsibilities between PackageIndex, Installer, and main() so
that PackageIndex handles all downloading of any kind, Installers can be
reused for multiple packages, and main() manages temporary directories and
all communication between PackageIndex and Installer.  Also, change
run_setup to take an argument sequence, because later we will probably need
other arguments to control other aspects of run_setup's behavior.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041050
2005-06-12 03:07:53 +00:00
PJ Eby 43e707381e Split setup-running and archive-extraction utilities into separate modules,
for easy use by tools other than EasyInstall.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041049
2005-06-12 01:12:34 +00:00
PJ Eby 5bb11a1a2f Package scripts under EGG-INFO/scripts. Refactor subcommand invocations
for less duplication and greater clarity.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041044
2005-06-07 04:41:51 +00:00
PJ Eby e6572cb2a6 Implement PyPI screenscraping for EasyInstall. Fix a bug in requirement
version checking.  Document new options for screen scraping.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041041
2005-06-05 21:33:51 +00:00
PJ Eby 0c9e886999 Add "safe_name" and "safe_version" functions to allow sanitizing of
distribution names and versions in arbitrary packages that might be built
using EasyInstall.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041040
2005-06-05 18:59:37 +00:00
PJ Eby 6b7bb08576 Make ``AvailableDistributions`` keep track of the desired platform/python.
Add a ``can_add()`` method that indicates whether a distribution matches
the collection's desired platform and Python version.  Fix a bug in
``Distribution.from_filename()`` when the filename has no Python version.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041038
2005-06-05 01:20:09 +00:00
PJ Eby a045316161 Ensure that the distribution name written to PKG-INFO is the same as the
name you'll use in 'require()' operations for that distribution.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041030
2005-05-30 23:22:10 +00:00
PJ Eby c3e492cc9a Reorganize bdist_egg's handling of 'install_data' to better deal with the
various kludges legacy packages are using to install data in their package
directories.  Some use absolute paths in 'distribution.data_files', while
others create various subclasses of 'install_data', each with their own
way of finding out what directory to use!  So 'bdist_egg' now does all its
'install_lib' activity before 'install_data', and pokes the desired build
directory into a wide variety of places, so that all of the known kludges
so far will work correctly.  It also checks for absolute paths in
'data_files' (carefully working around other packages' 'data_files'
kludges!) and converts them back to relative ones, if they are subpaths of
site-packages.

Clearly, we need to get the word out about 'package_files' in Python 2.4
and above, and suggest using 'setuptools' for Python 2.3.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041028
2005-05-30 06:46:01 +00:00
PJ Eby 3774798c60 Added options to alter eggs' version number by tagging with the subversion
revision number, date, and/or a custom tag.  This should make it easier for
people to produce e.g. automated nightly builds of eggs.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041024
2005-05-29 22:05:39 +00:00
PJ Eby b75164050f Handle distributions with ' ' in their names
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041020
2005-05-29 05:19:59 +00:00
PJ Eby e15ee4d46a Add experimental 'install_data' support to 'bdist_egg'. The most common
distutils custom command hack in the field is to make 'install_data'
put data in with the target packages by changing the --install-data to
match --install-lib, so this should let bdist_egg work with more packages
"out of the box".

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041016
2005-05-28 23:05:59 +00:00
PJ Eby 2237065782 Add tests for AvailableDistributions().resolve(). This effectively
completes the core dependency resolution engine; all we need now is a way
to turn sys.path entries into "distribution sources" that can list
Distribution objects for inclusion in an instance of
AvailableDistributions, and the 'require("SomePkg>=2.7")' API will be
usable.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041009
2005-05-23 01:56:27 +00:00
PJ Eby 489117c324 Added support for specifying options on requirements, so that a package's
optional dependencies can be included when processing nested dependencies.
Next up: tests for the resolve() algorithm.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041008
2005-05-22 20:28:47 +00:00
PJ Eby 1fb2b027d4 Distribution metadata parsing: distribution objects can now extract their
version from PKG-INFO and their dependencies from depends.txt, including
optional dependencies.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041007
2005-05-22 19:40:22 +00:00
PJ Eby 05d3b06a6f Refine dependency resolution algorithm so it won't take exponential time,
or bomb on cyclic dependencies.  (But it's still an untested sketch.)
Added list of things that need to be implemented before dependency
resolution can actually work.  Added tests for lower-level parts of the
dependency resolution system, and a hook to support subclasses doing
automatic download of needed dependencies.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041006
2005-05-22 18:17:00 +00:00
PJ Eby 9511ddad57 Add basic "Requirement" class that can tell whether a distribution or
version meets its version requirements.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041005
2005-05-21 21:42:57 +00:00
PJ Eby 58217442d6 Added "AvailableDistributions" class that finds and indexes usable
distributions; this replaces the previous "iter_distributions()" API.
Added basic platform support to Distribution and AvailableDistributions so
that platform-independent distros as well as local platform-compatible
distros are acceptable.  The actual platform scheme is currently delegated
to distutils.util.get_platform(), but needs to be replaced with a better
scheme of some kind, especially for OS X.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041004
2005-04-03 18:52:21 +00:00
PJ Eby 28db19795d Fix handling of -/_ so that they are canonicalized to '-' when doing name
or version comparisons, but rendered as '_' in egg filenames.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041002
2005-04-03 01:21:08 +00:00
PJ Eby 7311c34af4 Add a "Distribution" object that wraps a sys.path entry with metadata, and
can extract its name/version/pythonversion/platform if built from a .egg
filename.  Later, distributions will be able to add themselves to sys.path
and request that their dependencies be added as well.  Also, added some
real-life version test cases supplied by jemfinch.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041001
2005-04-03 00:46:58 +00:00
PJ Eby 1a7cff662b Add a simple version parser that combines the pre-release smarts of
distutils' StrictVersion, with the flexibility of LooseVersion.  It also
deals heuristically with common concepts like alpha/beta/candidate/rc
and pre/preview, as well as '-' and 'pl' branching schemes.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041000
2005-04-02 23:31:13 +00:00
PJ Eby 6d3753cc8d Rough draft of version requirement parser. Make bdist_egg look for a
distname.egg-info directory instead of EGG-INFO.in; this will be used later
to support development of egg-distributed packages that an application
under development expects to 'require()'.  (Thanks to Fred Drake for
pointing out this use case, and Bob Ippolito for helping me figure out how
to support it, although the runtime support doesn't actually exist yet.)

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040999
2005-04-02 02:43:21 +00:00
PJ Eby 0ad2e2ea4e Back out the addition of bogus 'if __name__=="__main__"' block; the One
Obvious Way to test setuptools is to run 'setup.py test', because that also
provides an integration test for the 'test' command.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040998
2005-04-01 21:28:49 +00:00
PJ Eby 5a50fc1e14 Fix bootstrap loader so extracted files don't have to be on sys.path.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040993
2005-03-22 18:55:59 +00:00
PJ Eby 79a74b06ce Create stub loaders for C extensions, so that the actual dynamic library
can be extracted from the egg.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040992
2005-03-22 00:15:03 +00:00
PJ Eby 8c07c4fa8d Allow user-supplied metadata from EGG-INFO.in directory (directory name can
be overridden with a command-line option).

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040991
2005-03-21 20:41:57 +00:00
PJ Eby 6d85a80186 Add python version to egg filename.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040990
2005-03-21 20:12:33 +00:00
PJ Eby e9230cf512 Add 'bdist_egg' command/format to allow creating "Python Eggs" (see
http://peak.telecommunity.com/DevCenter/PythonEggs for details).  This
version only supports pure libraries and does not support user-defined
metadata.  But it's sufficient to make .egg files that can be placed on
PYTHONPATH and used.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040989
2005-03-21 19:50:46 +00:00
Fred Drake ecc9eaadaa remove blank line pollution
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040905
2004-06-17 20:37:44 +00:00
Fred Drake 0f429b9bc6 fix to make things continue to work when we're *not* running under
Python 2.4; this was broken by my earlier change to avoid stomping on
Python 2.4's build_py command

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040902
2004-06-15 19:00:03 +00:00
Fred Drake dfc00cc146 Deal with the distutils on the head; package_data may already be supported.
In this case, setuptools need not override the build_py command.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040900
2004-06-14 14:15:34 +00:00
Fred Drake 9274fa3cfb remove excess blank lines, and apply whitespace more in line with the Python
style guidelines in PEP 8

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040896
2004-04-05 20:21:53 +00:00
Fred Drake 1c904e7a58 - remove trailing blank lines
- use whitespace according to the Python style guide

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040895
2004-04-05 20:02:45 +00:00
Fred Drake ba79fc03ef remove trailing blank line
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040894
2004-04-05 19:59:11 +00:00
PJ Eby 2e83526e51 Compute command line that should be passed to child setup scripts.
Warn user if unsupported options are supplied, and cancel unless
'depends -i' (aka '--ignore-extra-args') was used.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040880
2004-03-22 01:12:31 +00:00
PJ Eby 7ce55cabc5 Flesh out 'depends' command to display dependencies' status, and halt if
all requirements aren't met.  (Also, check planned install location for
the dependencies, as well as checking sys.path.)  Also:

* Allow 'Feature()' objects to include 'Require()' objects, so that
  dependencies can be optional

* 'Require()' objects can set a homepage, whose URL will be displayed by
  the 'depends' command if the dependency needs to be installed.

* Misc. fixes/refactoring of version validation to properly handle
  "unknown" versions, and to decouple version fetching from version
  checking.

* Updated TODO to remove various completed items.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040876
2004-03-20 20:52:12 +00:00
PJ Eby 8423e1ed14 Initial checkin of setuptools 0.0.1.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040869
2004-03-19 20:53:14 +00:00