Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Cython / tests / run / cimport.srctree
Size: Mime:
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

######## pkg/__init__.py ########


######## pkg/sub.pxd ########

ctypedef int my_int

######## pkg/subpkg/__init__.py ########

######## pkg/subpkg/submod.pxd ########

ctypedef int my_int

######## a.pyx ########

from other cimport (
    A,
    foo,
)
print A, foo(10)

cimport other
print other.A, other.foo(10)

from pkg cimport sub
cdef sub.my_int a = 100

from pkg.subpkg cimport submod