Cython Compilation Error: dynamic module does not define module export function
<p>I am building a package in Cython. I am using the following as the structure for <code>setup.py</code>:</p>

<pre><code>from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
import numpy
import scipy

extensions = [
    Extension("xxxxx",["xxxx/xxxxx.pyx"],
    include_dirs=[numpy.get_include(),"."]),
    Extension("nnls",["xxxxx/xxxxx.pyx"],
              include_dirs=[numpy.get_include(),"."]),
]

setup(
    name='xxxxxx',
    version='0.0.0',
    description='''********''',
    url='xxxxxxx',
    author='xxxxx',
    author_email='xxxxx',
    packages=[
        'xxxxx',
    ],
    install_requires=[
        'cython',
        'numpy',
        'scipy',
    ],
    ext_modules=cythonize(extensions),
)
</code></pre>

<p>However, I am getting an error upon installation in Python 3. It is working in Python 2 however, it is not compiling in Python 3 having the following error:</p>

<blockquote>
  <p>dynamic module does not define module export function</p>
</blockquote>

<p>How can I solve this problem? Is the structure of the <code>setup.py</code> the reason why this is not compiling? </p>