2

I am creating a python package with some binary modules compiled by Cython. The reason for this compilation is obfuscation of the source code, so I only distribute a platform specific wheel. The construction of the wheel works as expected, but it still contains the .c files (next to the compiled .so files).

Without the .c files, the package still works (manually removing this with archive manager). Tried all day to get this to work automatically, but couldn't find anything. Hopefully someone can help out?

setup.py:

from setuptools import setup

from Cython.Build import build_ext
from Cython.Build import cythonize
from Cython.Distutils import Extension

setup(name='pythonlib',
      zip_safe=False,
      include_package_data=True,
      cmdclass={'build_ext': build_ext},
      ext_modules=cythonize([
          Extension('example_module', ['example_module.pyx'])
      ]),
      )

Creating wheel: python setup.py bdist_wheel

Matthijs
  • 439
  • 3
  • 16

0 Answers0