Python: improve site_packages_dir handling (#28346)

* Python: improve site_packages_dir handling

* Replace all site_packages_dir with purelib/platlib
This commit is contained in:
Adam J. Stewart
2022-01-13 20:11:16 -06:00
committed by GitHub
parent 2e238307c7
commit e0f044561e
46 changed files with 192 additions and 231 deletions

View File

@@ -68,12 +68,10 @@ def cmake_python_hints(self):
"""Return standard CMake defines to ensure that the
current spec is the one found by CMake find_package(Python, ...)
"""
python_spec = self.spec['python']
include_dir = join_path(
python_spec.prefix, python_spec.package.config_vars['python_inc']['false'])
python = self.spec['python']
return [
self.define('Python_EXECUTABLE', str(python_spec.command)),
self.define('Python_INCLUDE_DIR', include_dir)
self.define('Python_EXECUTABLE', str(python.command)),
self.define('Python_INCLUDE_DIR', python.package.config_vars['include'])
]
@property