[PyObjC-svn] r2486 - in trunk/pyobjc/build-support: . distribute-0.6.12-patched distribute-0.6.12-patched/distribute.egg-info distribute-0.6.12-patched/docs distribute-0.6.12-patched/docs/_templates distribute-0.6.12-patched/docs/_theme distribute-0.6.12-patched/docs/_theme/nature distribute-0.6.12-patched/docs/_theme/nature/static distribute-0.6.12-patched/docs/build distribute-0.6.12-patched/docs/build/html distribute-0.6.12-patched/docs/build/html/_sources distribute-0.6.12-patched/docs/build/html/_static distribute-0.6.12-patched/setuptools distribute-0.6.12-patched/setuptools/command distribute-0.6.12-patched/setuptools/tests distribute-0.6.12-patched/tests distribute-0.6.12-patched/tests/shlib_test templates virtualenv3-src virtualenv3-src/support-files virtualenv3-src/virtualenv3.egg-info
[email protected] Thu, 10 Jun 2010 13:28:12 -0500
| Newsgroups | gmane.comp.python.pyobjc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ronaldoussoren
Date: Thu Jun 10 13:28:12 2010
New Revision: 2486
Log:
* Small bugfixes to the build and test scripts
* Add patched version of distribute 0.6.12 that works with python 3.2 by
erasing bits that don't work with that version (this isn't a proper fix,
it just removes some problematic code that is in a bit of distribute that
I don't use)
* Tweak virtualenv3 to install this patched version
* This seems to be enough to run the tests with 3.2, although the test run
hasn't finished yet.
The tweaks to virtualenv3 and distribute are crude hacks and won't be pushed
upstream in their current form.
Added:
trunk/pyobjc/build-support/distribute-0.6.12-patched/
trunk/pyobjc/build-support/distribute-0.6.12-patched/CHANGES.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/CONTRIBUTORS.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/DEVGUIDE.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/MANIFEST.in
trunk/pyobjc/build-support/distribute-0.6.12-patched/PKG-INFO
trunk/pyobjc/build-support/distribute-0.6.12-patched/README.txt (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/ReadMe.pyobjc
trunk/pyobjc/build-support/distribute-0.6.12-patched/distribute.egg-info/
trunk/pyobjc/build-support/distribute-0.6.12-patched/distribute.egg-info/PKG-INFO
trunk/pyobjc/build-support/distribute-0.6.12-patched/distribute.egg-info/SOURCES.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/distribute.egg-info/dependency_links.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/distribute.egg-info/entry_points.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/distribute.egg-info/entry_points.txt.orig
trunk/pyobjc/build-support/distribute-0.6.12-patched/distribute.egg-info/top_level.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/distribute.egg-info/zip-safe
trunk/pyobjc/build-support/distribute-0.6.12-patched/distribute_setup.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/Makefile (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/_templates/
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/_templates/indexsidebar.html
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/_theme/
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/_theme/nature/
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/_theme/nature/static/
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/_theme/nature/static/nature.css_t
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/_theme/nature/static/pygments.css
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/_theme/nature/theme.conf
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_sources/
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_sources/easy_install.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_sources/index.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_sources/pkg_resources.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_sources/python3.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_sources/roadmap.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_sources/setuptools.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_sources/using.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_static/
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_static/basic.css
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_static/nature.css
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/build/html/_static/pygments.css
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/conf.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/easy_install.txt (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/index.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/pkg_resources.txt (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/python3.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/roadmap.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/setuptools.txt (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/docs/using.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/easy_install.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/launcher.c (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/pip-log.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/pkg_resources.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setup.cfg (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setup.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/__init__.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/archive_util.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/cli.exe (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/__init__.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/alias.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/bdist_egg.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/bdist_rpm.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/bdist_wininst.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/build_ext.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/build_py.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/develop.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/easy_install.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/easy_install2.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/egg_info.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/install.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/install_egg_info.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/install_lib.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/install_scripts.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/register.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/rotate.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/saveopts.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/sdist.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/setopt.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/test.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/upload.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/command/upload_docs.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/depends.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/dist.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/extension.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/gui.exe (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/package_index.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/sandbox.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/tests/
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/tests/__init__.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/tests/doctest.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/tests/test_build_ext.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/tests/test_develop.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/tests/test_easy_install.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/tests/test_packageindex.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/tests/test_resources.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/tests/test_sandbox.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/tests/test_upload_docs.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/setuptools/tests/win_script_wrapper.txt
trunk/pyobjc/build-support/distribute-0.6.12-patched/site.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/tests/
trunk/pyobjc/build-support/distribute-0.6.12-patched/tests/api_tests.txt (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/tests/install_test.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/tests/manual_test.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/tests/shlib_test/
trunk/pyobjc/build-support/distribute-0.6.12-patched/tests/shlib_test/hello.c (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/tests/shlib_test/hello.pyx (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/tests/shlib_test/hellolib.c (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/tests/shlib_test/setup.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/tests/shlib_test/test_hello.py (contents, props changed)
trunk/pyobjc/build-support/distribute-0.6.12-patched/tests/test_distribute_setup.py (contents, props changed)
trunk/pyobjc/build-support/virtualenv3-src/support-files/
trunk/pyobjc/build-support/virtualenv3-src/support-files/distribute-0.6.12-py3.1.egg (contents, props changed)
trunk/pyobjc/build-support/virtualenv3-src/support-files/distribute-0.6.12-py3.2.egg (contents, props changed)
Modified:
trunk/pyobjc/build-support/build_frameworks.py
trunk/pyobjc/build-support/run_tests.py
trunk/pyobjc/build-support/templates/index.html
trunk/pyobjc/build-support/virtualenv3-src/virtualenv3.egg-info/SOURCES.txt
trunk/pyobjc/build-support/virtualenv3-src/virtualenv3.py
Modified: trunk/pyobjc/build-support/build_frameworks.py
==============================================================================
--- trunk/pyobjc/build-support/build_frameworks.py (original)
+++ trunk/pyobjc/build-support/build_frameworks.py Thu Jun 10 13:28:12 2010
@@ -29,7 +29,7 @@
gBaseDir = os.path.dirname(os.path.abspath(__file__))
-gArchs = ("32-bit", "3-way")
+gArchs = ("32-bit", "3-way", "intel")
# Name of the Python framework and any additional arguments
@@ -52,20 +52,21 @@
# Name of the OSX SDK used to build the framework, keyed of the architecture
# variant.
gSdkMap={
+ #'32-bit': '/Developer/SDKs/MacOSX10.4u.sdk',
'32-bit': '/',
'3-way': '/',
+ 'intel': '/',
}
# Name of the OSX Deployment Target used to build the framework, keyed of
# the architecture variant.
gDeploymentTargetMap={
- #'32-bit': '10.4',
+ #'32-bit': '10.3',
'32-bit': '10.5',
- '3-way': '10.5',
+ '3-way': '10.5',
+ 'intel': '10.6',
}
-
-
class ShellError (Exception):
""" An error occurred while running a shell command """
pass
@@ -160,17 +161,11 @@
lg = logging.getLogger("install_distribute")
lg.debug("Installing distribute")
- builddir = os.path.join(gBaseDir, "checkouts", version, "build")
-
- lg.debug("Download distribute_setup script")
- fd = urlopen("http://python-distribute.org/distribute_setup.py")
- data = fd.read()
- fd.close()
-
- scriptfn = os.path.join(builddir, "distribute_setup.py")
- fd = open(scriptfn, "wb")
- fd.write(data)
- fd.close()
+ distribute_dir = os.path.join(gBaseDir, "distribute-0.6.12-patched")
+ builddir = os.path.join(distribute_dir, "build")
+ if os.path.exists(builddir):
+ lg.debug("Remove existing 'build' subdir")
+ shutil.rmtree(builddir)
frameworkName=gFrameworkNameTemplate.format(archs=archs, version=version)
@@ -180,22 +175,10 @@
python += '3'
- # Script is in python2 format, translate to python3 before
- # trying to run it.
- lg.debug("Convert install script to python3")
- p = subprocess.Popen([
- os.path.join(os.path.dirname(python), "2to3"),
- scriptfn])
- xit = p.wait()
- if xit != 0:
- lg.warning("Running 2to3 failed")
- raise ShellError(xit)
-
- lg.debug("Run distribute_setup script '%s' with '%s'", scriptfn, python)
+ lg.debug("Run setup script with '%s'", python)
p = subprocess.Popen([
- python,
- scriptfn],
- cwd=os.path.join(gBaseDir, "checkouts"))
+ python, "setup.py", "install"],
+ cwd=distribute_dir)
xit = p.wait()
if xit != 0:
lg.warning("Installing 'distribute' failed")
Modified: trunk/pyobjc/build-support/run_tests.py
==============================================================================
--- trunk/pyobjc/build-support/run_tests.py (original)
+++ trunk/pyobjc/build-support/run_tests.py Thu Jun 10 13:28:12 2010
@@ -42,8 +42,8 @@
gUsage = """\
run_tests.py [-a archs] [--archs=archs] [-v versions] [--versions,versions]
-archs: 32-bit,3-way (values separated by commas)
-versions: 2.6,2.7,3.1,3.2 (values seperated by commas)
+archs: 32-bit,3-way,intel (values separated by commas)
+versions: 2.6,2.7,3.1,3.2 (values seperated by commas)
"""
gBaseDir = os.path.dirname(os.path.abspath(__file__))
@@ -53,9 +53,9 @@
gFrameworkNameTemplate="DbgPython-{archs}"
gVersions=["2.6", "2.7", "3.1", "3.2"]
-gArchs=["32-bit", "3-way"]
+gArchs=["32-bit", "3-way", "intel"]
-gVersions=["2.6", "2.7", ] #"3.2"]
+gVersions=["3.2", "2.6", "2.7", ] #"3.2"]
gArchs=["3-way"]
gArchMap={
@@ -93,7 +93,7 @@
logging.basicConfig(level=logging.DEBUG)
try:
- opts, args = getopt.getopt(sys.argv[1:], 'a:v:h?', ["--help", "--archs=", "--versions="])
+ opts, args = getopt.getopt(sys.argv[1:], 'a:v:h?', ["help", "archs=", "versions="])
except getopt.error as msg:
print(msg, file=sys.stderr)
print(gUsage, file=sys.stderr)
@@ -206,6 +206,8 @@
if version[0] == '3':
base_python += '3'
+ lg.debug("Interpreter: %s", base_python)
+
if not os.path.exists(base_python):
lg.warning("No python installation for Python %r %r", version, archs)
raise RuntimeError(base_python)
@@ -221,6 +223,7 @@
p = subprocess.Popen([
base_python,
"-mvirtualenv3",
+ "-v",
subdir])
xit = p.wait()
@@ -233,6 +236,10 @@
lg.debug("Install base packages")
+ if sys.version_info[0] == 3:
+ python = os.path.join(subdir, "bin", "python3")
+ else:
+ python = os.path.join(subdir, "bin", "python")
# There are circular dependencies w.r.t. testing the Cocoa and Quartz wrappers,
# install pyobjc-core, pyobjc-framework-Cocoa and pyobjc-framework-Quartz
# to ensure we avoid those problems.
@@ -249,10 +256,9 @@
lg.debug("Remove build directory for %s", pkg)
shutil.rmtree(pkgbuild)
- lg.debug("Install %s into %s", pkg, os.path.basename(subdir))
+ lg.info("Install %s into %s", pkg, os.path.basename(subdir))
p = subprocess.Popen([
- os.path.join(subdir, "bin", "python"),
- "setup.py", "install"],
+ python, "setup.py", "install"],
cwd=pkgroot, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
stdout, _ = p.communicate()
@@ -282,8 +288,7 @@
lg.debug("Build %s for %s", pkg, os.path.basename(subdir))
p = subprocess.Popen([
- os.path.join(subdir, "bin", "python"),
- "setup.py", "install"],
+ python, "setup.py", "install"],
cwd=pkgroot, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
stdout, _ = p.communicate()
@@ -307,8 +312,7 @@
lg.info("Test %s for %s (%s)", pkg, os.path.basename(subdir), a)
p = subprocess.Popen([
'/usr/bin/arch', '-' + a,
- os.path.join(subdir, "bin", "python"),
- "setup.py", "test"],
+ python, "setup.py", "test"],
cwd=pkgroot, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
stdout, _ = p.communicate()
@@ -330,8 +334,7 @@
else:
lg.debug("Test %s for %s", pkg, os.path.basename(subdir))
p = subprocess.Popen([
- os.path.join(subdir, "bin", "python"),
- "setup.py", "test"],
+ python, "setup.py", "test"],
cwd=pkgroot, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
stdout, _ = p.communicate()
@@ -350,8 +353,7 @@
lg.debug("Install %s into %s", pkg, os.path.basename(subdir))
p = subprocess.Popen([
- os.path.join(subdir, "bin", "python"),
- "setup.py", "install"],
+ python, "setup.py", "install"],
cwd=pkgroot)
xit = p.wait()
@@ -367,8 +369,11 @@
'test_fail': 0,
'test_error': 0,
}
+ last_line = ''
with open(inputfile) as stream:
for ln in stream:
+ if not ln.startswith('['):
+ last_line = ln
ln = ln.rstrip()
if ln.endswith('... ok'):
result['test_pass'] += 1
@@ -377,6 +382,20 @@
elif ln.endswith('... ERROR'):
result['test_error'] += 1
+ elif 'Fatal Python error' in ln:
+ # Interpreter aborted itself,
+ # treat this as a test error
+ result['test_error'] += 1
+
+
+ if not last_line.split()[0].isupper():
+ # The last line of the output should
+ # be the unittest status line, which
+ # starts with an uppercase word.
+ # Not having it is an error (and tends
+ # to be caused by interpreter crashes)
+ result['test_error'] += 1
+
result['class_pass'] = ''
result['class_fail'] = ''
result['class_error'] = ''
@@ -401,9 +420,31 @@
}
with open(inputfile) as stream:
for ln in stream:
+ if 'warning: no directories found matching' in ln:
+ # Completely harmless warning
+ continue
+
+
if 'error:' in ln:
result['build_errors'] += 1
+ elif ln.startswith('../../libxml2-src/') or \
+ ln.startswith('libffi-src'):
+ # Ignore warnings in 3th-party libraries (pyobjc-core)
+ continue
+
+
+ elif 'is deprecated' in ln and 'objc/Protocol.h' in ln:
+ # Pyobjc-core uses deprecated access methods for protocols
+ # in 32-bit mode.
+ continue
+
+ elif 'is deprecated' in ln:
+ # Ignore all deprecation errors for now, framework wrappers
+ # also trigger these when they contain manual wrappers for
+ # deprecated APIs.
+ continue
+
elif 'warning:' in ln:
result['build_warnings'] += 1
Modified: trunk/pyobjc/build-support/templates/index.html
==============================================================================
--- trunk/pyobjc/build-support/templates/index.html (original)
+++ trunk/pyobjc/build-support/templates/index.html Thu Jun 10 13:28:12 2010
@@ -45,7 +45,7 @@
*/
table#summary td.ok {
- background-color: green;
+ background-color: rgb(0, 120, 0);
}
table#summary td.warning {
background-color: orange;
Modified: trunk/pyobjc/build-support/virtualenv3-src/virtualenv3.egg-info/SOURCES.txt
==============================================================================
--- trunk/pyobjc/build-support/virtualenv3-src/virtualenv3.egg-info/SOURCES.txt (original)
+++ trunk/pyobjc/build-support/virtualenv3-src/virtualenv3.egg-info/SOURCES.txt Thu Jun 10 13:28:12 2010
@@ -1,12 +1,13 @@
MANIFEST.in
PKG-INFO
-distribute-0.6.4.tar.gz
setup.cfg
setup.py
virtualenv3.py
./virtualenv3.py
docs/index.txt
docs/license.txt
+support-files/distribute-0.6.12-py3.1.egg
+support-files/distribute-0.6.12-py3.2.egg
virtualenv3.egg-info/PKG-INFO
virtualenv3.egg-info/SOURCES.txt
virtualenv3.egg-info/dependency_links.txt
Modified: trunk/pyobjc/build-support/virtualenv3-src/virtualenv3.py
==============================================================================
--- trunk/pyobjc/build-support/virtualenv3-src/virtualenv3.py (original)
+++ trunk/pyobjc/build-support/virtualenv3-src/virtualenv3.py Thu Jun 10 13:28:12 2010
@@ -231,60 +231,34 @@
logger.info('Changed mode of %s to %s', fn, oct(newmode))
def install_setuptools(py_executable, unzip=False):
- setup_fn = 'setuptools-0.6c9-py%s.egg' % sys.version[:3]
+ #setup_fn = 'setuptools-0.6c9-py%s.egg' % sys.version[:3]
search_dirs = ['.', os.path.dirname(__file__), join(os.path.dirname(__file__), 'support-files')]
- if os.path.splitext(os.path.dirname(__file__))[0] != 'virtualenv':
+ if os.path.splitext(os.path.dirname(__file__))[0] != 'virtualenv3':
# Probably some boot script; just in case virtualenv is installed...
try:
- import virtualenv
+ import virtualenv3
except ImportError:
pass
else:
- search_dirs.append(os.path.join(os.path.dirname(virtualenv.__file__), 'support-files'))
+ search_dirs.append(os.path.join(os.path.dirname(virtualenv3.__file__), 'support-files'))
+
+ setup_fn = None
for dir in search_dirs:
- if os.path.exists(join(dir, setup_fn)):
- setup_fn = join(dir, setup_fn)
- break
- if is_jython and os._name == 'nt':
- # Jython's .bat sys.executable can't handle a command line
- # argument with newlines
- import tempfile
- fd, ez_setup = tempfile.mkstemp('.py')
- os.write(fd, EZ_SETUP_PY)
- os.close(fd)
- cmd = [py_executable, ez_setup]
- else:
- cmd = [py_executable, '-c', EZ_SETUP_PY]
- if unzip:
- cmd.append('--always-unzip')
- env = {}
- if logger.stdout_level_matches(logger.DEBUG):
- cmd.append('-v')
- if os.path.exists(setup_fn):
- logger.info('Using existing Setuptools egg: %s', setup_fn)
- cmd.append(setup_fn)
- if os.environ.get('PYTHONPATH'):
- env['PYTHONPATH'] = setup_fn + os.path.pathsep + os.environ['PYTHONPATH']
- else:
- env['PYTHONPATH'] = setup_fn
- else:
- logger.info('No Setuptools egg found; downloading')
- cmd.extend(['--always-copy', '-U', 'setuptools'])
- logger.start_progress('Installing setuptools...')
- logger.indent += 2
- cwd = None
- if not os.access(os.getcwd(), os.W_OK):
- cwd = '/tmp'
- try:
- call_subprocess(cmd, show_stdout=False,
- filter_stdout=filter_ez_setup,
- extra_env=env,
- cwd=cwd)
- finally:
- logger.indent -= 2
- logger.end_progress()
- if is_jython and os._name == 'nt':
- os.remove(ez_setup)
+ for fn in os.listdir(dir):
+ if fn.startswith('distribute') and fn.endswith('-py%s.egg'%(sys.version[:3],)):
+ setup_fn = join(dir, fn)
+ break
+
+
+ path = os.environ['PATH']
+ path = os.path.dirname(py_executable) + ":" + path
+ env = { "PATH": path }
+ cmd = [ "/bin/sh", setup_fn ]
+
+ call_subprocess(cmd, show_stdout=False,
+ filter_stdout=filter_ez_setup,
+ extra_env=env,
+ )
def filter_ez_setup(line):
if not line.strip():
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo