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
Boxiang Sun
cython
Commits
911b8034
Commit
911b8034
authored
Jun 08, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compile Cython.Plex.Scanners module on install to speed up compilation
parent
2d9e5a65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
setup.py
setup.py
+27
-2
No files found.
setup.py
View file @
911b8034
from
distutils.core
import
setup
from
distutils.core
import
setup
,
Extension
from
distutils.sysconfig
import
get_python_lib
import
os
,
sys
import
os
,
os
.
path
import
sys
from
Cython.Compiler.Version
import
version
...
...
@@ -22,6 +22,31 @@ if os.name == "posix":
else
:
scripts
=
[
"cython.py"
]
try
:
sys
.
argv
.
remove
(
"--no-compile"
)
except
ValueError
:
try
:
from
Cython.Compiler.Main
import
compile
source_root
=
os
.
path
.
dirname
(
__file__
)
compiled_modules
=
[
"Cython.Plex.Scanners"
]
extensions
=
[]
for
module
in
compiled_modules
:
source_file
=
os
.
path
.
join
(
source_root
,
*
module
.
split
(
'.'
))
print
(
"Compiling module %s ..."
%
module
)
result
=
compile
(
source_file
+
".py"
)
if
result
.
c_file
:
extensions
.
append
(
Extension
(
module
,
sources
=
[
result
.
c_file
])
)
else
:
print
(
"Compilation failed"
)
if
extensions
:
setup_args
[
'ext_modules'
]
=
extensions
except
Exception
:
print
(
"ERROR: %s"
%
sys
.
exc_info
()[
1
])
print
(
"Extension module compilation failed, using plain Python implementation"
)
setup
(
name
=
'Cython'
,
version
=
version
,
...
...
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