Commit 55b35ade authored by Stefan Behnel's avatar Stefan Behnel

restrict 2to3 usage to Python 3.2 (which does not support the u'' string literal prefix)

parent 23a92baa
lib2to3.fixes.fix_metaclass
lib2to3.fixes.fix_unicode
......@@ -1764,9 +1764,9 @@ def main():
WORKDIR = os.path.abspath(options.work_dir)
if sys.version_info[0] >= 3:
if options.with_cython:
sys.path.insert(0, options.cython_dir)
if options.with_cython and sys.version_info[0] >= 3:
sys.path.insert(0, options.cython_dir)
if sys.version_info[:2] == (3, 2):
try:
# try if Cython is installed in a Py3 version
import Cython.Compiler.Main
......
......@@ -34,7 +34,7 @@ class sdist(sdist_orig):
sdist_orig.run(self)
add_command_class('sdist', sdist)
if sys.version_info[0] >= 3:
if sys.version_info[:2] == (3, 2):
import lib2to3.refactor
from distutils.command.build_py \
import build_py_2to3 as build_py
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment