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

Require Cython 3 as a dependency #447

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

vsnever
Copy link
Member

@vsnever vsnever commented Jul 14, 2024

This PR fixes #446.

  • Cython 3 is listed as a build and runtime dependency.
  • CI workflows have also been updated.
  • The C macros are added to get rid of the deprecated Numpy API warnings as specified in the user guide.
  • -Wno-unreachable-code-fallthrough compilation flag is added to silence false unreachable code warnings.

setup.py Outdated
@@ -115,14 +117,15 @@
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=[
"cython~=3.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cython is not a runtime dependency, so doesn't need to be in install_requires. It's only needed for building.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I then remove it from requirements.txt too? Or is it useful to have it there when someone wants to install both build and runtime dependencies using pip install -r requirements.txt?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requirements.txt is for developers to set up a useful working environment, so the Cython dependency should remain in there. The install_requires section in setup.py should only specify the packages required to use an already-built wheel after it has been installed (it's not a great keyword name IMO).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation. It's done.

Copy link
Member

@Mateasek Mateasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm out of my depth here. I would ask @jacklovell and @vsnever to agree on this one.

@jacklovell jacklovell merged commit 895ef8e into cherab:development Aug 1, 2024
8 checks passed
@vsnever vsnever mentioned this pull request Aug 2, 2024
@vsnever vsnever deleted the enhancement/cython3_support branch August 30, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants