4

I've always used poetry to develop python packages. Now I want to use Cython in a new project and I'm a little confuse about how to structure de library, whether or not to use a setup.py instead of using poetry at all.

I've seen posts (like this) about how to include cython code in a package (with a setup.py) but not using poetry. Others, This one (and this) does, but they depend on a build.py script, and a comment said in one of them that approach wont work if gcc is not installed.

So, what would be the best practices for packaging (and publishing to PyPI) libraries that use cython using poetry?

Jorge Morgado
  • 1,148
  • 7
  • 23
  • I know this is an older post, but it's the first result when constraining my search to last year. At least for the lack of `gcc`, I can tell you that `cython` simply won't work without a C compiler, period. What Cython does is generate C code, which needs to be compiled. It's not a compiler itself. And `gcc` is the default compier on Linux. – jaskij Jan 10 '23 at 02:24

0 Answers0