user2245644
user2245644

Reputation: 387

How to add a Python file to the installed targets with Cython and distutils?

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?

Upvotes: 3

Views: 70

Answers (1)

user2245644
user2245644

Reputation: 387

I added the option:

packages = ['.']

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

Upvotes: 2

Related Questions