diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b29fa3..91bff92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 with: diff --git a/pyopa/backend/pyopa.pyx b/pyopa/backend/pyopa.pyx index 0ccb6f2..3fbed04 100644 --- a/pyopa/backend/pyopa.pyx +++ b/pyopa/backend/pyopa.pyx @@ -1,18 +1,20 @@ +# cython: language_level=3 + import json -import logging import math import os -import pkgutil import re import sys from math import log10 -from subprocess import call -cimport cpyopa +from . cimport cpyopa cimport numpy as np import numpy as np + + + def matrix_dir(): default_matrix_dir = os.path.realpath( os.path.join(os.path.dirname(__file__), '..', 'matrices', 'json')) diff --git a/pyproject.toml b/pyproject.toml index 539b599..c079aeb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,6 @@ requires = [ # setuptools, wheel and Cython are needed for the setup.py based build "setuptools>=59.2.0", "wheel>=0.37.0", - "Cython>=0.29.30,<3.0", + "Cython>=3.0", "numpy", ] diff --git a/setup.py b/setup.py index a20b059..6d23368 100644 --- a/setup.py +++ b/setup.py @@ -26,8 +26,9 @@ sources=[os.path.join(package_name, 'backend', 'pyopa.pyx')] + list(map(lambda c: os.path.join(c_dir, c), c_sources)), extra_compile_args=['-O2', '-DSIMDE_ENABLE_NATIVE_ALIASES'], #, '-DPY_DEBUG'], - include_dirs=[c_dir, numpy.get_include(), '.'] - )] + include_dirs=[c_dir, os.path.join(package_name, "backend"), numpy.get_include(), '.'] + )], + compiler_directives={"language_level": "3"}, ), name=package_name, version=__version__,