From 700f0106e09f3e4061d6797ea676e2194e19ceb8 Mon Sep 17 00:00:00 2001 From: KmolYuan Date: Sat, 26 Oct 2019 21:40:33 +0800 Subject: [PATCH 1/2] Remove unused macro. --- cython/setup.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cython/setup.py b/cython/setup.py index db57e607..eb70b19e 100644 --- a/cython/setup.py +++ b/cython/setup.py @@ -17,13 +17,10 @@ from setuptools.command.build_ext import build_ext from setuptools.command.sdist import sdist from distutils import file_util, dir_util from platform import system -from distutils import sysconfig include_path = pth_join('python_solvespace', 'include') src_path = pth_join('python_solvespace', 'src') platform_path = pth_join(src_path, 'platform') -ver = sysconfig.get_config_var('VERSION') -lib = sysconfig.get_config_var('BINDIR') def write(doc, *parts): @@ -44,7 +41,6 @@ def find_version(*file_paths): macros = [ - ('_hypot', 'hypot'), ('M_PI', 'PI'), ('_USE_MATH_DEFINES', None), ('ISOLATION_AWARE_ENABLED', None), @@ -82,6 +78,8 @@ elif system() == 'Windows': # Platform sources sources.append(pth_join(platform_path, 'utilwin.cpp')) sources.append(pth_join(platform_path, 'platform.cpp')) + if sys.version_info < (3, 7): + macros.append(('_hypot', 'hypot')) else: sources.append(pth_join(platform_path, 'utilunix.cpp')) @@ -112,7 +110,7 @@ class Build(build_ext): e.extra_compile_args = compile_args elif compiler == 'msvc': for e in self.extensions: - e.define_macros = macros[2:] + e.define_macros = macros[1:] e.libraries = ['shell32'] super(Build, self).build_extensions() From 1cd310dabf11d987b292eb4bf856fb37206fd6ab Mon Sep 17 00:00:00 2001 From: KmolYuan Date: Sat, 26 Oct 2019 23:29:25 +0800 Subject: [PATCH 2/2] Update Python 3.8 to stable version. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5b7dca39..4af64781 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,7 +59,7 @@ matrix: python: "3.7" - <<: *linux - python: "3.8-dev" + python: "3.8" - &osx os: osx @@ -90,7 +90,7 @@ matrix: env: PYTHON=3.7.0 - <<: *osx - env: PYTHON=3.8-dev + env: PYTHON=3.8.0 before_cache: - rm -rf $HOME/.cache/pip/log