Skip to content

Commit 8cd2326

Browse files
committed
the new way to get cython/C include paths
1 parent 80f9df2 commit 8cd2326

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ requires = [
44
'pkgconfig',
55
'cython >=3.0, != 3.0.3, <4.0',
66
'cysignals >=1.10.2',
7-
'sagemath-environment',
8-
'sagemath-categories',
7+
'sagemath',
98
]
109
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from Cython.Build import cythonize
1010
from Cython.Compiler.Errors import CompileError
1111
from codecs import open # To open the README file with proper encoding
12-
from sage.env import sage_include_directories
12+
from sage.config import get_include_dirs
1313

1414
# For the tests
1515
class SageTest(TestCommand):
@@ -52,7 +52,7 @@ def readfile(filename):
5252
sources=[os.path.join('sage_numerical_backends_coin',
5353
'coin_backend.pyx')],
5454
libraries=cbc_libs,
55-
include_dirs=sage_include_directories() + cbc_include_dirs,
55+
include_dirs=list(map(str, get_include_dirs())) + cbc_include_dirs,
5656
library_dirs=cbc_library_dirs,
5757
extra_compile_args=['-std=c++11'])
5858
]
@@ -63,7 +63,7 @@ def readfile(filename):
6363

6464
if any(x in sys.argv
6565
for x in ['build', 'build_ext', 'bdist_wheel', 'install']):
66-
ext_modules = cythonize(ext_modules, include_path=sys.path,
66+
ext_modules = cythonize(ext_modules, include_path=list(map(str, get_include_dirs())) + sys.path,
6767
compile_time_env=compile_time_env)
6868

6969
setup(

0 commit comments

Comments
 (0)