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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: python -m pip install --prefer-binary cython>=0.28 ${{ matrix.numpy-version }} scipy matplotlib "pyopencl[pocl]>=2022.2.4"
run: python -m pip install --prefer-binary cython~=3.0 ${{ matrix.numpy-version }} scipy matplotlib "pyopencl[pocl]>=2022.2.4"
- name: Install Raysect from pypi
run: pip install raysect==0.8.1
- name: Build cherab
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Release 1.5.0 (TBD)

New:
* Support Raysect 0.8
* Cython version 3 is now required to build the package.
* Add custom line shape support to BeamCXLine model. (#394)
* Add PeriodicTransformXD and VectorPeriodicTransformXD functions to support the data simulated with periodic boundary conditions. (#387)
* Add CylindricalTransform and VectorCylindricalTransform to transform functions from cylindrical to Cartesian coordinates. (#387)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools>=62.3", "oldest-supported-numpy", "cython>=0.28", "raysect==0.8.1"]
requires = ["setuptools>=62.3", "oldest-supported-numpy", "cython~=3.0", "raysect==0.8.1"]
build-backend="setuptools.build_meta"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cython>=0.28
cython~=3.0
numpy>=1.14,<2.0
scipy
matplotlib
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@

source_paths = ["cherab", "demos"]
compilation_includes = [".", numpy.get_include()]
compilation_args = ["-O3"]
compilation_args = ["-O3", "-Wno-unreachable-code-fallthrough"]
cython_directives = {"language_level": 3}
macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
setup_path = path.dirname(path.abspath(__file__))
num_processes = int(os.getenv("CHERAB_NCPU", "-1"))
if num_processes == -1:
Expand All @@ -61,6 +62,7 @@
[pyx_file],
include_dirs=compilation_includes,
extra_compile_args=compilation_args,
define_macros=macros,
),
)

Expand Down Expand Up @@ -122,7 +124,7 @@
],
extras_require={
# Running ./dev/build_docs.sh runs setup.py, which requires cython.
"docs": ["cython", "sphinx", "sphinx-rtd-theme", "sphinx-tabs"],
"docs": ["cython~=3.0", "sphinx", "sphinx-rtd-theme", "sphinx-tabs"],
},
packages=find_packages(include=["cherab*"]),
package_data={"": [
Expand Down
Loading