diff options
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -55,11 +55,14 @@ FULLVERSION = versioneer.get_version() # 1.22.0 ... -> ISRELEASED == True, VERSION == 1.22.0 # 1.22.0rc1 ... -> ISRELEASED == True, VERSION == 1.22.0 ISRELEASED = re.search(r'(dev|\+)', FULLVERSION) is None -MAJOR, MINOR, MICRO = re.match(r'(\d+)\.(\d+)\.(\d+)', FULLVERSION).groups() +_V_MATCH = re.match(r'(\d+)\.(\d+)\.(\d+)', FULLVERSION) +if _V_MATCH is None: + raise RuntimeError(f'Cannot parse version {FULLVERSION}') +MAJOR, MINOR, MICRO = _V_MATCH.groups() VERSION = '{}.{}.{}'.format(MAJOR, MINOR, MICRO) # The first version not in the `Programming Language :: Python :: ...` classifiers above -if sys.version_info >= (3, 10): +if sys.version_info >= (3, 11): fmt = "NumPy {} may not yet support Python {}.{}." warnings.warn( fmt.format(VERSION, *sys.version_info[:2]), @@ -210,9 +213,8 @@ def get_build_overrides(): class new_build_clib(build_clib): def build_a_library(self, build_info, lib_name, libraries): if _needs_gcc_c99_flag(self): - args = build_info.get('extra_compiler_args') or [] - args.append('-std=c99') - build_info['extra_compiler_args'] = args + build_info['extra_cflags'] = ['-std=c99'] + build_info['extra_cxxflags'] = ['-std=c++11'] build_clib.build_a_library(self, build_info, lib_name, libraries) class new_build_ext(build_ext): |