File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22import os
33from subprocess import check_call
44
5- from setuptools import setup
6- from setuptools .extension import Extension
75from Cython .Distutils import build_ext
86from Cython .Build import cythonize
97
108
11- default_include_dirs = []
12- default_lib_dirs = []
9+ if sys .version_info < (3 , 12 ):
10+ from distutils .core import setup
11+ from distutils .extension import Extension
12+ from numpy .distutils .system_info import default_include_dirs , default_lib_dirs
13+ from distutils .sysconfig import get_config_vars
14+ else :
15+ from setuptools import setup
16+ from setuptools .extension import Extension
17+ from sysconfig import get_config_vars
18+ default_include_dirs = []
19+ default_lib_dirs = []
20+
1321
1422libraries = ["flint" ]
1523
3644 else :
3745 # For the MSVC toolchain link with mpir instead of gmp
3846 libraries += ["mpir" , "mpfr" , "pthreads" ]
47+ else :
48+ libraries = ["flint" ]
49+ (opt ,) = get_config_vars ('OPT' )
50+ os .environ ['OPT' ] = " " .join (flag for flag in opt .split () if flag != '-Wstrict-prototypes' )
3951
4052
4153define_macros = []
You can’t perform that action at this time.
0 commit comments