diff options
Diffstat (limited to 'setuptools/__init__.py')
| -rw-r--r-- | setuptools/__init__.py | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 71eeff49..414b4b5d 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -5,9 +5,10 @@ import distutils.core, setuptools.command from setuptools.depends import Require from distutils.core import Command as _Command from distutils.util import convert_path -import os.path +import os +import sys -__version__ = '0.6c12' +__version__ = '0.7' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' @@ -15,6 +16,12 @@ __all__ = [ bootstrap_install_from = None +# 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 +# Standard package names for fixer packages +lib2to3_fixer_packages = ['lib2to3.fixes'] + def find_packages(where='.', exclude=()): """Return a list all Python packages found within directory 'where' @@ -40,7 +47,7 @@ def find_packages(where='.', exclude=()): return out setup = distutils.core.setup - + _Command = _get_unpatched(_Command) class Command(_Command): @@ -53,7 +60,7 @@ class Command(_Command): _Command.__init__(self,dist) for k,v in kw.items(): setattr(self,k,v) - + def reinitialize_command(self, command, reinit_subcommands=0, **kw): cmd = _Command.reinitialize_command(self, command, reinit_subcommands) for k,v in kw.items(): @@ -79,4 +86,9 @@ def findall(dir = os.curdir): import distutils.filelist distutils.filelist.findall = findall # fix findall bug in distutils. - +# sys.dont_write_bytecode was introduced in Python 2.6. +if ((hasattr(sys, "dont_write_bytecode") and sys.dont_write_bytecode) or + (not hasattr(sys, "dont_write_bytecode") and os.environ.get("PYTHONDONTWRITEBYTECODE"))): + _dont_write_bytecode = True +else: + _dont_write_bytecode = False |
