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
b3f6d175
Commit
b3f6d175
authored
Aug 11, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
f4ac1fec
367498f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
CHANGES.rst
CHANGES.rst
+4
-0
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+2
-0
tests/build/common_include_dir.srctree
tests/build/common_include_dir.srctree
+10
-1
No files found.
CHANGES.rst
View file @
b3f6d175
...
...
@@ -25,6 +25,10 @@ Features added
* The cython-mode.el script for Emacs was updated. Patch by Ivan Andrus.
* An option common_utility_include_dir was added to cythonize() to save
oft-used utility code once in a separate directory rather than as
part of each generated file.
Bugs fixed
----------
...
...
Cython/Build/Dependencies.py
View file @
b3f6d175
...
...
@@ -658,6 +658,8 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
if
'include_path'
not
in
options
:
options
[
'include_path'
]
=
[
'.'
]
if
'common_utility_include_dir'
in
options
:
if
'cache'
in
options
:
raise
NotImplementedError
,
"common_utility_include_dir does not yet work with caching"
if
not
os
.
path
.
exists
(
options
[
'common_utility_include_dir'
]):
os
.
makedirs
(
options
[
'common_utility_include_dir'
])
c_options
=
CompilationOptions
(
**
options
)
...
...
tests/build/common_include_dir.srctree
View file @
b3f6d175
...
...
@@ -16,8 +16,17 @@ from Cython.Build.Dependencies import cythonize
from distutils.core import setup
# Test concurrent safety if multiprocessing is available.
# (In particular, TravisCI does not support spawning processes from tests.)
try:
import multiprocessing
multiprocessing.Pool(2)
nthreads = 2
except:
nthreads = 0
setup(
ext_modules = cythonize("*.pyx", common_utility_include_dir='common', nthreads=
2
),
ext_modules = cythonize("*.pyx", common_utility_include_dir='common', nthreads=
nthreads
),
)
######## a.pyx ########
...
...
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