summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortarek <none@none>2009-10-15 23:31:17 +0200
committertarek <none@none>2009-10-15 23:31:17 +0200
commit0102f2ef39f136eda2557c4fef8031ff35d366a6 (patch)
tree2d0b2f8eef7d80b052ce76eda7f314be5307f53f
parent0f267465f3a0584dafc96a414dfe3338b9bbda73 (diff)
parent7785ccade4b92867c492f573e9b548c1ba612cd7 (diff)
downloadpython-setuptools-git-0102f2ef39f136eda2557c4fef8031ff35d366a6.tar.gz
merge dance
--HG-- branch : distribute extra : rebase_source : 74e99f58e1e0e8905537fc439df9910bdf0ff5e0
-rwxr-xr-xREADME.txt2
-rw-r--r--distribute_setup.py19
-rwxr-xr-xrelease.sh12
3 files changed, 14 insertions, 19 deletions
diff --git a/README.txt b/README.txt
index 2f7ddcc3..90eff943 100755
--- a/README.txt
+++ b/README.txt
@@ -92,7 +92,7 @@ If you are under Python 3, use
$ curl -O http://python-distribute.org/distribute_setup_3k.py
$ python distribute_setup_3k.py
-Notice that both files are provided in the source release.
+Notice this file is also provided in the source release.
easy_install or pip
===================
diff --git a/distribute_setup.py b/distribute_setup.py
index 4b2d7854..72853356 100644
--- a/distribute_setup.py
+++ b/distribute_setup.py
@@ -141,14 +141,15 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
try:
pkg_resources.require("distribute>="+version)
return
- except pkg_resources.VersionConflict, e:
+ except pkg_resources.VersionConflict:
+ e = sys.exc_info()[1]
if was_imported:
- print >>sys.stderr, (
+ sys.stderr.write(
"The required version of distribute (>=%s) is not available,\n"
"and can't be installed while this script is running. Please\n"
"install a more recent version first, using\n"
"'easy_install -U distribute'."
- "\n\n(Currently using %r)") % (version, e.args[0])
+ "\n\n(Currently using %r)\n" % (version, e.args[0]))
sys.exit(2)
else:
del pkg_resources, sys.modules['pkg_resources'] # reload ok
@@ -172,7 +173,10 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
"""
# making sure we use the absolute path
to_dir = os.path.abspath(to_dir)
- import urllib2
+ try:
+ from urllib.request import urlopen
+ except ImportError:
+ from urllib2 import urlopen
tgz_name = "distribute-%s.tar.gz" % version
url = download_base + tgz_name
saveto = os.path.join(to_dir, tgz_name)
@@ -180,7 +184,7 @@ def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
if not os.path.exists(saveto): # Avoid repeated downloads
try:
log.warn("Downloading %s", url)
- src = urllib2.urlopen(url)
+ src = urlopen(url)
# Read/write all in one block, so we don't create a corrupt file
# if the download is interrupted.
data = src.read()
@@ -415,7 +419,7 @@ def _extractall(self, path=".", members=None):
# Extract directories with a safe mode.
directories.append(tarinfo)
tarinfo = copy.copy(tarinfo)
- tarinfo.mode = 0700
+ tarinfo.mode = 448 # decimal for oct 0700
self.extract(tarinfo, path)
# Reverse sort directories.
@@ -434,7 +438,8 @@ def _extractall(self, path=".", members=None):
self.chown(tarinfo, dirpath)
self.utime(tarinfo, dirpath)
self.chmod(tarinfo, dirpath)
- except ExtractError, e:
+ except ExtractError:
+ e = sys.exc_info()[1]
if self.errorlevel > 1:
raise
else:
diff --git a/release.sh b/release.sh
index 571b80f1..4f6b3b86 100755
--- a/release.sh
+++ b/release.sh
@@ -5,15 +5,6 @@ export VERSION="0.6.6"
hg tag $VERSION
hg ci -m "bumped revision"
-# creating the 3k script
-mkdir ./temp
-cp distribute_setup.py ./temp/distribute_setup.py
-cd ./temp
-2to3 -w distribute_setup.py > /dev/null
-mv distribute_setup.py ../distribute_setup_3k.py
-cd ..
-rm -rf ./temp
-
# creating the releases
rm -rf ./dist
@@ -21,9 +12,8 @@ rm -rf ./dist
python2.6 setup.py -q egg_info -RDb '' sdist register upload
python2.6 setup.py build_sphinx upload_docs
-# pushing the bootstrap scripts
+# pushing the bootstrap script
scp distribute_setup.py ziade.org:nightly/build/
-scp distribute_setup_3k.py ziade.org:nightly/build/
# starting the new dev