Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
f89d8fe5
Commit
f89d8fe5
authored
Apr 24, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use lib2to3 to port to Py3 on installation
parent
a7d2f117
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
setup.py
setup.py
+18
-1
No files found.
setup.py
View file @
f89d8fe5
...
...
@@ -2,7 +2,10 @@ from distutils.core import setup, Extension
from
distutils.sysconfig
import
get_python_lib
import
os
,
os
.
path
import
sys
from
Cython.Compiler.Version
import
version
try
:
from
Cython.Compiler.Version
import
version
except
ImportError
:
version
=
None
compiler_dir
=
os
.
path
.
join
(
get_python_lib
(
prefix
=
''
),
'Cython/Compiler'
)
if
sys
.
platform
==
"win32"
:
...
...
@@ -10,6 +13,18 @@ if sys.platform == "win32":
setup_args
=
{}
if
sys
.
version_info
[
0
]
>=
3
:
import
lib2to3.refactor
from
distutils.command.build_py
\
import
build_py_2to3
as
build_py
# need to convert sources to Py3 on installation
fixers
=
[
fix
for
fix
in
lib2to3
.
refactor
.
get_fixers_from_package
(
"lib2to3.fixes"
)
if
fix
.
split
(
'fix_'
)[
-
1
]
not
in
(
'next'
,)
]
build_py
.
fixer_names
=
fixers
setup_args
[
'cmdclass'
]
=
{
"build_py"
:
build_py
}
if
sys
.
version_info
<
(
2
,
4
):
import
glob
cython_dir
=
os
.
path
.
join
(
get_python_lib
(
prefix
=
''
),
'Cython'
)
...
...
@@ -35,6 +50,8 @@ else:
scripts
=
[
"cython.py"
]
try
:
if
version
is
None
:
raise
ValueError
sys
.
argv
.
remove
(
"--no-cython-compile"
)
except
ValueError
:
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment