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"