I have next case:
What I got:
Example of setup.py file:
from distutils.core import setup
from Cython.Build import cythonize
extensions = ["mycore.pyx"]
setup(
name='mycore',
version='1.0',
ext_modules=cythonize(extensions),
#packages=['Padding'], - once tried => "error: package directory 'Padding' does not exist"
)
Any ideas or advises would be great!
UPDATE
Also tried variant with setup_tools
, also without success:
from Cython.Build import cythonize
from setuptools import setup, find_packages, Extension, Command
setup(name='mycore',
packages = find_packages(),
version=1.0,
include_package_data=True,
platforms=['all'],
ext_modules=[Extension("mycore", ['mycore.c'])],
#extra_require = {"Padding"} - also nothing
)
Ask PyInstaller to include the required module during the build process. It seems that the easiest way to do so is with the --hidden-import
argument:
--hidden-import=modulename
Name an imported Python module that is not visible in your code. The module will be included as if it was named in animport
statement. This option can be given more than once.
Thus, please add the following argument when building the application:
--hidden-import=Padding
EDIT:
Try importing all required modules (that trigger an error) in a separate *.py
file, rather than in a *.pyx
\ *.pyd
file. It's an ugly workaround but might solve the issue nonetheless.
Consider using an __init__.py
file for this scenario.