1. Tarek Ziadé
  2. hitchhiker-guide-packaging
  3. Issues
Issue #20 new

Best practices when using Cython

Craig McQueen
created an issue

How should a package be structured when Cython is used?

For anyone who wants to modify the code, it's good to provide the Cython {{{.pyx}}} files, and a {{{setup.py}}} to compile them via Cython to a library file.

But for most people who just want to install the package, it would be good to also include the {{{.c}}} files that are created by Cython, and a {{{setup.py}}} to build the package directly from the {{{.c}}} files. That way, the user doesn't need to install Cython just to install the package.

That potentially means providing 2 different {{{setup.py}}} files, or perhaps a single {{{setup.py}}} that somehow satisfies both purposes.

Comments (2)

  1. Log in to comment