aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2011-05-11 19:06:35 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2011-05-11 19:06:35 +0200
commitc2520e2d34b0139205471d0c6867393d15fb5d6a (patch)
treec5a7877d07cd8bc8458feefd046e98760507b2bb
parentdba705d9f2ffb25b4ecf293604b01dbcf88c6d7c (diff)
downloadexternal_python_setuptools-c2520e2d34b0139205471d0c6867393d15fb5d6a.tar.gz
external_python_setuptools-c2520e2d34b0139205471d0c6867393d15fb5d6a.tar.bz2
external_python_setuptools-c2520e2d34b0139205471d0c6867393d15fb5d6a.zip
Support Python >=3.1.4 and >=3.2.1.
Type of distutils.command.build_scripts.first_line_re has been changed by the fix for http://bugs.python.org/issue10419. --HG-- branch : distribute extra : rebase_source : cd656cab87ff4f912ce5146b96e841b4eb17c49d
-rw-r--r--CHANGES.txt6
-rwxr-xr-xsetuptools/command/easy_install.py5
2 files changed, 11 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 84769034..542424d1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,12 @@ CHANGES
=======
------
+0.6.17
+------
+
+* Support Python >=3.1.4 and >=3.2.1.
+
+------
0.6.16
------
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index fb0f9979..58e7ab39 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1590,6 +1590,11 @@ class PthDistributions(Environment):
def get_script_header(script_text, executable=sys_executable, wininst=False):
"""Create a #! line, getting options (if any) from script_text"""
from distutils.command.build_scripts import first_line_re
+
+ # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern.
+ if not isinstance(first_line_re.pattern, str):
+ first_line_re = re.compile(first_line_re.pattern.decode())
+
first = (script_text+'\n').splitlines()[0]
match = first_line_re.match(first)
options = ''