Commits

Arfrever Frehtes Taifersar Arahesis committed 97f12f8

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.

  • Participants
  • Parent commits 96bedaa
  • Branches 0.6-maintenance

Comments (0)

Files changed (2)

 =======
 
 ------
+0.6.17
+------
+
+* Support Python >=3.1.4 and >=3.2.1.
+
+------
 0.6.16
 ------
 

File setuptools/command/easy_install.py

 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 = ''