diff options
author | PJ Eby <distutils-sig@python.org> | 2005-06-25 19:33:06 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-06-25 19:33:06 +0000 |
commit | 5ed7f988bca676d52388b7d0db6e540bfd1476f7 (patch) | |
tree | 37245356c1f87d033af6b9a7ff633a14ad50bbf3 /setuptools | |
parent | 0fd80962ecc527dbb57ec6472559cdb90ecfe582 (diff) | |
download | external_python_setuptools-5ed7f988bca676d52388b7d0db6e540bfd1476f7.tar.gz external_python_setuptools-5ed7f988bca676d52388b7d0db6e540bfd1476f7.tar.bz2 external_python_setuptools-5ed7f988bca676d52388b7d0db6e540bfd1476f7.zip |
0.5a3 bugfix release
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041072
Diffstat (limited to 'setuptools')
-rw-r--r-- | setuptools/__init__.py | 2 | ||||
-rwxr-xr-x | setuptools/package_index.py | 2 | ||||
-rwxr-xr-x | setuptools/sandbox.py | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 3220643d..d469f3f7 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -8,7 +8,7 @@ from distutils.core import Command as _Command from distutils.util import convert_path import os.path -__version__ = '0.5a1' +__version__ = '0.5a3' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 9ed9a8a8..a4f81882 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -23,7 +23,7 @@ def parse_bdist_wininst(name): if lower.endswith('.exe'): if lower.endswith('.win32.exe'): base = name[:-10] - elif lower[-16:].startswith('.win32-py'): + elif lower.startswith('.win32-py',-16): py_ver = name[-7:-4] base = name[:-16] diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 0e6f5964..8aa58f8d 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -1,13 +1,11 @@ -import os, sys, __builtin__ +import os, sys, __builtin__, tempfile _os = sys.modules[os.name] _open = open - __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] - def run_setup(setup_script, args): """Run a distutils setup script, sandboxed in its directory""" @@ -15,8 +13,12 @@ def run_setup(setup_script, args): save_argv = sys.argv[:] save_path = sys.path[:] setup_dir = os.path.abspath(os.path.dirname(setup_script)) + temp_dir = os.path.join(setup_dir,'temp') + if not os.path.isdir(temp_dir): os.makedirs(temp_dir) + save_tmp = tempfile.tempdir try: + tempfile.tempdir = temp_dir os.chdir(setup_dir) try: sys.argv[:] = [setup_script]+list(args) @@ -35,9 +37,7 @@ def run_setup(setup_script, args): os.chdir(old_dir) sys.path[:] = save_path sys.argv[:] = save_argv - - - + tempfile.tempdir = save_tmp class AbstractSandbox: """Wrap 'os' module and 'open()' builtin for virtualizing setup scripts""" |