diff options
| author | PJ Eby <distutils-sig@python.org> | 2005-08-06 18:46:28 +0000 |
|---|---|---|
| committer | PJ Eby <distutils-sig@python.org> | 2005-08-06 18:46:28 +0000 |
| commit | 8a29467d941a7983d5f6eadc5c0e1624417944b6 (patch) | |
| tree | b270afe3a01c9bead94060de3c3adfa590bd933f /setuptools/__init__.py | |
| parent | a762d97ea517f64a405d82ad7acaa85d3eb30c39 (diff) | |
| download | python-setuptools-git-8a29467d941a7983d5f6eadc5c0e1624417944b6.tar.gz | |
Enhanced setuptools infrastructure to support distutils extensions that
can be plugged in at setup() time to define new setup() arguments or
distutils commands. This allows modularization and reuse of distutils
extensions in a way that was previously not possible.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041180
Diffstat (limited to 'setuptools/__init__.py')
| -rw-r--r-- | setuptools/__init__.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 05c4a73e..eeb2975b 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -1,6 +1,6 @@ """Extensions to the 'distutils' for large or complex distributions""" +from setuptools.dist import Distribution, Feature, _get_unpatched import distutils.core, setuptools.command -from setuptools.dist import Distribution, Feature from setuptools.extension import Extension from setuptools.depends import Require from distutils.core import Command as _Command @@ -39,17 +39,9 @@ def find_packages(where='.', exclude=()): out = [item for item in out if not fnmatchcase(item,pat)] return out -def setup(**attrs): - """Do package setup - - This function takes the same arguments as 'distutils.core.setup()', except - that the default distribution class is 'setuptools.dist.Distribution'. See - that class' documentation for details on the new keyword arguments that it - makes available via this function. - """ - attrs.setdefault("distclass",Distribution) - return distutils.core.setup(**attrs) +setup = distutils.core.setup +_Command = _get_unpatched(_Command) class Command(_Command): __doc__ = _Command.__doc__ @@ -68,6 +60,14 @@ class Command(_Command): setattr(cmd,k,v) # update command with keywords return cmd +import distutils.core +distutils.core.Command = Command # we can't patch distutils.cmd, alas + + + + + + |
