Domanda

I'm building an extension with Cython, named '_mymodule'. I need to wrap the import of this extension in "mymodule.py", to add some features that I prefer to provide in pure Python.

I followed the Cython documentation (http://docs.cython.org/src/userguide/source_files_and_compilation.html) to create a setup.py file to compile and install the extension ("_mymodule.so") but how do I tell this setup script to include "mymodule.py" as well?

È stato utile?

Soluzione

I added the option:

packages = ['.']

to the setup() function to include .py files.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top