diff options
| author | tarek <devnull@localhost> | 2010-02-21 22:33:29 -0500 |
|---|---|---|
| committer | tarek <devnull@localhost> | 2010-02-21 22:33:29 -0500 |
| commit | 9afb263036afa5b38d15591448b5ed7c49162e82 (patch) | |
| tree | 2991d13cc2a57602246882d668977df333f867d9 /src/distutils2/command | |
| parent | dea28b9288bf473c48d05815fcf306399eadc9fe (diff) | |
| download | disutils2-9afb263036afa5b38d15591448b5ed7c49162e82.tar.gz | |
renamed distutils to distutils2 -- wow thanks Rope
Diffstat (limited to 'src/distutils2/command')
22 files changed, 105 insertions, 105 deletions
diff --git a/src/distutils2/command/bdist.py b/src/distutils2/command/bdist.py index 4165bcd..97e8700 100644 --- a/src/distutils2/command/bdist.py +++ b/src/distutils2/command/bdist.py @@ -7,15 +7,15 @@ __revision__ = "$Id: bdist.py 77761 2010-01-26 22:46:15Z tarek.ziade $" import os -from distutils.util import get_platform -from distutils.core import Command -from distutils.errors import DistutilsPlatformError, DistutilsOptionError +from distutils2.util import get_platform +from distutils2.core import Command +from distutils2.errors import DistutilsPlatformError, DistutilsOptionError def show_formats(): """Print list of available formats (arguments to "--format" option). """ - from distutils.fancy_getopt import FancyGetopt + from distutils2.fancy_getopt import FancyGetopt formats = [] for format in bdist.format_commands: formats.append(("formats=" + format, None, diff --git a/src/distutils2/command/bdist_dumb.py b/src/distutils2/command/bdist_dumb.py index d1ceafc..0576da9 100644 --- a/src/distutils2/command/bdist_dumb.py +++ b/src/distutils2/command/bdist_dumb.py @@ -10,11 +10,11 @@ import os from sysconfig import get_python_version -from distutils.util import get_platform -from distutils.core import Command -from distutils.dir_util import remove_tree, ensure_relative -from distutils.errors import DistutilsPlatformError -from distutils import log +from distutils2.util import get_platform +from distutils2.core import Command +from distutils2.dir_util import remove_tree, ensure_relative +from distutils2.errors import DistutilsPlatformError +from distutils2 import log class bdist_dumb (Command): diff --git a/src/distutils2/command/bdist_msi.py b/src/distutils2/command/bdist_msi.py index 7257849..158065b 100644 --- a/src/distutils2/command/bdist_msi.py +++ b/src/distutils2/command/bdist_msi.py @@ -9,12 +9,12 @@ Implements the bdist_msi command. import sys, os from sysconfig import get_python_version -from distutils.core import Command -from distutils.dir_util import remove_tree -from distutils.version import StrictVersion -from distutils.errors import DistutilsOptionError -from distutils import log -from distutils.util import get_platform +from distutils2.core import Command +from distutils2.dir_util import remove_tree +from distutils2.version import StrictVersion +from distutils2.errors import DistutilsOptionError +from distutils2 import log +from distutils2.util import get_platform import msilib from msilib import schema, sequence, text diff --git a/src/distutils2/command/bdist_rpm.py b/src/distutils2/command/bdist_rpm.py index b72bc00..6d9c7ad 100644 --- a/src/distutils2/command/bdist_rpm.py +++ b/src/distutils2/command/bdist_rpm.py @@ -9,12 +9,12 @@ import sys import os import string -from distutils.core import Command -from distutils.debug import DEBUG -from distutils.file_util import write_file -from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, +from distutils2.core import Command +from distutils2.debug import DEBUG +from distutils2.file_util import write_file +from distutils2.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsFileError, DistutilsExecError) -from distutils import log +from distutils2 import log class bdist_rpm (Command): diff --git a/src/distutils2/command/bdist_wininst.py b/src/distutils2/command/bdist_wininst.py index 96e18ad..c668f6b 100644 --- a/src/distutils2/command/bdist_wininst.py +++ b/src/distutils2/command/bdist_wininst.py @@ -11,11 +11,11 @@ import string from sysconfig import get_python_version -from distutils.core import Command -from distutils.dir_util import remove_tree -from distutils.errors import DistutilsOptionError, DistutilsPlatformError -from distutils import log -from distutils.util import get_platform +from distutils2.core import Command +from distutils2.dir_util import remove_tree +from distutils2.errors import DistutilsOptionError, DistutilsPlatformError +from distutils2 import log +from distutils2.util import get_platform class bdist_wininst (Command): @@ -239,9 +239,9 @@ class bdist_wininst (Command): title = self.title or self.distribution.get_fullname() lines.append("title=%s" % escape(title)) import time - import distutils - build_info = "Built %s with distutils-%s" % \ - (time.ctime(time.time()), distutils.__version__) + import distutils2 + build_info = "Built %s with distutils2-%s" % \ + (time.ctime(time.time()), distutils2.__version__) lines.append("build_info=%s" % build_info) return string.join(lines, "\n") @@ -317,7 +317,7 @@ class bdist_wininst (Command): # get_installer_filename() def get_exe_bytes (self): - from distutils.msvccompiler import get_build_version + from distutils2.msvccompiler import get_build_version # If a target-version other than the current version has been # specified, then using the MSVC version from *this* build is no good. # Without actually finding and executing the target version and parsing diff --git a/src/distutils2/command/build.py b/src/distutils2/command/build.py index 58ef695..57e9f7b 100644 --- a/src/distutils2/command/build.py +++ b/src/distutils2/command/build.py @@ -6,12 +6,12 @@ __revision__ = "$Id: build.py 77761 2010-01-26 22:46:15Z tarek.ziade $" import sys, os -from distutils.util import get_platform -from distutils.core import Command -from distutils.errors import DistutilsOptionError +from distutils2.util import get_platform +from distutils2.core import Command +from distutils2.errors import DistutilsOptionError def show_compilers(): - from distutils.ccompiler import show_compilers + from distutils2.ccompiler import show_compilers show_compilers() class build(Command): diff --git a/src/distutils2/command/build_clib.py b/src/distutils2/command/build_clib.py index 6886a20..3959892 100644 --- a/src/distutils2/command/build_clib.py +++ b/src/distutils2/command/build_clib.py @@ -17,13 +17,13 @@ __revision__ = "$Id: build_clib.py 77704 2010-01-23 09:23:15Z tarek.ziade $" # cut 'n paste. Sigh. import os -from distutils.core import Command -from distutils.errors import DistutilsSetupError -from distutils.ccompiler import customize_compiler -from distutils import log +from distutils2.core import Command +from distutils2.errors import DistutilsSetupError +from distutils2.ccompiler import customize_compiler +from distutils2 import log def show_compilers(): - from distutils.ccompiler import show_compilers + from distutils2.ccompiler import show_compilers show_compilers() @@ -97,7 +97,7 @@ class build_clib(Command): return # Yech -- this is cut 'n pasted from build_ext.py! - from distutils.ccompiler import new_compiler + from distutils2.ccompiler import new_compiler self.compiler = new_compiler(compiler=self.compiler, dry_run=self.dry_run, force=self.force) diff --git a/src/distutils2/command/build_ext.py b/src/distutils2/command/build_ext.py index 0495dd6..ed3e7fa 100644 --- a/src/distutils2/command/build_ext.py +++ b/src/distutils2/command/build_ext.py @@ -9,13 +9,13 @@ __revision__ = "$Id: build_ext.py 77761 2010-01-26 22:46:15Z tarek.ziade $" import sys, os, re from warnings import warn -from distutils.util import get_platform -from distutils.core import Command -from distutils.errors import * -from distutils.ccompiler import customize_compiler -from distutils.dep_util import newer_group -from distutils.extension import Extension -from distutils import log +from distutils2.util import get_platform +from distutils2.core import Command +from distutils2.errors import * +from distutils2.ccompiler import customize_compiler +from distutils2.dep_util import newer_group +from distutils2.extension import Extension +from distutils2 import log # this keeps compatibility from 2.3 to 2.5 if sys.version < "2.6": @@ -26,7 +26,7 @@ else: HAS_USER_SITE = True if os.name == 'nt': - from distutils.msvccompiler import get_build_version + from distutils2.msvccompiler import get_build_version MSVC_VERSION = int(get_build_version()) # An extension name is just a dot-separated list of Python NAMEs (ie. @@ -36,7 +36,7 @@ extension_name_re = re.compile \ def show_compilers (): - from distutils.ccompiler import show_compilers + from distutils2.ccompiler import show_compilers show_compilers() @@ -318,7 +318,7 @@ class build_ext(Command): self.rpath.append(user_lib) def run(self): - from distutils.ccompiler import new_compiler + from distutils2.ccompiler import new_compiler # 'self.extensions', as supplied by setup.py, is a list of # Extension instances. See the documentation for Extension (in @@ -750,7 +750,7 @@ class build_ext(Command): # to need it mentioned explicitly, though, so that's what we do. # Append '_d' to the python import library on debug builds. if sys.platform == "win32": - from distutils.msvccompiler import MSVCCompiler + from distutils2.msvccompiler import MSVCCompiler if not isinstance(self.compiler_obj, MSVCCompiler): template = "python%d%d" if self.debug: diff --git a/src/distutils2/command/build_py.py b/src/distutils2/command/build_py.py index 0c523fa..667437c 100644 --- a/src/distutils2/command/build_py.py +++ b/src/distutils2/command/build_py.py @@ -8,10 +8,10 @@ import os import sys from glob import glob -from distutils.core import Command -from distutils.errors import DistutilsOptionError, DistutilsFileError -from distutils.util import convert_path -from distutils import log +from distutils2.core import Command +from distutils2.errors import DistutilsOptionError, DistutilsFileError +from distutils2.util import convert_path +from distutils2 import log class build_py(Command): @@ -376,7 +376,7 @@ class build_py(Command): self.warn('byte-compiling is disabled, skipping.') return - from distutils.util import byte_compile + from distutils2.util import byte_compile prefix = self.build_lib if prefix[-1] != os.sep: prefix = prefix + os.sep diff --git a/src/distutils2/command/build_scripts.py b/src/distutils2/command/build_scripts.py index 1a2fc8b..aae0cb9 100644 --- a/src/distutils2/command/build_scripts.py +++ b/src/distutils2/command/build_scripts.py @@ -6,10 +6,10 @@ __revision__ = "$Id: build_scripts.py 77704 2010-01-23 09:23:15Z tarek.ziade $" import os, re from stat import ST_MODE -from distutils.core import Command -from distutils.dep_util import newer -from distutils.util import convert_path -from distutils import log +from distutils2.core import Command +from distutils2.dep_util import newer +from distutils2.util import convert_path +from distutils2 import log # check if Python is called on the first line with this expression first_line_re = re.compile('^#!.*python[0-9.]*([ \t].*)?$') diff --git a/src/distutils2/command/check.py b/src/distutils2/command/check.py index 7dd888b..ac2fd93 100644 --- a/src/distutils2/command/check.py +++ b/src/distutils2/command/check.py @@ -4,8 +4,8 @@ Implements the Distutils 'check' command. """ __revision__ = "$Id: check.py 75266 2009-10-05 22:32:48Z andrew.kuchling $" -from distutils.core import Command -from distutils.errors import DistutilsSetupError +from distutils2.core import Command +from distutils2.errors import DistutilsSetupError try: # docutils is installed diff --git a/src/distutils2/command/clean.py b/src/distutils2/command/clean.py index 9e8c2d0..56f478c 100644 --- a/src/distutils2/command/clean.py +++ b/src/distutils2/command/clean.py @@ -7,9 +7,9 @@ Implements the Distutils 'clean' command.""" __revision__ = "$Id: clean.py 70886 2009-03-31 20:50:59Z tarek.ziade $" import os -from distutils.core import Command -from distutils.dir_util import remove_tree -from distutils import log +from distutils2.core import Command +from distutils2.dir_util import remove_tree +from distutils2 import log class clean(Command): diff --git a/src/distutils2/command/config.py b/src/distutils2/command/config.py index 1c56e7d..15b62a2 100644 --- a/src/distutils2/command/config.py +++ b/src/distutils2/command/config.py @@ -14,10 +14,10 @@ __revision__ = "$Id: config.py 77704 2010-01-23 09:23:15Z tarek.ziade $" import os import re -from distutils.core import Command -from distutils.errors import DistutilsExecError -from distutils.ccompiler import customize_compiler -from distutils import log +from distutils2.core import Command +from distutils2.errors import DistutilsExecError +from distutils2.ccompiler import customize_compiler +from distutils2 import log LANG_EXT = {'c': '.c', 'c++': '.cxx'} @@ -96,7 +96,7 @@ class config(Command): """ # We do this late, and only on-demand, because this is an expensive # import. - from distutils.ccompiler import CCompiler, new_compiler + from distutils2.ccompiler import CCompiler, new_compiler if not isinstance(self.compiler, CCompiler): self.compiler = new_compiler(compiler=self.compiler, dry_run=self.dry_run, force=1) @@ -182,7 +182,7 @@ class config(Command): preprocessor succeeded, false if there were any errors. ('body' probably isn't of much use, but what the heck.) """ - from distutils.ccompiler import CompileError + from distutils2.ccompiler import CompileError self._check_compiler() ok = 1 try: @@ -226,7 +226,7 @@ class config(Command): """Try to compile a source file built from 'body' and 'headers'. Return true on success, false otherwise. """ - from distutils.ccompiler import CompileError + from distutils2.ccompiler import CompileError self._check_compiler() try: self._compile(body, headers, include_dirs, lang) @@ -244,7 +244,7 @@ class config(Command): 'headers', to executable form. Return true on success, false otherwise. """ - from distutils.ccompiler import CompileError, LinkError + from distutils2.ccompiler import CompileError, LinkError self._check_compiler() try: self._link(body, headers, include_dirs, @@ -263,7 +263,7 @@ class config(Command): built from 'body' and 'headers'. Return true on success, false otherwise. """ - from distutils.ccompiler import CompileError, LinkError + from distutils2.ccompiler import CompileError, LinkError self._check_compiler() try: src, obj, exe = self._link(body, headers, include_dirs, diff --git a/src/distutils2/command/install.py b/src/distutils2/command/install.py index 6b04d9b..facf163 100644 --- a/src/distutils2/command/install.py +++ b/src/distutils2/command/install.py @@ -9,13 +9,13 @@ import os from sysconfig import get_config_vars, get_paths, get_path, get_config_var -from distutils import log -from distutils.core import Command -from distutils.debug import DEBUG -from distutils.errors import DistutilsPlatformError -from distutils.file_util import write_file -from distutils.util import convert_path, change_root, get_platform -from distutils.errors import DistutilsOptionError +from distutils2 import log +from distutils2.core import Command +from distutils2.debug import DEBUG +from distutils2.errors import DistutilsPlatformError +from distutils2.file_util import write_file +from distutils2.util import convert_path, change_root, get_platform +from distutils2.errors import DistutilsOptionError # kept for backward compat, will be removed in 3.2 if sys.version < "2.2": @@ -403,7 +403,7 @@ class install(Command): """Dumps the list of user options.""" if not DEBUG: return - from distutils.fancy_getopt import longopt_xlate + from distutils2.fancy_getopt import longopt_xlate log.debug(msg + ":") for opt in self.user_options: opt_name = opt[0] diff --git a/src/distutils2/command/install_data.py b/src/distutils2/command/install_data.py index eac8e89..06b0a33 100644 --- a/src/distutils2/command/install_data.py +++ b/src/distutils2/command/install_data.py @@ -8,8 +8,8 @@ platform-independent data files.""" __revision__ = "$Id: install_data.py 76849 2009-12-15 06:29:19Z tarek.ziade $" import os -from distutils.core import Command -from distutils.util import change_root, convert_path +from distutils2.core import Command +from distutils2.util import change_root, convert_path class install_data(Command): diff --git a/src/distutils2/command/install_egg_info.py b/src/distutils2/command/install_egg_info.py index c888031..d86d570 100644 --- a/src/distutils2/command/install_egg_info.py +++ b/src/distutils2/command/install_egg_info.py @@ -4,8 +4,8 @@ Implements the Distutils 'install_egg_info' command, for installing a package's PKG-INFO metadata.""" -from distutils.cmd import Command -from distutils import log, dir_util +from distutils2.cmd import Command +from distutils2 import log, dir_util import os, sys, re class install_egg_info(Command): diff --git a/src/distutils2/command/install_headers.py b/src/distutils2/command/install_headers.py index 3ce80b2..762656d 100644 --- a/src/distutils2/command/install_headers.py +++ b/src/distutils2/command/install_headers.py @@ -5,7 +5,7 @@ files to the Python include directory.""" __revision__ = "$Id: install_headers.py 70891 2009-03-31 20:55:21Z tarek.ziade $" -from distutils.core import Command +from distutils2.core import Command # XXX force is never used diff --git a/src/distutils2/command/install_lib.py b/src/distutils2/command/install_lib.py index 641e5c8..ec7e608 100644 --- a/src/distutils2/command/install_lib.py +++ b/src/distutils2/command/install_lib.py @@ -8,8 +8,8 @@ __revision__ = "$Id: install_lib.py 75671 2009-10-24 15:51:30Z tarek.ziade $" import os import sys -from distutils.core import Command -from distutils.errors import DistutilsOptionError +from distutils2.core import Command +from distutils2.errors import DistutilsOptionError # Extension for Python source files. @@ -124,7 +124,7 @@ class install_lib(Command): self.warn('byte-compiling is disabled, skipping.') return - from distutils.util import byte_compile + from distutils2.util import byte_compile # Get the "--root" directory supplied to the "install" command, # and use it as a prefix to strip off the purported filename diff --git a/src/distutils2/command/install_scripts.py b/src/distutils2/command/install_scripts.py index 5346681..bdf7362 100644 --- a/src/distutils2/command/install_scripts.py +++ b/src/distutils2/command/install_scripts.py @@ -8,8 +8,8 @@ Python scripts.""" __revision__ = "$Id: install_scripts.py 68943 2009-01-25 22:09:10Z tarek.ziade $" import os -from distutils.core import Command -from distutils import log +from distutils2.core import Command +from distutils2 import log from stat import ST_MODE class install_scripts (Command): diff --git a/src/distutils2/command/register.py b/src/distutils2/command/register.py index a075fd7..50c4b67 100644 --- a/src/distutils2/command/register.py +++ b/src/distutils2/command/register.py @@ -13,8 +13,8 @@ import urlparse import StringIO from warnings import warn -from distutils.core import PyPIRCCommand -from distutils import log +from distutils2.core import PyPIRCCommand +from distutils2 import log class register(PyPIRCCommand): diff --git a/src/distutils2/command/sdist.py b/src/distutils2/command/sdist.py index 877903c..b90204c 100644 --- a/src/distutils2/command/sdist.py +++ b/src/distutils2/command/sdist.py @@ -11,20 +11,20 @@ from glob import glob from warnings import warn from shutil import get_archive_formats -from distutils.core import Command -from distutils import dir_util, dep_util, file_util, archive_util -from distutils.text_file import TextFile -from distutils.errors import (DistutilsPlatformError, DistutilsOptionError, +from distutils2.core import Command +from distutils2 import dir_util, dep_util, file_util, archive_util +from distutils2.text_file import TextFile +from distutils2.errors import (DistutilsPlatformError, DistutilsOptionError, DistutilsTemplateError) -from distutils.filelist import FileList -from distutils import log -from distutils.util import convert_path +from distutils2.filelist import FileList +from distutils2 import log +from distutils2.util import convert_path def show_formats(): """Print all possible values for the 'formats' option (used by the "--help-formats" command-line option). """ - from distutils.fancy_getopt import FancyGetopt + from distutils2.fancy_getopt import FancyGetopt formats = [] for name, desc in get_archive_formats(): formats.append(("formats=" + name, None, desc)) diff --git a/src/distutils2/command/upload.py b/src/distutils2/command/upload.py index 18a10a0..4896100 100644 --- a/src/distutils2/command/upload.py +++ b/src/distutils2/command/upload.py @@ -10,10 +10,10 @@ import urlparse import cStringIO as StringIO from hashlib import md5 -from distutils.errors import DistutilsOptionError -from distutils.core import PyPIRCCommand -from distutils.spawn import spawn -from distutils import log +from distutils2.errors import DistutilsOptionError +from distutils2.core import PyPIRCCommand +from distutils2.spawn import spawn +from distutils2 import log class upload(PyPIRCCommand): |
