Remove unused macro.

pull/493/head
KmolYuan 2019-10-26 21:40:33 +08:00
parent 74bc01193a
commit 700f0106e0
1 changed files with 3 additions and 5 deletions

View File

@ -17,13 +17,10 @@ from setuptools.command.build_ext import build_ext
from setuptools.command.sdist import sdist from setuptools.command.sdist import sdist
from distutils import file_util, dir_util from distutils import file_util, dir_util
from platform import system from platform import system
from distutils import sysconfig
include_path = pth_join('python_solvespace', 'include') include_path = pth_join('python_solvespace', 'include')
src_path = pth_join('python_solvespace', 'src') src_path = pth_join('python_solvespace', 'src')
platform_path = pth_join(src_path, 'platform') platform_path = pth_join(src_path, 'platform')
ver = sysconfig.get_config_var('VERSION')
lib = sysconfig.get_config_var('BINDIR')
def write(doc, *parts): def write(doc, *parts):
@ -44,7 +41,6 @@ def find_version(*file_paths):
macros = [ macros = [
('_hypot', 'hypot'),
('M_PI', 'PI'), ('M_PI', 'PI'),
('_USE_MATH_DEFINES', None), ('_USE_MATH_DEFINES', None),
('ISOLATION_AWARE_ENABLED', None), ('ISOLATION_AWARE_ENABLED', None),
@ -82,6 +78,8 @@ elif system() == 'Windows':
# Platform sources # Platform sources
sources.append(pth_join(platform_path, 'utilwin.cpp')) sources.append(pth_join(platform_path, 'utilwin.cpp'))
sources.append(pth_join(platform_path, 'platform.cpp')) sources.append(pth_join(platform_path, 'platform.cpp'))
if sys.version_info < (3, 7):
macros.append(('_hypot', 'hypot'))
else: else:
sources.append(pth_join(platform_path, 'utilunix.cpp')) sources.append(pth_join(platform_path, 'utilunix.cpp'))
@ -112,7 +110,7 @@ class Build(build_ext):
e.extra_compile_args = compile_args e.extra_compile_args = compile_args
elif compiler == 'msvc': elif compiler == 'msvc':
for e in self.extensions: for e in self.extensions:
e.define_macros = macros[2:] e.define_macros = macros[1:]
e.libraries = ['shell32'] e.libraries = ['shell32']
super(Build, self).build_extensions() super(Build, self).build_extensions()