diff options
author | vucoda <vucoda@gmail.com> | 2023-08-01 17:12:46 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-01 03:42:46 -0400 |
commit | b28ae6736977beefdae997a52d5e5b6b072b8879 (patch) | |
tree | 96b0965c37c90d511d3bce4051d07eedd78d28de /var | |
parent | b8590fbd057621c9b71c5b274b21e1802d52bc45 (diff) | |
download | spack-b28ae6736977beefdae997a52d5e5b6b072b8879.tar.gz spack-b28ae6736977beefdae997a52d5e5b6b072b8879.tar.bz2 spack-b28ae6736977beefdae997a52d5e5b6b072b8879.tar.xz spack-b28ae6736977beefdae997a52d5e5b6b072b8879.zip |
Fix source bootstrapping for Debian and derivatives (#39107)
* Fix Python package.py for Debian and derivatives to find the system Python library location
When bootstrapping from source, find_library() does not contain any paths that work for Debian and derivatives. fixes #36666
* Update to pass styling
* Update to styling
* Update python package.py with fake config value for LIBPL
* Update python package.py libpl config_vars entry to follow double quote standard
* styling update
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/python/package.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index eb991c42ae..5eeb2913c6 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -878,6 +878,9 @@ print(json.dumps(config)) "INCLUDEPY": self.prefix.include.join("python{}").format(version), "LIBDEST": self.prefix.lib.join("python{}").format(version), "LIBDIR": self.prefix.lib, + "LIBPL": self.prefix.lib.join("python{0}") + .join("config-{0}-{1}") + .format(version, sys.platform), "LDLIBRARY": "{}python{}.{}".format(lib_prefix, version, dso_suffix), "LIBRARY": "{}python{}.{}".format(lib_prefix, version, stat_suffix), "LDSHARED": "cc", @@ -947,6 +950,10 @@ print(json.dumps(config)) # in either lib or lib64, so we need to ask Python where its LIBDIR is. libdir = self.config_vars["LIBDIR"] + # Debian and derivatives use a triplet subdir under /usr/lib, LIBPL can be used + # to get the Python library directory + libpldir = self.config_vars["LIBPL"] + # The system Python installation on macOS and Homebrew installations # install libraries into a Frameworks directory frameworkprefix = self.config_vars["PYTHONFRAMEWORKPREFIX"] @@ -962,7 +969,14 @@ print(json.dumps(config)) win_bin_dir = self.config_vars["BINDIR"] win_root_dir = self.config_vars["prefix"] - directories = [libdir, frameworkprefix, macos_developerdir, win_bin_dir, win_root_dir] + directories = [ + libdir, + libpldir, + frameworkprefix, + macos_developerdir, + win_bin_dir, + win_root_dir, + ] # The Python shipped with Xcode command line tools isn't in any of these locations for subdir in ["lib", "lib64"]: |