Skip to content

Commit 0129c6c

Browse files
committed
A couple of boost-python fixes
Fixes to Boost recipe when building with Python. Signed-off-by: Jean-Francois Panisset <panisset@gmail.com>
1 parent 5d27b6f commit 0129c6c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/conan/recipes/boost/conanfile.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ def _python_inc(self):
976976
"""
977977
return self._run_python_script("from __future__ import print_function; "
978978
"import sysconfig; "
979-
"print(sysconfig.get_python_inc())")
979+
"print(sysconfig.get_path('include'))") # ASWF: get_python_inc() deprecated in Python 3.10
980980

981981
@property
982982
def _python_abiflags(self):
@@ -1022,7 +1022,11 @@ def _python_library_dir(self):
10221022
"""
10231023
library = self._get_python_var("LIBRARY")
10241024
ldlibrary = self._get_python_var("LDLIBRARY")
1025-
libdir = self._get_python_var("LIBDIR")
1025+
# ASWF: we don't have a fully relocatable python build, sysconfig can return
1026+
# paths into the Conan build environment.
1027+
# libdir = self._get_python_var("LIBDIR")
1028+
pythonInfo = self.dependencies["cpython"]
1029+
libdir = os.path.join(pythonInfo.package_folder, pythonInfo.cpp_info.libdirs[0])
10261030
multiarch = self._get_python_var("MULTIARCH")
10271031
masd = self._get_python_var("multiarchsubdir")
10281032
with_dyld = self._get_python_var("WITH_DYLD")

0 commit comments

Comments
 (0)