aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools
diff options
context:
space:
mode:
authorLennart Regebro <regebro@gmail.com>2009-09-22 17:25:53 +0200
committerLennart Regebro <regebro@gmail.com>2009-09-22 17:25:53 +0200
commit7596dc0cf93965df85e36dcbca683270f5e9ded2 (patch)
tree243c8b0f84fff8d7076286cc47e472050b903660 /setuptools
parentbec82b20d18cb0e81d305015307584abaa2b69bf (diff)
downloadexternal_python_setuptools-7596dc0cf93965df85e36dcbca683270f5e9ded2.tar.gz
external_python_setuptools-7596dc0cf93965df85e36dcbca683270f5e9ded2.tar.bz2
external_python_setuptools-7596dc0cf93965df85e36dcbca683270f5e9ded2.zip
Name changes of the parameters.
--HG-- branch : distribute extra : rebase_source : fc921b526cda13b02a4bb0215f91ee04d03dca57
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/__init__.py6
-rw-r--r--setuptools/command/build_py.py8
-rw-r--r--setuptools/command/test.py4
-rw-r--r--setuptools/dist.py6
4 files changed, 10 insertions, 14 deletions
diff --git a/setuptools/__init__.py b/setuptools/__init__.py
index ac5e6e5e..d03d0bf0 100644
--- a/setuptools/__init__.py
+++ b/setuptools/__init__.py
@@ -24,14 +24,10 @@ _distribute = True
bootstrap_install_from = None
-# Should we run 2to3 on all Python files, in Python 3.x?
-# Default: no; assume that a distribution installed for 3.x is already
-# written in 3.x
-run_2to3 = False # Default value if run_2to3 argument not given.
# If we run 2to3 on .py files, should we also convert docstrings?
# Default: yes; assume that we can detect doctests reliably
run_2to3_on_doctests = True
-# Package names for fixer packages
+# Standard package names for fixer packages
lib2to3_fixer_packages = ['lib2to3.fixes']
def find_packages(where='.', exclude=()):
diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py
index 910d67c8..a01e2843 100644
--- a/setuptools/command/build_py.py
+++ b/setuptools/command/build_py.py
@@ -23,7 +23,7 @@ try:
def run_2to3(self, files, doctests = False):
# See of the distribution option has been set, otherwise check the
# setuptools default.
- if self.distribution.run_2to3 is not True and setuptools.run_2to3 is False:
+ if self.distribution.use_2to3 is not True:
return
if not files:
return
@@ -32,8 +32,8 @@ try:
self.fixer_names = []
for p in setuptools.lib2to3_fixer_packages:
self.fixer_names.extend(get_fixers_from_package(p))
- if self.distribution.additional_2to3_fixers is not None:
- for p in self.distribution.additional_2to3_fixers:
+ if self.distribution.use_2to3_fixers is not None:
+ for p in self.distribution.use_2to3_fixers:
self.fixer_names.extend(get_fixers_from_package(p))
if doctests:
if setuptools.run_2to3_on_doctests:
@@ -137,7 +137,7 @@ class build_py(_build_py, Mixin2to3):
srcfile = os.path.join(src_dir, filename)
outf, copied = self.copy_file(srcfile, target)
srcfile = os.path.abspath(srcfile)
- if copied and srcfile in self.distribution.convert_doctests_2to3:
+ if copied and srcfile in self.distribution.convert_2to3_doctests:
self.__doctests_2to3.append(outf)
diff --git a/setuptools/command/test.py b/setuptools/command/test.py
index 0f96e83a..b7aef969 100644
--- a/setuptools/command/test.py
+++ b/setuptools/command/test.py
@@ -1,4 +1,4 @@
-from setuptools import Command, run_2to3
+from setuptools import Command
from distutils.errors import DistutilsOptionError
import sys
from pkg_resources import *
@@ -81,7 +81,7 @@ class test(Command):
def with_project_on_sys_path(self, func):
- if getattr(self.distribution, 'run_2to3', run_2to3):
+ if getattr(self.distribution, 'use_2to3', False):
# If we run 2to3 we can not do this inplace:
# Ensure metadata is up-to-date
diff --git a/setuptools/dist.py b/setuptools/dist.py
index 531c94f4..2246ab96 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -255,11 +255,11 @@ class Distribution(_Distribution):
if value is not None:
ep.require(installer=self.fetch_build_egg)
ep.load()(self, ep.name, value)
- if getattr(self, 'convert_doctests_2to3', None):
+ if getattr(self, 'convert_2to3_doctests', None):
# XXX may convert to set here when we can rely on set being builtin
- self.convert_doctests_2to3 = [os.path.abspath(p) for p in self.convert_doctests_2to3]
+ self.convert_2to3_doctests = [os.path.abspath(p) for p in self.convert_2to3_doctests]
else:
- self.convert_doctests_2to3 = []
+ self.convert_2to3_doctests = []
def fetch_build_egg(self, req):
"""Fetch an egg needed for building"""