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
d1997724
Commit
d1997724
authored
Feb 16, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cimport test
parent
541b01af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletion
+36
-1
runtests.py
runtests.py
+1
-1
tests/run/cimport.srctree
tests/run/cimport.srctree
+35
-0
No files found.
runtests.py
View file @
d1997724
...
...
@@ -194,7 +194,7 @@ class TestBuilder(object):
filenames
=
os
.
listdir
(
path
)
filenames
.
sort
()
for
filename
in
filenames
:
if
context
==
"build"
and
filename
.
endswith
(
".srctree"
):
if
filename
.
endswith
(
".srctree"
):
if
not
[
1
for
match
in
self
.
selectors
if
match
(
filename
)
]:
continue
if
self
.
exclude_selectors
:
...
...
tests/run/cimport.srctree
0 → 100644
View file @
d1997724
PYTHON setup.py build_ext --inplace
PYTHON -c "import a"
######## setup.py ########
from Cython.Build import cythonize
from distutils.core import setup
setup(
ext_modules = cythonize("*.pyx"),
)
######## other.pxd ########
cdef class A:
pass
cdef int foo(int)
######## other.pyx ########
cdef class A:
pass
cdef int foo(int a):
return a**2
######## a.pyx ########
from other cimport A, foo
print A, foo(10)
cimport other
print other.A, other.foo(10)
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