Compare commits

...

3 Commits

Author SHA1 Message Date
Adam J. Stewart
b98a21056d Fix fetching for Python 3.9.6 (#24686)
When using Python 3.9.6, Spack is no longer able to fetch anything. Commands like `spack fetch` and `spack install` all break.

Python 3.9.6 includes a [new change](https://github.com/python/cpython/pull/25853/files#diff-b3712475a413ec972134c0260c8f1eb1deefb66184f740ef00c37b4487ef873eR462) that means that `scheme` must be a string, it cannot be None. The solution is to use an empty string like the method default.

Fixes #24644. Also see https://github.com/Homebrew/homebrew-core/pull/80175 where this issue was discovered by CI. Thanks @branchvincent for reporting such a serious issue before any actual users encountered it!

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2022-05-12 20:24:44 -07:00
eugeneswalker
abed824555 hdf5: filter compiler wrapper: h5pcc, h5pfc (#24092) 2021-06-04 09:47:26 -07:00
eugeneswalker
e1a831816e defaults/cray: use modules.yaml from defaults/linux (#23932) 2021-05-27 10:51:08 -07:00
3 changed files with 29 additions and 7 deletions

View File

@@ -0,0 +1,21 @@
# -------------------------------------------------------------------------
# This is the default configuration for Spack's module file generation.
#
# Settings here are versioned with Spack and are intended to provide
# sensible defaults out of the box. Spack maintainers should edit this
# file to keep it current.
#
# Users can override these settings by editing the following files.
#
# Per-spack-instance settings (overrides defaults):
# $SPACK_ROOT/etc/spack/modules.yaml
#
# Per-user settings (overrides default and site settings):
# ~/.spack/modules.yaml
# -------------------------------------------------------------------------
modules:
prefix_inspections:
lib:
- LD_LIBRARY_PATH
lib64:
- LD_LIBRARY_PATH

View File

@@ -11,8 +11,8 @@
import os.path
import re
from six import string_types
import six.moves.urllib.parse as urllib_parse
from six import string_types
import spack.util.path
@@ -151,21 +151,21 @@ def join(base_url, path, *extra, **kwargs):
for x in itertools.chain((base_url, path), extra)]
n = len(paths)
last_abs_component = None
scheme = None
scheme = ''
for i in range(n - 1, -1, -1):
obj = urllib_parse.urlparse(
paths[i], scheme=None, allow_fragments=False)
paths[i], scheme='', allow_fragments=False)
scheme = obj.scheme
# in either case the component is absolute
if scheme is not None or obj.path.startswith('/'):
if scheme is None:
if scheme or obj.path.startswith('/'):
if not scheme:
# Without a scheme, we have to go back looking for the
# next-last component that specifies a scheme.
for j in range(i - 1, -1, -1):
obj = urllib_parse.urlparse(
paths[j], scheme=None, allow_fragments=False)
paths[j], scheme='', allow_fragments=False)
if obj.scheme:
paths[i] = '{SM}://{NL}{PATH}'.format(

View File

@@ -167,7 +167,8 @@ def patch(self):
'fortran/src/H5Fff_F03.f90',
string=True, ignore_absent=True)
filter_compiler_wrappers('h5cc', 'h5c++', 'h5fc', relative_root='bin')
filter_compiler_wrappers('h5cc', 'h5c++', 'h5fc',
'h5pcc', 'h5pfc', relative_root='bin')
def url_for_version(self, version):
url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-{0}/hdf5-{1}/src/hdf5-{1}.tar.gz"