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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
fa494b8d
Commit
fa494b8d
authored
Sep 08, 2016
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some tests.
parent
cb55c11b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+4
-1
pyximport/pyxbuild.py
pyximport/pyxbuild.py
+4
-4
tests/build/compile_env_distutils.srctree
tests/build/compile_env_distutils.srctree
+2
-2
No files found.
Cython/Build/Dependencies.py
View file @
fa494b8d
...
@@ -3,6 +3,7 @@ from __future__ import absolute_import, print_function
...
@@ -3,6 +3,7 @@ from __future__ import absolute_import, print_function
import
cython
import
cython
from
..
import
__version__
from
..
import
__version__
import
collections
import
re
,
os
,
sys
,
time
import
re
,
os
,
sys
,
time
from
glob
import
iglob
from
glob
import
iglob
...
@@ -639,7 +640,9 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=
...
@@ -639,7 +640,9 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=
print
(
'Please put "# distutils: language=%s" in your .pyx or .pxd file(s)'
%
language
)
print
(
'Please put "# distutils: language=%s" in your .pyx or .pxd file(s)'
%
language
)
if
exclude
is
None
:
if
exclude
is
None
:
exclude
=
[]
exclude
=
[]
if
not
isinstance
(
patterns
,
(
list
,
tuple
)):
if
patterns
is
None
:
return
[],
{}
elif
isinstance
(
patterns
,
basestring
)
or
not
isinstance
(
patterns
,
collections
.
Iterable
):
patterns
=
[
patterns
]
patterns
=
[
patterns
]
explicit_modules
=
set
([
m
.
name
for
m
in
patterns
if
isinstance
(
m
,
Extension
)])
explicit_modules
=
set
([
m
.
name
for
m
in
patterns
if
isinstance
(
m
,
Extension
)])
seen
=
set
()
seen
=
set
()
...
...
pyximport/pyxbuild.py
View file @
fa494b8d
...
@@ -10,7 +10,7 @@ from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError
...
@@ -10,7 +10,7 @@ from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError
from
distutils.extension
import
Extension
from
distutils.extension
import
Extension
from
distutils.util
import
grok_environment_error
from
distutils.util
import
grok_environment_error
try
:
try
:
from
Cython.Distutils
import
build_ext
from
Cython.Distutils
.old_build_ext
import
old_build_ext
as
build_ext
HAS_CYTHON
=
True
HAS_CYTHON
=
True
except
ImportError
:
except
ImportError
:
HAS_CYTHON
=
False
HAS_CYTHON
=
False
...
@@ -22,7 +22,7 @@ _reloads={}
...
@@ -22,7 +22,7 @@ _reloads={}
def
pyx_to_dll
(
filename
,
ext
=
None
,
force_rebuild
=
0
,
build_in_temp
=
False
,
pyxbuild_dir
=
None
,
def
pyx_to_dll
(
filename
,
ext
=
None
,
force_rebuild
=
0
,
build_in_temp
=
False
,
pyxbuild_dir
=
None
,
setup_args
=
None
,
reload_support
=
False
,
inplace
=
False
):
setup_args
=
None
,
reload_support
=
False
,
inplace
=
False
):
"""Compile a PYX file to a DLL and return the name of the generated .so
"""Compile a PYX file to a DLL and return the name of the generated .so
or .dll ."""
or .dll ."""
assert
os
.
path
.
exists
(
filename
),
"Could not find %s"
%
os
.
path
.
abspath
(
filename
)
assert
os
.
path
.
exists
(
filename
),
"Could not find %s"
%
os
.
path
.
abspath
(
filename
)
...
@@ -102,7 +102,7 @@ def pyx_to_dll(filename, ext=None, force_rebuild=0, build_in_temp=False, pyxbuil
...
@@ -102,7 +102,7 @@ def pyx_to_dll(filename, ext=None, force_rebuild=0, build_in_temp=False, pyxbuil
dist
.
run_commands
()
dist
.
run_commands
()
so_path
=
obj_build_ext
.
get_outputs
()[
0
]
so_path
=
obj_build_ext
.
get_outputs
()[
0
]
if
obj_build_ext
.
inplace
:
if
obj_build_ext
.
inplace
:
# Python distutils get_outputs()[ returns a wrong so_path
# Python distutils get_outputs()[ returns a wrong so_path
# when --inplace ; see http://bugs.python.org/issue5977
# when --inplace ; see http://bugs.python.org/issue5977
# workaround:
# workaround:
so_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
filename
),
so_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
filename
),
...
@@ -139,7 +139,7 @@ def pyx_to_dll(filename, ext=None, force_rebuild=0, build_in_temp=False, pyxbuil
...
@@ -139,7 +139,7 @@ def pyx_to_dll(filename, ext=None, force_rebuild=0, build_in_temp=False, pyxbuil
continue
continue
break
break
else
:
else
:
# used up all 100 slots
# used up all 100 slots
raise
ImportError
(
"reload count for %s reached maximum"
%
org_path
)
raise
ImportError
(
"reload count for %s reached maximum"
%
org_path
)
_reloads
[
org_path
]
=
(
timestamp
,
so_path
,
count
)
_reloads
[
org_path
]
=
(
timestamp
,
so_path
,
count
)
return
so_path
return
so_path
...
...
tests/build/compile_env_distutils.srctree
View file @
fa494b8d
...
@@ -5,10 +5,10 @@ PYTHON -c "import a; import sys; sys.exit(a.compile_env_test())"
...
@@ -5,10 +5,10 @@ PYTHON -c "import a; import sys; sys.exit(a.compile_env_test())"
from distutils.core import setup
from distutils.core import setup
from Cython.Distutils.extension import Extension
from Cython.Distutils.extension import Extension
from Cython.Distutils
import
build_ext
from Cython.Distutils
.old_build_ext import old_
build_ext
setup(
setup(
cmdclass = {'build_ext': build_ext},
cmdclass = {'build_ext':
old_
build_ext},
ext_modules = [Extension(
ext_modules = [Extension(
"a", ["a.pyx"],
"a", ["a.pyx"],
pyrex_compile_time_env = {'TEST': True},
pyrex_compile_time_env = {'TEST': True},
...
...
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