diff --git a/setup.py b/setup.py index de577db..c4e7f2e 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ from distutils.command.build import build from distutils.command.build_ext import build_ext from distutils.command.config import config -from distutils.sysconfig import get_python_inc +from distutils.sysconfig import get_python_inc, get_python_version from setuptools import setup, find_packages, Command @@ -272,7 +272,7 @@ def initialize_options(self): is_git_ok, is_curl_ok, is_wget_ok = check_command_availability(['git', 'curl', 'wget']) package = 'sakura' - version = 'libsakura-5.0.8' + version = 'libsakura-5.1.0' zipname = '{}.zip'.format(version) tgzname = '{}-{}.tgz'.format(package, version) base_url = 'https://github.com/tnakazato/sakura' @@ -391,6 +391,8 @@ def finalize_options(self): if self.python_library is None: self.python_library = get_python_library(self.python_include_dir) + self.python_version = get_python_version() + debug_print_user_options(self) print('fftw3-root-dir={}'.format(self.fftw3_root_dir)) @@ -406,6 +408,8 @@ def __configure_cmake_command(self): cmd += ' -DPYTHON_LIBRARY={}'.format(self.python_library) + cmd += f' -DPYTHON_VERSION={self.python_version}' + if self.cxx_compiler is not None: cmd += ' -DCMAKE_CXX_COMPILER={}'.format(self.cxx_compiler)