From 73e43d9b0c0c33d8276615552b522b90214cae6b Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Wed, 25 Jun 2025 18:26:29 -0700 Subject: [PATCH] pin Cython in pyproject.toml and meta.yaml to <3.1.0 when Python >= 3.13 --- conda-recipe/meta.yaml | 6 ++++++ pyproject.toml | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index a6e06f0dfd..812362a627 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -41,6 +41,12 @@ requirements: - {{ dep }} {% elif dep.startswith('build>=') %} - {{ 'python-' ~ dep }} + {% elif dep.startswith('cython') %} + {% if dep.split(';')[1] == "python_version<'3.13'" %} + - {{ dep.split(';')[0] }} # [py<313] + {% else %} + - {{ dep.split(';')[0] }} # [py>=313] + {% endif %} {% else %} - {{ dep|replace('_','-') }} {% endif %} diff --git a/pyproject.toml b/pyproject.toml index 1fa466942e..dec9c10ab6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,8 @@ requires = [ "scikit-build>=0.17.0", "ninja>=1.11.1; platform_system!='Windows'", "cmake>=3.29.0", - "cython>=3.0.10", + "cython>=3.0.10;python_version<'3.13'", + "cython>=3.0.10,<3.1.0;python_version>='3.13'", "numpy >=1.23", # WARNING: check with doc how to upgrade "versioneer[toml]==0.29"