Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ship cythonized .c files in sdist #2075

Open
vytas7 opened this issue May 30, 2022 · 3 comments
Open

Ship cythonized .c files in sdist #2075

vytas7 opened this issue May 30, 2022 · 3 comments

Comments

@vytas7
Copy link
Member

vytas7 commented May 30, 2022

As suggested by @koobs in #1281, it seems we closed that issue without a decision on this part.

This would let us drop cython from the PEP 517 build requirements. While not a very big/common issue, we are currently unable to fall back to pure Python if cython installation itself fails as part of the PEP 517 build process.

We don't want to have .c files in the source tree, but we want to produce them in the CI gate responsible for uploading sdist.

@koobs
Copy link

koobs commented Jun 2, 2022

Thanks for following up on this @vytas7 :)

For clarity, and from the referenced issue and upstream notes, the key elements are:

  1. It is strongly recommended that you distribute the generated .c files, ...
  2. ... as well as your Cython sources
  3. It is also recommended that Cython compilation not be enabled by default in the version you distribute. Even if the user has Cython installed, he/she probably doesn’t want to use it just to install your module ...

@vytas7
Copy link
Member Author

vytas7 commented Jun 2, 2022

@koobs we beg to differ on (3) -- we will enable compilation by default, but just as now, you will be able to pass an envvar to disable compilation. We do want to cover cases where a wheel is unavailable, and I think these guidelines precede the advent of PEP 517 where you can control which Cython version is installed. Moreover, if we ship .c files, the point with using a wrong Cython version is moot.

@koobs
Copy link

koobs commented Jun 2, 2022

No need to beg to differ @vytas7 i was just copying the relevant bits from external references into this issue to ease understanding for readers (present and future). You are of course free to do as you please :)

@vytas7 vytas7 added this to the Triaged (Non-Breaking Changes) milestone Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants