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
Kirill Smelkov
cython
Commits
709aafb2
Commit
709aafb2
authored
May 04, 2019
by
Dr Alex Meakins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test PEP420 namespace support.
parent
468051bc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
tests/build/cythonize_pep420_namespace.srctree
tests/build/cythonize_pep420_namespace.srctree
+44
-0
No files found.
tests/build/cythonize_pep420_namespace.srctree
0 → 100644
View file @
709aafb2
PYTHON setup.py build_ext --inplace
PYTHON -c "import runner"
######## setup.py ########
from Cython.Build.Dependencies import cythonize
from distutils.core import setup, Extension
setup(
ext_modules=cythonize([
Extension("nsp.m1.a", ["nsp/m1/a.pyx"]),
Extension("nsp.m2.b", ["nsp/m2/b.pyx"])
]),
)
######## nsp/m1/__init__.py ########
######## nsp/m1/a.pyx ########
cdef class A:
pass
######## nsp/m1/a.pxd ########
cdef class A:
pass
######## nsp/m2/__init__.py ########
######## nsp/m2/b.pyx ########
from nsp.m1.a cimport A
cdef class B(A):
pass
######## runner.py ########
from nsp.m1.a import A
from nsp.m2.b import B
a = A()
b = B()
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