diff --git a/.readthedocs.yaml b/.readthedocs.yaml index ec372f94e..b1bcf1f9e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -18,3 +18,4 @@ sphinx: python: install: - requirements: src/docs/sphinx/requirements.txt + diff --git a/.uberenv_config.json b/.uberenv_config.json index a187f8452..21e0a8cbf 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -5,24 +5,12 @@ "spack_build_mode" : "uberenv-pkg", "spack_configs_path": "scripts/uberenv_configs/spack_configs", "spack_packages_path": "scripts/uberenv_configs/packages", +"spack_skip_externals": "true", "spack_url": "https://github.com/spack/spack", -"spack_commit": "6983d520fa64d8c7343dcc627197b0e6c621d1a6", -"spack_activate" : {"py-numpy" : ["+python"], - "py-sphinx": ["+python","+doc"], - "py-docutils": ["+python","+doc"], - "py-pygments": ["+python","+doc"], - "py-babel": ["+python","+doc"], - "py-jinja2": ["+python","+doc"], - "py-packaging": ["+python","+doc"], - "py-snowballstemmer": ["+python","+doc"], - "py-imagesize": ["+python","+doc"], - "py-sphinxcontrib-htmlhelp": ["+python","+doc"], - "py-sphinxcontrib-serializinghtml": ["+python","+doc"], - "py-sphinxcontrib-applehelp": ["+python","+doc"], - "py-sphinxcontrib-devhelp": ["+python","+doc"], - "py-sphinxcontrib-qthelp": ["+python","+doc"], - "py-alabaster": ["+python","+doc"], - "py-requests": ["+python","+doc"], - "py-mpi4py" : ["+python", "+mpi"], - "py-sphinx-rtd-theme": ["+python","+doc"] } +"spack_commit": "6812713cf470b473a607f0de0e8e1cf53f804fb7", +"spack_host_config_patches": + { + "PYTHON_EXECUTABLE": "spack_view/bin/python3", + "SPHINX_EXECUTABLE": "spack_view/bin/sphinx-build" + } } diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c7544b21c..bfedf9a3e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -79,40 +79,11 @@ stages: ENABLE_ADIOS: OFF ENABLE_PARMETIS: OFF ENABLE_PYTHON: OFF - ENABLE_PYTHON2: OFF CMAKE_VERSION: 3.14.2 BLT_CXX_STD: c++11 BLT_ENABLE_FIND_MPI: ON - ub_18_shared_py27_cmake_3_14: - containerImage: ${{ variables.ubuntu_18_tag }} - COMPILER_CC: gcc - COMPILER_CXX: g++ - COMPILER_FC: gfortran - COMPILER_SPEC: gcc - FORCE_COMPILERS: OFF - BUILD_SHARED_LIBS: ON - CMAKE_BUILD_TYPE: Debug - ENABLE_COVERAGE: ON - ENABLE_MPI: ON - ENABLE_DOCS: OFF - ENABLE_RELAY_WEBSERVER: ON - ENABLE_OPENMP: ON - ENABLE_HDF5: ON - ENABLE_HDF5_COMPAT: ON - HDF5_SPEC: "hdf5~mpi" - ENABLE_SILO: ON - ENABLE_ADIOS: OFF - ENABLE_PYTHON: ON - ENABLE_PARMETIS: ON - ENABLE_PYTHON2: ON - PYTHON2_CONSTRAINTS: " ^py-setuptools@44.1.0 ^py-numpy@1.16.5" - PYTHON_VERSION: 2.7.18 - CMAKE_VERSION: 3.14.2 - BLT_CXX_STD: c++11 - BLT_ENABLE_FIND_MPI: ON - - ub_18_static_py27_cmake_3_14: + ub_18_static_py37_cmake_3_14: containerImage: ${{ variables.ubuntu_18_tag }} COMPILER_CC: gcc COMPILER_CXX: g++ @@ -133,9 +104,7 @@ stages: ENABLE_ADIOS: OFF ENABLE_PARMETIS: ON ENABLE_PYTHON: ON - ENABLE_PYTHON2: ON - PYTHON2_CONSTRAINTS: " ^py-setuptools@44.1.0 ^py-numpy@1.16.5" - PYTHON_VERSION: 2.7.18 + PYTHON_VERSION: 3.7.16 CMAKE_VERSION: 3.14.2 BLT_CXX_STD: c++11 BLT_ENABLE_FIND_MPI: ON @@ -161,8 +130,7 @@ stages: ENABLE_ADIOS: OFF ENABLE_PARMETIS: ON ENABLE_PYTHON: ON - ENABLE_PYTHON2: OFF - PYTHON_VERSION: 3.7.6 + PYTHON_VERSION: 3.7.16 CMAKE_VERSION: 3.14.2 BLT_CXX_STD: c++11 BLT_ENABLE_FIND_MPI: ON @@ -188,8 +156,7 @@ stages: ENABLE_ADIOS: OFF ENABLE_PARMETIS: ON ENABLE_PYTHON: ON - ENABLE_PYTHON2: OFF - PYTHON_VERSION: 3.8.8 + PYTHON_VERSION: 3.8.16 CMAKE_VERSION: 3.21.1 BLT_CXX_STD: c++11 BLT_ENABLE_FIND_MPI: ON @@ -215,8 +182,7 @@ stages: ENABLE_ADIOS: OFF ENABLE_PARMETIS: ON ENABLE_PYTHON: ON - ENABLE_PYTHON2: OFF - PYTHON_VERSION: 3.8.8 + PYTHON_VERSION: 3.8.16 CMAKE_VERSION: 3.21.1 BLT_CXX_STD: c++11 BLT_ENABLE_FIND_MPI: ON @@ -244,8 +210,7 @@ stages: ENABLE_ADIOS: OFF ENABLE_PARMETIS: ON ENABLE_PYTHON: ON - ENABLE_PYTHON2: OFF - PYTHON_VERSION: 3.8.8 + PYTHON_VERSION: 3.8.16 CMAKE_VERSION: 3.20.0 BLT_CXX_STD: c++11 BLT_ENABLE_FIND_MPI: ON @@ -273,8 +238,7 @@ stages: ENABLE_ADIOS: OFF ENABLE_PARMETIS: ON ENABLE_PYTHON: ON - ENABLE_PYTHON2: OFF - PYTHON_VERSION: 3.10.6 + PYTHON_VERSION: 3.10.10 CMAKE_VERSION: 3.24.2 BLT_CXX_STD: c++11 BLT_ENABLE_FIND_MPI: ON @@ -302,8 +266,7 @@ stages: ENABLE_ADIOS: OFF ENABLE_PARMETIS: ON ENABLE_PYTHON: ON - ENABLE_PYTHON2: OFF - PYTHON_VERSION: 3.10.6 + PYTHON_VERSION: 3.10.10 CMAKE_VERSION: 3.26.0 BLT_CXX_STD: c++11 BLT_ENABLE_FIND_MPI: ON @@ -332,7 +295,6 @@ stages: # ENABLE_ADIOS: OFF # ENABLE_PARMETIS: ON # ENABLE_PYTHON: ON - # ENABLE_PYTHON2: OFF # PYTHON_VERSION: 3.11.2 # CMAKE_VERSION: 3.26.0 # BLT_CXX_STD: c++11 @@ -383,8 +345,7 @@ stages: ENABLE_ADIOS: OFF ENABLE_PARMETIS: ON ENABLE_PYTHON: ON - ENABLE_PYTHON2: OFF - PYTHON_VERSION: 3.8.8 + PYTHON_VERSION: 3.8.16 CMAKE_VERSION: 3.21.1 BLT_CXX_STD: c++11 BLT_ENABLE_FIND_MPI: ON @@ -443,7 +404,6 @@ stages: export SPACK_SPEC="${SPACK_SPEC} ^cmake@${CMAKE_VERSION}" # python constraints if [ $ENABLE_PYTHON = 'ON' ]; then export SPACK_SPEC="${SPACK_SPEC} ^python@${PYTHON_VERSION}"; fi - if [ $ENABLE_PYTHON2 = 'ON' ]; then export SPACK_SPEC="${SPACK_SPEC} ${PYTHON2_CONSTRAINTS}"; fi # hdf5 constraints if [ $ENABLE_HDF5 = 'ON' ]; then export SPACK_SPEC="${SPACK_SPEC} ^${HDF5_SPEC}"; fi # silo constraints @@ -452,7 +412,7 @@ stages: echo "SPACK SPEC:" echo $SPACK_SPEC # run uber to build tpls - python3 scripts/uberenv/uberenv.py -k --spack-allow-deprecated --spec "${SPACK_SPEC}" --spack-config-dir=scripts/uberenv_configs/spack_configs/configs/alpinedav/ubuntu_18.04_devel/ + python3 scripts/uberenv/uberenv.py -k --spec "${SPACK_SPEC}" --spack-env-file=scripts/uberenv_configs/spack_configs/envs/alpinedav-ubuntu_18.04_devel/spack.yaml displayName: 'Spack Build Tpls' - script: | @@ -467,7 +427,7 @@ stages: # capture current path export ROOT_DIR=`pwd` # find spack generated host config file - export HOST_CONFIG=`ls ${ROOT_DIR}/uberenv_libs/*.cmake` + export HOST_CONFIG=`ls ${ROOT_DIR}/uberenv_libs/*-patch.cmake` echo $HOST_CONFIG # find spack installed cmake export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin` @@ -475,9 +435,6 @@ stages: echo $PATH which cmake cmake --version - # prepare build dir - mkdir build - cd build # setup cmake options export CMAKE_OPTS="-C ${HOST_CONFIG}" export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" @@ -485,7 +442,7 @@ stages: export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_COVERAGE=${ENABLE_COVERAGE}" export CMAKE_OPTS="${CMAKE_OPTS} -DBLT_CXX_STD=${BLT_CXX_STD}" export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_FIND_MPI=${BLT_ENABLE_FIND_MPI}" - export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_INSTALL_PREFIX=../install" + export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/install" # this is now getting set to the uberenv-pkg loc by spack, ignore for ci export CMAKE_OPTS="${CMAKE_OPTS} -DPYTHON_MODULE_INSTALL_PREFIX=IGNORE" if [ $FORCE_COMPILERS = 'ON' ]; then export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_C_COMPILER=${COMPILER_CC}"; fi @@ -495,7 +452,7 @@ stages: # configure echo "CMAKE OPTIONS:" echo ${CMAKE_OPTS} - cmake ${CMAKE_OPTS} ../src + cmake ${CMAKE_OPTS} -B build -S src displayName: 'Configure with CMake' - script: | @@ -648,13 +605,20 @@ stages: ls -l # find spack installed cmake export ROOT_DIR=`pwd` - export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin` + export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin/` export PATH=${CMAKE_BIN_DIR}:$PATH echo $PATH - # find spack installed python - export PYTHON_EXE=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/python*/bin/python` + # find spack installed python (use spack view dir) + export PYTHON_EXE=`ls ${ROOT_DIR}/uberenv_libs/spack_view/bin/python3` # add conduit module to python path export PYTHONPATH=${ROOT_DIR}/install/python-modules/ + # NOTE: + # also add spack's python view dir to python path env var + # this wasn't needed with older spack. + # I think embedded linking logic is resolving symlinks and therefore + # not using view layout that wires up dependent python modules + py_site_pkgs_dir=`ls -d ${ROOT_DIR}/uberenv_libs/spack_view/lib/python*/site-packages` + export PYTHONPATH=${PYTHONPATH}:${py_site_pkgs_dir} echo $PYTHONPATH # CI LD_LIB FIX # NOTE: diff --git a/scripts/uberenv b/scripts/uberenv index 6e4f6b38d..5430066e5 160000 --- a/scripts/uberenv +++ b/scripts/uberenv @@ -1 +1 @@ -Subproject commit 6e4f6b38deae8e8d4a0aaf5667098bf86cc76fea +Subproject commit 5430066e5bcd81b77e1f5d7aa8fce2e7b0848126 diff --git a/scripts/uberenv_configs/packages/cmake/5882-enable-cce-fortran-preprocessing.patch b/scripts/uberenv_configs/packages/cmake/5882-enable-cce-fortran-preprocessing.patch deleted file mode 100644 index 5e01a0079..000000000 --- a/scripts/uberenv_configs/packages/cmake/5882-enable-cce-fortran-preprocessing.patch +++ /dev/null @@ -1,31 +0,0 @@ -From ef513fe3d1d864d865d7143699834228988a7cd7 Mon Sep 17 00:00:00 2001 -From: Brad King -Date: Fri, 5 Mar 2021 08:08:16 -0500 -Subject: [PATCH] Cray: Enable explicit Fortran preprocessing for Ninja - generator - -Cray 11.0 adds support for preprocessing with output written to a -specified file (instead of always next to the source). Use it to -enable Cray Fortran with the Ninja generator. - -Patch-by: James Elliott -Fixes: #20731 ---- - Modules/Compiler/Cray-Fortran.cmake | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/Modules/Compiler/Cray-Fortran.cmake b/Modules/Compiler/Cray-Fortran.cmake -index 696ae76074..0d5e1c7679 100644 ---- a/Modules/Compiler/Cray-Fortran.cmake -+++ b/Modules/Compiler/Cray-Fortran.cmake -@@ -19,3 +19,7 @@ else() - set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-eZ") - set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-dZ") - endif() -+ -+if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 11.0) -+ set(CMAKE_Fortran_PREPROCESS_SOURCE " -o -eP ") -+endif() --- -GitLab - diff --git a/scripts/uberenv_configs/packages/cmake/cmake-macos-add-coreservices.patch b/scripts/uberenv_configs/packages/cmake/cmake-macos-add-coreservices.patch deleted file mode 100644 index 62e7244e3..000000000 --- a/scripts/uberenv_configs/packages/cmake/cmake-macos-add-coreservices.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 475e78d9071b34690617a85853433a9fc15da057 -Author: Chuck Atkins -Date: Mon Jan 28 16:28:28 2019 -0500 - - macOS: Add missing explicit dependency on CoreServices framework - - On Apple, the implementation of cmGlobalXCodeGenerator::Open uses - LSOpenCFURLRef from CoreServices. This get's transitively pulled in - from CMake's libuv build but ends up generating a linker error when - using an external libuv. This explicitly adds the appropriate - dependency. - -diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt -index 311f3f4e56..8aff8f6b2f 100644 ---- a/Source/CMakeLists.txt -+++ b/Source/CMakeLists.txt -@@ -791,9 +791,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc" - endif() - endif() - --# On Apple we need CoreFoundation -+# On Apple we need CoreFoundation and CoreServices - if(APPLE) - target_link_libraries(CMakeLib "-framework CoreFoundation") -+ target_link_libraries(CMakeLib "-framework CoreServices") - endif() - - if(WIN32 AND NOT UNIX) diff --git a/scripts/uberenv_configs/packages/cmake/cmake-revert-findmpi-link-flag-list.patch b/scripts/uberenv_configs/packages/cmake/cmake-revert-findmpi-link-flag-list.patch deleted file mode 100644 index 4a977d843..000000000 --- a/scripts/uberenv_configs/packages/cmake/cmake-revert-findmpi-link-flag-list.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 89fc3b1fd22f97f9380990b521dd79f306ac18fd Mon Sep 17 00:00:00 2001 -From: Chuck Atkins -Date: Thu, 25 Jul 2019 09:37:20 -0400 -Subject: [PATCH] Revert "FindMPI: Store imported target link flags as a list - instead of a string" - -This reverts commit f7eaa342de316707d99e6ae29c693a480861560d. ---- - Modules/FindMPI.cmake | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake -index a80f799..fe09764 100644 ---- a/Modules/FindMPI.cmake -+++ b/Modules/FindMPI.cmake -@@ -1144,9 +1144,7 @@ macro(_MPI_create_imported_target LANG) - - set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_LIBRARIES "") - if(MPI_${LANG}_LINK_FLAGS) -- separate_arguments(_MPI_${LANG}_LINK_FLAGS NATIVE_COMMAND "${MPI_${LANG}_LINK_FLAGS}") -- set_property(TARGET MPI::MPI_${LANG} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${_MPI_${LANG}_LINK_FLAGS}") -- unset(_MPI_${LANG}_LINK_FLAGS) -+ set_property(TARGET MPI::MPI_${LANG} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_${LANG}_LINK_FLAGS}") - endif() - # If the compiler links MPI implicitly, no libraries will be found as they're contained within - # CMAKE__IMPLICIT_LINK_LIBRARIES already. --- -2.5.5 - diff --git a/scripts/uberenv_configs/packages/cmake/fix-xlf-ninja-mr-4075.patch b/scripts/uberenv_configs/packages/cmake/fix-xlf-ninja-mr-4075.patch deleted file mode 100644 index 584e33850..000000000 --- a/scripts/uberenv_configs/packages/cmake/fix-xlf-ninja-mr-4075.patch +++ /dev/null @@ -1,145 +0,0 @@ -From 19f267c75e84b72c4de42570be0c4222bb93aaff Mon Sep 17 00:00:00 2001 -From: Brad King -Date: Thu, 21 Nov 2019 14:38:35 -0500 -Subject: [PATCH] XL: Add support for Ninja and XL Fortran - -The Ninja generator's support for Fortran requires that source files -be preprocessed explicitly first. However, the `xlf` compiler does -not have a simple `-E` option or equivalent to do preprocessing. -The only documented way to get preprocessed output is to use `-d` -to leave it behind, but only at an inflexible location. - -Instead, create our own `cpp` wrapper script and substitute it for the -real preprocessor using `-tF -B ...`. Teach the wrapper to map the -`cpp` output to the location we need and then invoke the real `cpp` -underneath. - -Fixes: #19450 ---- - Help/release/dev/xlf-ninja.rst | 5 ++++ - Modules/CMakeDetermineCompilerId.cmake | 10 +++++++ - Modules/CMakeDetermineFortranCompiler.cmake | 5 ++++ - Modules/CMakeFortranCompiler.cmake.in | 1 + - Modules/Compiler/XL-Fortran.cmake | 4 +++ - Modules/Compiler/XL-Fortran/cpp | 29 +++++++++++++++++++++ - 6 files changed, 54 insertions(+) - create mode 100644 Help/release/dev/xlf-ninja.rst - create mode 100755 Modules/Compiler/XL-Fortran/cpp - -diff --git a/Help/release/dev/xlf-ninja.rst b/Help/release/dev/xlf-ninja.rst -new file mode 100644 -index 0000000000..916e713008 ---- /dev/null -+++ b/Help/release/dev/xlf-ninja.rst -@@ -0,0 +1,5 @@ -+xlf-ninja -+--------- -+ -+* The IBM XL Fortran compiler is now supported by the :generator:`Ninja` -+ generator. -diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake -index f7ef755aeb..0b3664c5de 100644 ---- a/Modules/CMakeDetermineCompilerId.cmake -+++ b/Modules/CMakeDetermineCompilerId.cmake -@@ -182,6 +182,10 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) - message(STATUS "The ${lang} compiler identification is unknown") - endif() - -+ if(lang STREQUAL "Fortran" AND CMAKE_${lang}_COMPILER_ID STREQUAL "XL") -+ set(CMAKE_${lang}_XL_CPP "${CMAKE_${lang}_COMPILER_ID_CPP}" PARENT_SCOPE) -+ endif() -+ - set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE) - set(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE) - set(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID "${CMAKE_${lang}_COMPILER_ARCHITECTURE_ID}" PARENT_SCOPE) -@@ -542,6 +546,12 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} - ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT - RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT - ) -+ if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "exec: [^\n]*\\((/[^,\n]*/cpp),CMakeFortranCompilerId.F") -+ set(_cpp "${CMAKE_MATCH_1}") -+ if(EXISTS "${_cpp}") -+ set(CMAKE_${lang}_COMPILER_ID_CPP "${_cpp}" PARENT_SCOPE) -+ endif() -+ endif() - endif() - - # Check the result of compilation. -diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake -index 5ddd64fae8..e8505417d6 100644 ---- a/Modules/CMakeDetermineFortranCompiler.cmake -+++ b/Modules/CMakeDetermineFortranCompiler.cmake -@@ -271,6 +271,11 @@ include(CMakeFindBinUtils) - include(Compiler/${CMAKE_Fortran_COMPILER_ID}-FindBinUtils OPTIONAL) - unset(_CMAKE_PROCESSING_LANGUAGE) - -+if(CMAKE_Fortran_XL_CPP) -+ set(_SET_CMAKE_Fortran_XL_CPP -+ "set(CMAKE_Fortran_XL_CPP \"${CMAKE_Fortran_XL_CPP}\")") -+endif() -+ - if(CMAKE_Fortran_COMPILER_ARCHITECTURE_ID) - set(_SET_CMAKE_Fortran_COMPILER_ARCHITECTURE_ID - "set(CMAKE_Fortran_COMPILER_ARCHITECTURE_ID ${CMAKE_Fortran_COMPILER_ARCHITECTURE_ID})") -diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in -index ae7b73ac4a..34f44aa542 100644 ---- a/Modules/CMakeFortranCompiler.cmake.in -+++ b/Modules/CMakeFortranCompiler.cmake.in -@@ -6,6 +6,7 @@ set(CMAKE_Fortran_COMPILER_WRAPPER "@CMAKE_Fortran_COMPILER_WRAPPER@") - set(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@") - set(CMAKE_Fortran_SIMULATE_ID "@CMAKE_Fortran_SIMULATE_ID@") - set(CMAKE_Fortran_SIMULATE_VERSION "@CMAKE_Fortran_SIMULATE_VERSION@") -+@_SET_CMAKE_Fortran_XL_CPP@ - @_SET_CMAKE_Fortran_COMPILER_ARCHITECTURE_ID@ - @SET_MSVC_Fortran_ARCHITECTURE_ID@ - set(CMAKE_AR "@CMAKE_AR@") -diff --git a/Modules/Compiler/XL-Fortran.cmake b/Modules/Compiler/XL-Fortran.cmake -index c4fb09712a..1683dff4f0 100644 ---- a/Modules/Compiler/XL-Fortran.cmake -+++ b/Modules/Compiler/XL-Fortran.cmake -@@ -18,3 +18,7 @@ string(APPEND CMAKE_Fortran_FLAGS_INIT " -qthreaded -qhalt=e") - # xlf: 1501-214 (W) command option E reserved for future use - ignored - set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE) - set(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE) -+ -+set(CMAKE_Fortran_PREPROCESS_SOURCE -+ " -qpreprocess -qnoobject -qsuppress=1517-020 -tF -B \"${CMAKE_CURRENT_LIST_DIR}/XL-Fortran/\" -WF,--cpp,\"${CMAKE_Fortran_XL_CPP}\",--out, " -+ ) -diff --git a/Modules/Compiler/XL-Fortran/cpp b/Modules/Compiler/XL-Fortran/cpp -new file mode 100755 -index 0000000000..1fd62c26a0 ---- /dev/null -+++ b/Modules/Compiler/XL-Fortran/cpp -@@ -0,0 +1,29 @@ -+#!/usr/bin/env bash -+ -+# Source file. -+src="$(printf %q "$1")" -+shift -+ -+# Output file the compiler expects. -+out="$(printf %q "$1")" -+shift -+ -+# Create the file the compiler expects. It will check syntax. -+>"$out" -+ -+cpp='cpp' -+opts='' -+while test "$#" != 0; do -+ case "$1" in -+ # Extract the option for the path to cpp. -+ --cpp) shift; cpp="$(printf %q "$1")" ;; -+ # Extract the option for our own output file. -+ --out) shift; out="$(printf %q "$1")" ;; -+ # Collect the rest of the command line. -+ *) opts="$opts $(printf %q "$1")" ;; -+ esac -+ shift -+done -+ -+# Execute the real preprocessor tool. -+eval "exec $cpp $src $out $opts" --- -2.24.1 - diff --git a/scripts/uberenv_configs/packages/cmake/fujitsu_add_linker_option.patch b/scripts/uberenv_configs/packages/cmake/fujitsu_add_linker_option.patch deleted file mode 100644 index 4a0cf7abb..000000000 --- a/scripts/uberenv_configs/packages/cmake/fujitsu_add_linker_option.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- spack-src/Modules/FortranCInterface/Verify/CMakeLists.txt.org 2020-06-05 15:54:59.559043595 +0900 -+++ spack-src/Modules/FortranCInterface/Verify/CMakeLists.txt 2020-06-05 15:58:28.150062948 +0900 -@@ -4,6 +4,7 @@ - cmake_minimum_required(VERSION ${CMAKE_VERSION}) - project(VerifyFortranC C Fortran) - -+set (CMAKE_EXE_LINKER_FLAGS "--linkfortran") - option(VERIFY_CXX "Whether to verify C++ and Fortran" OFF) - if(VERIFY_CXX) - enable_language(CXX) diff --git a/scripts/uberenv_configs/packages/cmake/ignore_crayxc_warnings.patch b/scripts/uberenv_configs/packages/cmake/ignore_crayxc_warnings.patch deleted file mode 100644 index 85928f0e8..000000000 --- a/scripts/uberenv_configs/packages/cmake/ignore_crayxc_warnings.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake -index fb68ed78c9..c6c1ba667f 100644 ---- a/Source/Checks/cm_cxx_features.cmake -+++ b/Source/Checks/cm_cxx_features.cmake -@@ -17,2 +17,6 @@ function(cm_check_cxx_feature name) - set(check_output "${OUTPUT}") -+ # Filter out libhugetlbfs warnings -+ string(REGEX REPLACE "[^\n]*libhugetlbfs [^\n]*: WARNING[^\n]*" "" check_output "${check_output}") -+ # Filter out icpc warnings -+ string(REGEX REPLACE "[^\n]*icpc: command line warning #10121: overriding [^\n]*" "" check_output "${check_output}") - # Filter out MSBuild output that looks like a warning. diff --git a/scripts/uberenv_configs/packages/cmake/intel-c-gnu11.patch b/scripts/uberenv_configs/packages/cmake/intel-c-gnu11.patch deleted file mode 100644 index afe6f871e..000000000 --- a/scripts/uberenv_configs/packages/cmake/intel-c-gnu11.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake -index eb9602a..edca154 100644 ---- a/Modules/Compiler/Intel-C.cmake -+++ b/Modules/Compiler/Intel-C.cmake -@@ -16,14 +16,14 @@ endif() - - if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0) - set(CMAKE_C11_STANDARD_COMPILE_OPTION "${_std}=c11") -- set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=c11") -+ set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=gnu11") - endif() - --if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) -+if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0) - set(CMAKE_C90_STANDARD_COMPILE_OPTION "${_std}=c89") -- set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=c89") -+ set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=gnu89") - set(CMAKE_C99_STANDARD_COMPILE_OPTION "${_std}=c99") -- set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=c99") -+ set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=gnu99") - endif() - - if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) diff --git a/scripts/uberenv_configs/packages/cmake/intel-cxx-bootstrap.patch b/scripts/uberenv_configs/packages/cmake/intel-cxx-bootstrap.patch deleted file mode 100644 index d5475b2e5..000000000 --- a/scripts/uberenv_configs/packages/cmake/intel-cxx-bootstrap.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/bootstrap 2020-07-24 11:02:56.488414260 +0200 -+++ b/bootstrap 2020-07-24 11:03:20.763775094 +0200 -@@ -1179,7 +1179,7 @@ - } - #endif - --#if (__cplusplus >= 201703L || defined(__INTEL_COMPILER) && defined(__cpp_if_constexpr)) -+#if (__cplusplus >= 201703L || defined(__INTEL_COMPILER) && defined(__cpp_deduction_guides)) - #include - template ::type = nullptr> diff --git a/scripts/uberenv_configs/packages/cmake/nag-response-files.patch b/scripts/uberenv_configs/packages/cmake/nag-response-files.patch deleted file mode 100644 index 07dc4a1aa..000000000 --- a/scripts/uberenv_configs/packages/cmake/nag-response-files.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff --git a/Modules/Compiler/NAG-Fortran.cmake b/Modules/Compiler/NAG-Fortran.cmake -index 39aae1883..9973febc3 100644 ---- a/Modules/Compiler/NAG-Fortran.cmake -+++ b/Modules/Compiler/NAG-Fortran.cmake -@@ -34,3 +34,4 @@ set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed") - set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free") - set(CMAKE_Fortran_COMPILE_OPTIONS_PIC "-PIC") - set(CMAKE_Fortran_COMPILE_OPTIONS_PIE "-PIC") -+set(CMAKE_Fortran_RESPONSE_FILE_LINK_FLAG "-Wl,@") diff --git a/scripts/uberenv_configs/packages/cmake/package.py b/scripts/uberenv_configs/packages/cmake/package.py deleted file mode 100644 index f3847d0a7..000000000 --- a/scripts/uberenv_configs/packages/cmake/package.py +++ /dev/null @@ -1,426 +0,0 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import os -import re -import sys - -import spack.build_environment -from spack.package import * - -is_windows = sys.platform == "win32" - - -class Cmake(Package): - """A cross-platform, open-source build system. CMake is a family of - tools designed to build, test and package software. - """ - - homepage = "https://www.cmake.org" - url = "https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0.tar.gz" - git = "https://gitlab.kitware.com/cmake/cmake.git" - maintainers = ["chuckatkins"] - - tags = ["build-tools"] - - executables = ["^cmake$"] - - version("master", branch="master") - # FYI: added for conduit to test newer version - version("3.26.0", sha256="4256613188857e95700621f7cdaaeb954f3546a9249e942bc2f9b3c26e381365") - version("3.24.2", sha256="0d9020f06f3ddf17fb537dc228e1a56c927ee506b486f55fe2dc19f69bf0c8db") - version("3.24.1", sha256="4931e277a4db1a805f13baa7013a7757a0cbfe5b7932882925c7061d9d1fa82b") - version("3.24.0", sha256="c2b61f7cdecb1576cad25f918a8f42b8685d88a832fd4b62b9e0fa32e915a658") - version("3.23.3", sha256="06fefaf0ad94989724b56f733093c2623f6f84356e5beb955957f9ce3ee28809") - version("3.23.2", sha256="f316b40053466f9a416adf981efda41b160ca859e97f6a484b447ea299ff26aa") - version("3.23.1", sha256="33fd10a8ec687a4d0d5b42473f10459bb92b3ae7def2b745dc10b192760869f3") - version("3.23.0", sha256="5ab0a12f702f44013be7e19534cd9094d65cc9fe7b2cd0f8c9e5318e0fe4ac82") - version("3.22.6", sha256="73933163670ea4ea95c231549007b0c7243282293506a2cf4443714826ad5ec3") - version("3.22.5", sha256="d3987c3f7759fa0a401c5fcd5076be44a19613bfaa8baee1b5d1835750dc5375") - version("3.22.4", sha256="5c55d0b0bc4c191549e3502b8f99a4fe892077611df22b4178cc020626e22a47") - version("3.22.3", sha256="9f8469166f94553b6978a16ee29227ec49a2eb5ceb608275dec40d8ae0d1b5a0") - version("3.22.2", sha256="3c1c478b9650b107d452c5bd545c72e2fad4e37c09b89a1984b9a2f46df6aced") - version("3.22.1", sha256="0e998229549d7b3f368703d20e248e7ee1f853910d42704aa87918c213ea82c0") - version("3.22.0", sha256="998c7ba34778d2dfdb3df8a695469e24b11e2bfa21fbe41b361a3f45e1c9345e") - version("3.21.7", sha256="3523c4a5afc61ac3d7c92835301cdf092129c9b672a6ee17e68c92e928c1375a") - version("3.21.6", sha256="b7c3ac35ca7ed3cce8c192c9c873e6061aaecc8b2bc564290e629b10bff59f3c") - version("3.21.5", sha256="c73587b5ab827d56c09f0a1e256b12743ff200495e31fc9686f2b9dc8a28897f") - version("3.21.4", sha256="d9570a95c215f4c9886dd0f0564ca4ef8d18c30750f157238ea12669c2985978") - version("3.21.3", sha256="d14d06df4265134ee42c4d50f5a60cb8b471b7b6a47da8e5d914d49dd783794f") - version("3.21.2", sha256="94275e0b61c84bb42710f5320a23c6dcb2c6ee032ae7d2a616f53f68b3d21659") - version("3.21.1", sha256="fac3915171d4dff25913975d712f76e69aef44bf738ba7b976793a458b4cfed4") - version("3.21.0", sha256="4a42d56449a51f4d3809ab4d3b61fd4a96a469e56266e896ce1009b5768bd2ab") - version("3.20.6", sha256="a0bd485e1a38dd13c0baec89d5f4adbf61c7fd32fddb38eabc69a75bc0b65d72") - version("3.20.5", sha256="12c8040ef5c6f1bc5b8868cede16bb7926c18980f59779e299ab52cbc6f15bb0") - version("3.20.4", sha256="87a4060298f2c6bb09d479de1400bc78195a5b55a65622a7dceeb3d1090a1b16") - version("3.20.3", sha256="4d008ac3461e271fcfac26a05936f77fc7ab64402156fb371d41284851a651b8") - version("3.20.2", sha256="aecf6ecb975179eb3bb6a4a50cae192d41e92b9372b02300f9e8f1d5f559544e") - version("3.20.1", sha256="3f1808b9b00281df06c91dd7a021d7f52f724101000da7985a401678dfe035b0") - version("3.20.0", sha256="9c06b2ddf7c337e31d8201f6ebcd3bba86a9a033976a9aee207fe0c6971f4755") - version("3.19.8", sha256="09b4fa4837aae55c75fb170f6a6e2b44818deba48335d1969deddfbb34e30369") - version("3.19.7", sha256="58a15f0d56a0afccc3cc5371234fce73fcc6c8f9dbd775d898e510b83175588e") - version("3.19.6", sha256="ec87ab67c45f47c4285f204280c5cde48e1c920cfcfed1555b27fb3b1a1d20ba") - version("3.19.5", sha256="c432296eb5dec6d71eae15d140f6297d63df44e9ffe3e453628d1dc8fc4201ce") - version("3.19.4", sha256="7d0232b9f1c57e8de81f38071ef8203e6820fe7eec8ae46a1df125d88dbcc2e1") - version("3.19.3", sha256="3faca7c131494a1e34d66e9f8972ff5369e48d419ea8ceaa3dc15b4c11367732") - version("3.19.2", sha256="e3e0fd3b23b7fb13e1a856581078e0776ffa2df4e9d3164039c36d3315e0c7f0") - version("3.19.1", sha256="1d266ea3a76ef650cdcf16c782a317cb4a7aa461617ee941e389cb48738a3aba") - version("3.19.0", sha256="fdda688155aa7e72b7c63ef6f559fca4b6c07382ea6dca0beb5f45aececaf493") - version("3.18.6", sha256="124f571ab70332da97a173cb794dfa09a5b20ccbb80a08e56570a500f47b6600") - version("3.18.5", sha256="080bf24b0f73f4bf3ec368d2be1aa59369b9bb1cd693deeb6f18fe553ca74ab4") - version("3.18.4", sha256="597c61358e6a92ecbfad42a9b5321ddd801fc7e7eca08441307c9138382d4f77") - version("3.18.3", sha256="2c89f4e30af4914fd6fb5d00f863629812ada848eee4e2d29ec7e456d7fa32e5") - version("3.18.2", sha256="5d4e40fc775d3d828c72e5c45906b4d9b59003c9433ff1b36a1cb552bbd51d7e") - version("3.18.1", sha256="c0e3338bd37e67155b9d1e9526fec326b5c541f74857771b7ffed0c46ad62508") - version("3.18.0", sha256="83b4ffcb9482a73961521d2bafe4a16df0168f03f56e6624c419c461e5317e29") - version("3.17.5", sha256="8c3083d98fd93c1228d5e4e40dbff2dd88f4f7b73b9fa24a2938627b8bc28f1a") - version("3.17.4", sha256="86985d73d0a63ec99c236aab5287316e252164f33d7c4cb160954a980c71f36f") - version("3.17.3", sha256="0bd60d512275dc9f6ef2a2865426a184642ceb3761794e6b65bff233b91d8c40") - version("3.17.1", sha256="3aa9114485da39cbd9665a0bfe986894a282d5f0882b1dea960a739496620727") - version("3.17.0", sha256="b74c05b55115eacc4fa2b77a814981dbda05cdc95a53e279fe16b7b272f00847") - version("3.16.9", sha256="1708361827a5a0de37d55f5c9698004c035abb1de6120a376d5d59a81630191f") - version("3.16.8", sha256="177434021132686cb901fea7db9fa2345efe48d566b998961594d5cc346ac588") - version("3.16.7", sha256="5f49c95a2933b1800f14840f3a389f4cef0b19093985a35053b43f38ec21358f") - version("3.16.6", sha256="6f6ff1a197851b0fa8412ff5de602e6717a4eb9509b2c385b08589c4e7a16b62") - version("3.16.5", sha256="5f760b50b8ecc9c0c37135fae5fbf00a2fef617059aa9d61c1bb91653e5a8bfc") - version("3.16.4", sha256="9bcc8c114d9da603af9512083ed7d4a39911d16105466beba165ba8fe939ac2c") - version("3.16.3", sha256="e54f16df9b53dac30fd626415833a6e75b0e47915393843da1825b096ee60668") - version("3.16.2", sha256="8c09786ec60ca2be354c29829072c38113de9184f29928eb9da8446a5f2ce6a9") - version("3.16.1", sha256="a275b3168fa8626eca4465da7bb159ff07c8c6cb0fb7179be59e12cbdfa725fd") - version("3.16.0", sha256="6da56556c63cab6e9a3e1656e8763ed4a841ac9859fefb63cbe79472e67e8c5f") - version("3.15.7", sha256="71999d8a14c9b51708847371250a61533439a7331eb7702ac105cfb3cb1be54b") - version("3.15.6", sha256="3fa17992ac97d3fc856ffba5d3b10578744ea5b4736818f01e6067f0253b2db5") - version("3.15.5", sha256="fbdd7cef15c0ced06bb13024bfda0ecc0dedbcaaaa6b8a5d368c75255243beb4") - version("3.15.4", sha256="8a211589ea21374e49b25fc1fc170e2d5c7462b795f1b29c84dd0e984301ed7a") - version("3.15.3", sha256="13958243a01365b05652fa01b21d40fa834f70a9e30efa69c02604e64f58b8f5") - version("3.15.2", sha256="539088cb29a68e6d6a8fba5c00951e5e5b1a92c68fa38a83e1ed2f355933f768") - version("3.15.1", sha256="18dec548d8f8b04d53c60f9cedcebaa6762f8425339d1e2c889c383d3ccdd7f7") - version("3.15.0", sha256="0678d74a45832cacaea053d85a5685f3ed8352475e6ddf9fcb742ffca00199b5") - version("3.14.7", sha256="9221993e0af3e6d10124d840ff24f5b2f3b884416fca04d3312cb0388dec1385") - version("3.14.6", sha256="4e8ea11cabe459308671b476469eace1622e770317a15951d7b55a82ccaaccb9") - version("3.14.5", sha256="505ae49ebe3c63c595fa5f814975d8b72848447ee13b6613b0f8b96ebda18c06") - version("3.14.4", sha256="00b4dc9b0066079d10f16eed32ec592963a44e7967371d2f5077fd1670ff36d9") - version("3.14.3", sha256="215d0b64e81307182b29b63e562edf30b3875b834efdad09b3fcb5a7d2f4b632") - version("3.14.2", sha256="a3cbf562b99270c0ff192f692139e98c605f292bfdbc04d70da0309a5358e71e") - version("3.14.1", sha256="7321be640406338fc12590609c42b0fae7ea12980855c1be363d25dcd76bb25f") - version("3.14.0", sha256="aa76ba67b3c2af1946701f847073f4652af5cbd9f141f221c97af99127e75502") - version("3.13.5", sha256="526db6a4b47772d1943b2f86de693e712f9dacf3d7c13b19197c9bef133766a5") - version("3.13.4", sha256="fdd928fee35f472920071d1c7f1a6a2b72c9b25e04f7a37b409349aef3f20e9b") - version("3.13.3", sha256="665f905036b1f731a2a16f83fb298b1fb9d0f98c382625d023097151ad016b25") - version("3.13.2", sha256="c925e7d2c5ba511a69f43543ed7b4182a7d446c274c7480d0e42cd933076ae25") - version("3.13.1", sha256="befe1ce6d672f2881350e94d4e3cc809697dd2c09e5b708b76c1dae74e1b2210") - version("3.13.0", sha256="4058b2f1a53c026564e8936698d56c3b352d90df067b195cb749a97a3d273c90") - version("3.12.4", sha256="5255584bfd043eb717562cff8942d472f1c0e4679c4941d84baadaa9b28e3194") - version("3.12.3", sha256="acbf13af31a741794106b76e5d22448b004a66485fc99f6d7df4d22e99da164a") - version("3.12.2", sha256="0f97485799e51a7070cc11494f3e02349b0fc3a24cc12b082e737bf67a0581a4") - version("3.12.1", sha256="c53d5c2ce81d7a957ee83e3e635c8cda5dfe20c9d501a4828ee28e1615e57ab2") - version("3.12.0", sha256="d0781a90f6cdb9049d104ac16a150f9350b693498b9dea8a0331e799db6b9d69") - version("3.11.4", sha256="8f864e9f78917de3e1483e256270daabc4a321741592c5b36af028e72bff87f5") - version("3.11.3", sha256="287135b6beb7ffc1ccd02707271080bbf14c21d80c067ae2c0040e5f3508c39a") - version("3.11.2", sha256="5ebc22bbcf2b4c7a20c4190d42c084cf38680a85b1a7980a2f1d5b4a52bf5248") - version("3.11.1", sha256="57bebc6ca4d1d42c6385249d148d9216087e0fda57a47dc5c858790a70217d0c") - version("3.11.0", sha256="c313bee371d4d255be2b4e96fd59b11d58bc550a7c78c021444ae565709a656b") - version("3.10.3", sha256="0c3a1dcf0be03e40cf4f341dda79c96ffb6c35ae35f2f911845b72dab3559cf8") - version("3.10.2", sha256="80d0faad4ab56de07aa21a7fc692c88c4ce6156d42b0579c6962004a70a3218b") - version("3.10.1", sha256="7be36ee24b0f5928251b644d29f5ff268330a916944ef4a75e23ba01e7573284") - version("3.10.0", sha256="b3345c17609ea0f039960ef470aa099de9942135990930a57c14575aae884987") - version("3.9.6", sha256="7410851a783a41b521214ad987bb534a7e4a65e059651a2514e6ebfc8f46b218") - version("3.9.4", sha256="b5d86f12ae0072db520fdbdad67405f799eb728b610ed66043c20a92b4906ca1") - version("3.9.2", sha256="954a5801a456ee48e76f01107c9a4961677dd0f3e115275bbd18410dc22ba3c1") - version("3.9.0", sha256="167701525183dbb722b9ffe69fb525aa2b81798cf12f5ce1c020c93394dfae0f") - version("3.8.2", sha256="da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d") - version("3.8.1", sha256="ce5d9161396e06501b00e52933783150a87c33080d4bdcef461b5b7fd24ac228") - version("3.8.0", sha256="cab99162e648257343a20f61bcd0b287f5e88e36fcb2f1d77959da60b7f35969") - version("3.7.2", sha256="dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0") - version("3.7.1", sha256="449a5bce64dbd4d5b9517ebd1a1248ed197add6ad27934478976fd5f1f9330e1") - version("3.6.1", sha256="28ee98ec40427d41a45673847db7a905b59ce9243bb866eaf59dce0f58aaef11") - version("3.6.0", sha256="fd05ed40cc40ef9ef99fac7b0ece2e0b871858a82feade48546f5d2940147670") - version("3.5.2", sha256="92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a") - version("3.5.1", sha256="93d651a754bcf6f0124669646391dd5774c0fc4d407c384e3ae76ef9a60477e8") - version("3.5.0", sha256="92c83ad8a4fd6224cf6319a60b399854f55b38ebe9d297c942408b792b1a9efa") - version("3.4.3", sha256="b73f8c1029611df7ed81796bf5ca8ba0ef41c6761132340c73ffe42704f980fa") - version("3.4.0", sha256="a5b82bf6ace6c481cdb911fd5d372a302740cbefd387e05297cb37f7468d1cea") - version("3.3.1", sha256="cd65022c6a0707f1c7112f99e9c981677fdd5518f7ddfa0f778d4cee7113e3d6") - version("3.1.0", sha256="8bdc3fa3f2da81bc10c772a6b64cc9052acc2901d42e1e1b2588b40df224aad9") - version("3.0.2", sha256="6b4ea61eadbbd9bec0ccb383c29d1f4496eacc121ef7acf37c7a24777805693e") - version("2.8.10.2", sha256="ce524fb39da06ee6d47534bbcec6e0b50422e18b62abc4781a4ba72ea2910eb1") - - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - - # Revert the change that introduced a regression when parsing mpi link - # flags, see: https://gitlab.kitware.com/cmake/cmake/issues/19516 - patch("cmake-revert-findmpi-link-flag-list.patch", when="@3.15.0") - - # Fix linker error when using external libs on darwin. - # See https://gitlab.kitware.com/cmake/cmake/merge_requests/2873 - patch("cmake-macos-add-coreservices.patch", when="@3.11.0:3.13.3") - - # Fix builds with XLF + Ninja generator - # https://gitlab.kitware.com/cmake/cmake/merge_requests/4075 - patch( - "fix-xlf-ninja-mr-4075.patch", - sha256="42d8b2163a2f37a745800ec13a96c08a3a20d5e67af51031e51f63313d0dedd1", - when="@3.15.5", - ) - - depends_on("ninja", when="platform=windows") - - # We default ownlibs to true because it greatly speeds up the CMake - # build, and CMake is built frequently. Also, CMake is almost always - # a build dependency, and its libs will not interfere with others in - # the build. - variant("ownlibs", default=True, description="Use CMake-provided third-party libraries") - variant("qt", default=False, description="Enables the build of cmake-gui") - variant( - "doc", - default=False, - description="Enables the generation of html and man page documentation", - ) - variant("ncurses", default=not is_windows, description="Enables the build of the ncurses gui") - - # See https://gitlab.kitware.com/cmake/cmake/-/issues/21135 - conflicts( - "%gcc platform=darwin", - when="@:3.17", - msg="CMake <3.18 does not compile with GCC on macOS, " - "please use %apple-clang or a newer CMake release. " - "See: https://gitlab.kitware.com/cmake/cmake/-/issues/21135", - ) - - # Vendored dependencies do not build with nvhpc; it's also more - # transparent to patch Spack's versions of CMake's dependencies. - conflicts("+ownlibs %nvhpc") - - with when("~ownlibs"): - depends_on("curl") - depends_on("expat") - depends_on("zlib") - # expat/zlib are used in CMake/CTest, so why not require them in libarchive. - depends_on("libarchive@3.1.0: xar=expat compression=zlib") - depends_on("libarchive@3.3.3:", when="@3.15.0:") - depends_on("libuv@1.0.0:1.10", when="@3.7.0:3.10.3") - depends_on("libuv@1.10.0:1.10", when="@3.11.0:3.11") - depends_on("libuv@1.10.0:", when="@3.12.0:") - depends_on("rhash", when="@3.8.0:") - - for plat in ["darwin", "linux", "cray"]: - with when("+ownlibs platform=%s" % plat): - depends_on("openssl") - depends_on("openssl@:1.0", when="@:3.6.9") - - depends_on("qt", when="+qt") - depends_on("ncurses", when="+ncurses") - - with when("+doc"): - depends_on("python@2.7.11:", type="build") - depends_on("py-sphinx", type="build") - - # TODO: update curl package to build with Windows SSL implementation - # at which point we can build with +ownlibs on Windows - conflicts("~ownlibs", when="platform=windows") - # Cannot build with Intel, should be fixed in 3.6.2 - # https://gitlab.kitware.com/cmake/cmake/issues/16226 - patch("intel-c-gnu11.patch", when="@3.6.0:3.6.1") - - # Cannot build with Intel again, should be fixed in 3.17.4 and 3.18.1 - # https://gitlab.kitware.com/cmake/cmake/-/issues/21013 - patch("intel-cxx-bootstrap.patch", when="@3.17.0:3.17.3,3.18.0") - - # https://gitlab.kitware.com/cmake/cmake/issues/18232 - patch("nag-response-files.patch", when="@3.7:3.12") - - # Cray libhugetlbfs and icpc warnings failing CXX tests - # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4698 - # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4681 - patch("ignore_crayxc_warnings.patch", when="@3.7:3.17.2") - - # The Fujitsu compiler requires the '--linkfortran' option - # to combine C++ and Fortran programs. - patch("fujitsu_add_linker_option.patch", when="%fj") - - # Remove -A from the C++ flags we use when CXX_EXTENSIONS is OFF - # Should be fixed in 3.19. - # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5025 - patch("pgi-cxx-ansi.patch", when="@3.15:3.18") - - # Adds CCE v11+ fortran preprocessing definition. - # requires Cmake 3.19+ - # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5882 - patch( - "5882-enable-cce-fortran-preprocessing.patch", - sha256="b48396c0e4f61756248156b6cebe9bc0d7a22228639b47b5aa77c9330588ce88", - when="@3.19.0:3.19", - ) - - conflicts("+qt", when="^qt@5.4.0") # qt-5.4.0 has broken CMake modules - - # https://gitlab.kitware.com/cmake/cmake/issues/18166 - conflicts("%intel", when="@3.11.0:3.11.4") - conflicts("%intel@:14", when="@3.14:", msg="Intel 14 has immature C++11 support") - - resource( - name="cmake-bootstrap", - url="https://cmake.org/files/v3.21/cmake-3.21.2-windows-x86_64.zip", - checksum="213a4e6485b711cb0a48cbd97b10dfe161a46bfe37b8f3205f47e99ffec434d2", - placement="cmake-bootstrap", - when="@3.0.2: platform=windows", - ) - - resource( - name="cmake-bootstrap", - url="https://cmake.org/files/v2.8/cmake-2.8.4-win32-x86.zip", - checksum="8b9b520f3372ce67e33d086421c1cb29a5826d0b9b074f44a8a0304e44cf88f3", - placement="cmake-bootstrap", - when="@:2.8.10.2 platform=windows", - ) - - phases = ["bootstrap", "build", "install"] - - @classmethod - def determine_version(cls, exe): - output = Executable(exe)("--version", output=str, error=str) - match = re.search(r"cmake.*version\s+(\S+)", output) - return match.group(1) if match else None - - def flag_handler(self, name, flags): - if name == "cxxflags" and self.compiler.name == "fj": - cxx11plus_flags = (self.compiler.cxx11_flag, self.compiler.cxx14_flag) - cxxpre11_flags = self.compiler.cxx98_flag - if any(f in flags for f in cxxpre11_flags): - raise ValueError("cannot build cmake pre-c++11 standard") - elif not any(f in flags for f in cxx11plus_flags): - flags.append(self.compiler.cxx11_flag) - return (flags, None, None) - - def setup_build_environment(self, env): - spec = self.spec - if "+ownlibs" in spec and "platform=windows" not in spec: - env.set("OPENSSL_ROOT_DIR", spec["openssl"].prefix) - - def bootstrap_args(self): - spec = self.spec - args = [] - self.generator = make - - if not sys.platform == "win32": - args.append("--prefix={0}".format(self.prefix)) - - if spack.build_environment.should_set_parallel_jobs(jobserver_support=True): - args.append("--parallel={0}".format(make_jobs)) - - if "+ownlibs" in spec: - # Build and link to the CMake-provided third-party libraries - args.append("--no-system-libs") - else: - # Build and link to the Spack-installed third-party libraries - args.append("--system-libs") - - if spec.satisfies("@3.2:"): - # jsoncpp requires CMake to build - # use CMake-provided library to avoid circular dependency - args.append("--no-system-jsoncpp") - - if "+qt" in spec: - args.append("--qt-gui") - else: - args.append("--no-qt-gui") - - if "+doc" in spec: - args.append("--sphinx-html") - args.append("--sphinx-man") - - # Now for CMake arguments to pass after the initial bootstrap - args.append("--") - else: - args.append("-DCMAKE_INSTALL_PREFIX=%s" % self.prefix) - if self.spec.satisfies("platform=windows"): - args.append("-GNinja") - self.generator = ninja - args.append("-DCMAKE_BUILD_TYPE={0}".format(self.spec.variants["build_type"].value)) - - # Install CMake correctly, even if `spack install` runs - # inside a ctest environment - args.append("-DCMake_TEST_INSTALL=OFF") - - # When building our own private copy of curl we still require an - # external openssl. - if "+ownlibs" in spec: - if "platform=windows" in spec: - args.append("-DCMAKE_USE_OPENSSL=OFF") - else: - args.append("-DCMAKE_USE_OPENSSL=ON") - - args.append("-DBUILD_CursesDialog=%s" % str("+ncurses" in spec)) - - # Make CMake find its own dependencies. - rpaths = spack.build_environment.get_rpaths(self) - prefixes = spack.build_environment.get_cmake_prefix_path(self) - args.extend( - [ - "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON", - "-DCMAKE_INSTALL_RPATH={0}".format(";".join(str(v) for v in rpaths)), - "-DCMAKE_PREFIX_PATH={0}".format(";".join(str(v) for v in prefixes)), - ] - ) - - return args - - def cmake_bootstrap(self): - exe_prefix = self.stage.source_path - relative_cmake_exe = os.path.join("cmake-bootstrap", "bin", "cmake.exe") - return Executable(os.path.join(exe_prefix, relative_cmake_exe)) - - def bootstrap(self, spec, prefix): - bootstrap_args = self.bootstrap_args() - if sys.platform == "win32": - bootstrap = self.cmake_bootstrap() - bootstrap_args.extend(["."]) - else: - bootstrap = Executable("./bootstrap") - bootstrap(*bootstrap_args) - - def build(self, spec, prefix): - self.generator() - - @run_after("build") - @on_package_attributes(run_tests=True) - def build_test(self): - # Some tests fail, takes forever - self.generator("test") - - def install(self, spec, prefix): - self.generator("install") - - if spec.satisfies("%fj"): - for f in find(self.prefix, "FindMPI.cmake", recursive=True): - filter_file("mpcc_r)", "mpcc_r mpifcc)", f, string=True) - filter_file("mpc++_r)", "mpc++_r mpiFCC)", f, string=True) - filter_file("mpifc)", "mpifc mpifrt)", f, string=True) - - def setup_dependent_package(self, module, dependent_spec): - """Called before cmake packages's install() methods.""" - - module.cmake = Executable(self.spec.prefix.bin.cmake) - module.ctest = Executable(self.spec.prefix.bin.ctest) - - def test(self): - """Perform smoke tests on the installed package.""" - spec_vers_str = "version {0}".format(self.spec.version) - - for exe in ["ccmake", "cmake", "cpack", "ctest"]: - reason = "test version of {0} is {1}".format(exe, spec_vers_str) - self.run_test( - exe, - ["--version"], - [spec_vers_str], - installed=True, - purpose=reason, - skip_missing=True, - ) diff --git a/scripts/uberenv_configs/packages/cmake/pgi-cxx-ansi.patch b/scripts/uberenv_configs/packages/cmake/pgi-cxx-ansi.patch deleted file mode 100644 index 953ea23e5..000000000 --- a/scripts/uberenv_configs/packages/cmake/pgi-cxx-ansi.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 52eee1938919deb59cc2b51d44f365f0d9a418e5 Mon Sep 17 00:00:00 2001 -From: Tin Huynh -Date: Thu, 16 Jul 2020 16:06:33 -0700 -Subject: [PATCH] PGI: Remove -A from the C++ flags we use when CXX_EXTENSIONS - is OFF - -Since commit 9b97cb5562 (PGI: Add language standards for PGI, -2017-05-01, v3.9.0-rc1~174^2), we have passed the `-A` flag to -the PGI C++ compiler when specifying a C++ standard flag with -compiler extensions turned off. The flag is not meant for that. -The PGI C++ standard flags do not turn extensions on by default -and have a separate `--gnu_extensions` flag for that which we -already use when CXX_EXTENSIONS is ON. Simply drop the `-A` flag. - -Fixes: #20997 ---- - Modules/Compiler/PGI-CXX.cmake | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/Modules/Compiler/PGI-CXX.cmake b/Modules/Compiler/PGI-CXX.cmake -index c77de3605b..2d7a303c9b 100644 ---- a/Modules/Compiler/PGI-CXX.cmake -+++ b/Modules/Compiler/PGI-CXX.cmake -@@ -4,19 +4,19 @@ string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG") - string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG") - - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.10) -- set(CMAKE_CXX98_STANDARD_COMPILE_OPTION -A) -+ set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "") - set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION --gnu_extensions) - set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON) - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.10) -- set(CMAKE_CXX11_STANDARD_COMPILE_OPTION --c++11 -A) -+ set(CMAKE_CXX11_STANDARD_COMPILE_OPTION --c++11) - set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION --c++11 --gnu_extensions) - set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON) - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.7) -- set(CMAKE_CXX14_STANDARD_COMPILE_OPTION --c++14 -A) -+ set(CMAKE_CXX14_STANDARD_COMPILE_OPTION --c++14) - set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION --c++14 --gnu_extensions) - set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON) - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17.1) -- set(CMAKE_CXX17_STANDARD_COMPILE_OPTION --c++17 -A) -+ set(CMAKE_CXX17_STANDARD_COMPILE_OPTION --c++17) - set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION --c++17 --gnu_extensions) - set(CMAKE_CXX17_STANDARD__HAS_FULL_SUPPORT ON) - endif() --- -GitLab - diff --git a/scripts/uberenv_configs/packages/conduit/package.py b/scripts/uberenv_configs/packages/conduit/package.py index 1b2439d8d..91804b659 100644 --- a/scripts/uberenv_configs/packages/conduit/package.py +++ b/scripts/uberenv_configs/packages/conduit/package.py @@ -14,7 +14,7 @@ from spack.package import * -def cmake_cache_entry(name, value, vtype=None): +def cmake_cache_entry(name, value, vtype=None, description=""): """ Helper that creates CMake cache entry strings used in 'host-config' files. @@ -24,7 +24,7 @@ def cmake_cache_entry(name, value, vtype=None): vtype = "BOOL" else: vtype = "PATH" - return 'set({0} "{1}" CACHE {2} "")\n\n'.format(name, value, vtype) + return 'set({0} "{1}" CACHE {2} "{3}")\n\n'.format(name, value, vtype,description) class Conduit(CMakePackage): @@ -185,8 +185,21 @@ class Conduit(CMakePackage): ####################### # Documentation related ####################### - depends_on("py-sphinx", when="+python+doc", type="build") - depends_on("py-sphinx-rtd-theme", when="+python+doc", type="build") + # + # NOTE: Why aren't these tagged `build`? + # + # Removed `build` as the simplest way to get sphinx + # to be added to the spack view. + # + # Also tried adding py-sphinx to the env, however + # that caused the concertizer to flip uberenv-package python variant + # to ~python, undermining python completely. + # + #depends_on("py-sphinx", when="+python+doc", type="build") + #depends_on("py-sphinx-rtd-theme", when="+python+doc", type="build") + # NOTE: sphinx 7.0.0 is not compatible with sphinx-rtd-theme + depends_on("py-sphinx@:6.99.99", when="+python+doc") + depends_on("py-sphinx-rtd-theme", when="+python+doc") depends_on("doxygen", when="+doc+doxygen") # Tentative patch for fj compiler @@ -461,6 +474,10 @@ def hostconfig(self, spec, prefix): if cxxflags: cfg.write(cmake_cache_entry("CMAKE_CXX_FLAGS", cxxflags)) fflags = " ".join(spec.compiler_flags["fflags"]) + ldflags = " ".join(spec.compiler_flags["ldflags"]) + + if ldflags: + cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", ldflags)) if self.spec.satisfies("%cce"): fflags += " -ef" if fflags: @@ -472,9 +489,14 @@ def hostconfig(self, spec, prefix): for _libpath in [libdir, libdir + "64"]: if os.path.exists(_libpath): flags += " -Wl,-rpath,{0}".format(_libpath) + # macOS needs this for widely used gfortran installer + # (ideally if in the spack.yaml, + # we can inspect spack's extra_rpaths compiler setting for all cases) + if os.path.exists("/usr/local/gfortran/lib/"): + flags += " -Wl,-rpath,/usr/local/gfortran/lib/" description = "Adds a missing libstdc++ rpath" if flags: - cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags, description)) + cfg.write(cmake_cache_entry("BLT_EXE_LINKER_FLAGS", flags, "PATH", description)) ####################### # Unit Tests diff --git a/scripts/uberenv_configs/packages/hdf5/fortran-kinds-2.patch b/scripts/uberenv_configs/packages/hdf5/fortran-kinds-2.patch deleted file mode 100644 index caee52010..000000000 --- a/scripts/uberenv_configs/packages/hdf5/fortran-kinds-2.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 598df49b738fd99df9f2671e4e967fd9c33ae8a9 Mon Sep 17 00:00:00 2001 -From: Seth R Johnson -Date: Wed, 16 Feb 2022 20:38:03 -0500 -Subject: [PATCH] Close file to work around GCC11.2/macOS12 bug - ---- - m4/aclocal_fc.f90 | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90 -index e9a11c0ab5..bfda49aa40 100644 ---- a/m4/aclocal_fc.f90 -+++ b/m4/aclocal_fc.f90 -@@ -151,6 +151,7 @@ PROGRAM FC_AVAIL_KINDS - WRITE(8,'(I0)') max_decimal_prec - WRITE(8,'(I0)') num_ikinds - WRITE(8,'(I0)') num_rkinds -+ CLOSE(8) - END PROGRAM FC_AVAIL_KINDS - !---- END ----- Determine the available KINDs for REALs and INTEGERs - --- -2.32.0 - diff --git a/scripts/uberenv_configs/packages/hdf5/fortran-kinds.patch b/scripts/uberenv_configs/packages/hdf5/fortran-kinds.patch deleted file mode 100644 index ffe5e6f3f..000000000 --- a/scripts/uberenv_configs/packages/hdf5/fortran-kinds.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/config/cmake/HDF5UseFortran.cmake -+++ a/config/cmake/HDF5UseFortran.cmake -@@ -181,6 +181,7 @@ - WRITE(8,'(I0)') max_decimal_prec - WRITE(8,'(I0)') num_ikinds - WRITE(8,'(I0)') num_rkinds -+ CLOSE(8) - END PROGRAM FC_AVAIL_KINDS - " - ) ---- a/m4/aclocal_fc.f90 -+++ b/m4/aclocal_fc.f90 -@@ -151,6 +151,7 @@ - WRITE(8,'(I0)') max_decimal_prec - WRITE(8,'(I0)') num_ikinds - WRITE(8,'(I0)') num_rkinds -+ CLOSE(8) - END PROGRAM FC_AVAIL_KINDS - !---- END ----- Determine the available KINDs for REALs and INTEGERs - diff --git a/scripts/uberenv_configs/packages/hdf5/h5f90global-mult-obj-same-equivalence-same-common-block.patch b/scripts/uberenv_configs/packages/hdf5/h5f90global-mult-obj-same-equivalence-same-common-block.patch deleted file mode 100644 index 8bf5c142e..000000000 --- a/scripts/uberenv_configs/packages/hdf5/h5f90global-mult-obj-same-equivalence-same-common-block.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 -index dd2b171..629418a 100644 ---- a/fortran/src/H5f90global.F90 -+++ b/fortran/src/H5f90global.F90 -@@ -142,10 +142,7 @@ MODULE H5GLOBAL - - INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: predef_types - EQUIVALENCE (predef_types(1), H5T_NATIVE_INTEGER_KIND(1)) -- EQUIVALENCE (predef_types(2), H5T_NATIVE_INTEGER_KIND(2)) -- EQUIVALENCE (predef_types(3), H5T_NATIVE_INTEGER_KIND(3)) -- EQUIVALENCE (predef_types(4), H5T_NATIVE_INTEGER_KIND(4)) -- EQUIVALENCE (predef_types(5), H5T_NATIVE_INTEGER_KIND(5)) -+ ! EQUIVALENCE predef_types(2:5) are unnecessary and violate the standard - EQUIVALENCE (predef_types(6), H5T_NATIVE_INTEGER) - EQUIVALENCE (predef_types(7), H5T_NATIVE_REAL) - EQUIVALENCE (predef_types(8), H5T_NATIVE_DOUBLE) diff --git a/scripts/uberenv_configs/packages/hdf5/h5public-skip-mpicxx.patch b/scripts/uberenv_configs/packages/hdf5/h5public-skip-mpicxx.patch deleted file mode 100644 index d60934552..000000000 --- a/scripts/uberenv_configs/packages/hdf5/h5public-skip-mpicxx.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/H5public.h 2019-08-28 18:51:39.393781356 -0400 -+++ b/src/H5public.h 2019-08-28 20:59:50.315181711 -0400 -@@ -57,6 +57,8 @@ - # include - #endif - #ifdef H5_HAVE_PARALLEL -+# define MPICH_SKIP_MPICXX 1 -+# define OMPI_SKIP_MPICXX 1 - # include - #ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */ - # include diff --git a/scripts/uberenv_configs/packages/hdf5/hdf5_1.8_gcc10.patch b/scripts/uberenv_configs/packages/hdf5/hdf5_1.8_gcc10.patch deleted file mode 100644 index 0de8c33c0..000000000 --- a/scripts/uberenv_configs/packages/hdf5/hdf5_1.8_gcc10.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur hdf5.orig/fortran/test/tH5T_F03.f90 hdf5/fortran/test/tH5T_F03.f90 ---- hdf5.orig/fortran/test/tH5T_F03.f90 2021-01-19 13:23:11.298000000 +0100 -+++ hdf5/fortran/test/tH5T_F03.f90 2021-01-19 13:19:17.637000000 +0100 -@@ -1541,7 +1541,7 @@ - INTEGER :: A, B, C, D - INTEGER :: Aw, Bw, Cw, Dw - INTEGER :: i, j -- INTEGER, PARAMETER :: hex = Z'00000003' -+ INTEGER, PARAMETER :: hex = INT(Z'00000003') - TYPE(C_PTR) :: f_ptr - INTEGER :: error ! Error flag - ! diff --git a/scripts/uberenv_configs/packages/hdf5/package.py b/scripts/uberenv_configs/packages/hdf5/package.py deleted file mode 100644 index b141408d8..000000000 --- a/scripts/uberenv_configs/packages/hdf5/package.py +++ /dev/null @@ -1,744 +0,0 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import os -import shutil - -import llnl.util.tty as tty - -from spack.package import * - - -class Hdf5(CMakePackage): - """HDF5 is a data model, library, and file format for storing and managing - data. It supports an unlimited variety of datatypes, and is designed for - flexible and efficient I/O and for high volume and complex data. - """ - - homepage = "https://portal.hdfgroup.org" - url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.8/src/hdf5-1.10.8.tar.gz" - list_url = "https://support.hdfgroup.org/ftp/HDF5/releases" - list_depth = 3 - git = "https://github.com/HDFGroup/hdf5.git" - maintainers = [ - "lrknox", - "brtnfld", - "byrnHDF", - "gheber", - "hyoklee", - "lkurz", - ] - - tags = ["e4s"] - - test_requires_compiler = True - - # The 'develop' version is renamed so that we could uninstall (or patch) it - # without affecting other develop version. - version("develop-1.13", branch="develop") - version("develop-1.12", branch="hdf5_1_12") - version("develop-1.10", branch="hdf5_1_10") - version("develop-1.8", branch="hdf5_1_8") - - # Odd versions are considered experimental releases - version("1.13.3", sha256="83c7c06671f975cee6944b0b217f95005faa55f79ea5532cf4ac268989866af4") - version("1.13.2", sha256="01643fa5b37dba7be7c4db6bbf3c5d07adf5c1fa17dbfaaa632a279b1b2f06da") - - # Even versions are maintenance versions - version( - "1.14.0", - sha256="a571cc83efda62e1a51a0a912dd916d01895801c5025af91669484a1575a6ef4", - preferred=True, - ) - version( - "1.12.2", - sha256="2a89af03d56ce7502dcae18232c241281ad1773561ec00c0f0e8ee2463910f14", - preferred=True, - ) - version( - "1.12.1", - sha256="79c66ff67e666665369396e9c90b32e238e501f345afd2234186bfb8331081ca", - preferred=True, - ) - version( - "1.12.0", - sha256="a62dcb276658cb78e6795dd29bf926ed7a9bc4edf6e77025cd2c689a8f97c17a", - preferred=True, - ) - version( - "1.10.9", - sha256="f5b77f59b705a755a5a223372d0222c7bc408fe8db6fa8d9d7ecf8bce291b8dd", - preferred=True, - ) - version( - "1.10.8", - sha256="d341b80d380dd763753a0ebe22915e11e87aac4e44a084a850646ff934d19c80", - preferred=True, - ) - version( - "1.10.7", - sha256="7a1a0a54371275ce2dfc5cd093775bb025c365846512961e7e5ceaecb437ef15", - preferred=True, - ) - version( - "1.10.6", - sha256="5f9a3ee85db4ea1d3b1fa9159352aebc2af72732fc2f58c96a3f0768dba0e9aa", - preferred=True, - ) - version( - "1.10.5", - sha256="6d4ce8bf902a97b050f6f491f4268634e252a63dadd6656a1a9be5b7b7726fa8", - preferred=True, - ) - version( - "1.10.4", - sha256="8f60dc4dd6ab5fcd23c750d1dc5bca3d0453bdce5c8cdaf0a4a61a9d1122adb2", - preferred=True, - ) - version( - "1.10.3", - sha256="b600d7c914cfa80ae127cd1a1539981213fee9994ac22ebec9e3845e951d9b39", - preferred=True, - ) - version( - "1.10.2", - sha256="bfec1be8c366965a99812cf02ddc97e4b708c1754fccba5414d4adccdc073866", - preferred=True, - ) - version( - "1.10.1", - sha256="048a9d149fb99aaa1680a712963f5a78e9c43b588d0e79d55e06760ec377c172", - preferred=True, - ) - version( - "1.10.0-patch1", - sha256="6e78cfe32a10e6e0629393cdfddf6cfa536571efdaf85f08e35326e1b4e9eff0", - preferred=True, - ) - version( - "1.10.0", - sha256="81f6201aba5c30dced5dcd62f5d5477a2790fd5850e02ac514ca8bf3e2bb375a", - preferred=True, - ) - version( - "1.8.22", - sha256="8406d96d9355ef8961d2739fb8fd5474ad4cdf52f3cfac657733defd9709bfaa", - preferred=True, - ) - version( - "1.8.21", - sha256="87d8c82eba5cf766d97cd06c054f4639c1049c4adeaa3a79f77f8bd374f80f37", - preferred=True, - ) - version( - "1.8.19", - sha256="a4335849f19fae88c264fd0df046bc321a78c536b2548fc508627a790564dc38", - preferred=True, - ) - version( - "1.8.18", - sha256="cdb195ad8d9e6782acf24b2488061289f615628c2ccda8457b0a0c3fb7a8a063", - preferred=True, - ) - version( - "1.8.17", - sha256="d9cda297ee76ade9881c4208987939250d397bae6252d0ccb66fa7d24d67e263", - preferred=True, - ) - version( - "1.8.16", - sha256="ed17178abd9928a7237f30370189ba767b9e39e0db45917c2ac4665eb9cb4771", - preferred=True, - ) - version( - "1.8.15", - sha256="4e963216b7d32469596bc1321a8c3f6e0c278dcbbdb7be6414c63c081b34c275", - preferred=True, - ) - version( - "1.8.14", - sha256="1dbefeeef7f591897c632b2b090db96bb8d35ad035beaa36bc39cb2bc67e0639", - preferred=True, - ) - version( - "1.8.13", - sha256="82f6b38eec103b4fccfbf14892786e0c27a8135d3252d8601cf5bf20066d38c1", - preferred=True, - ) - version( - "1.8.12", - sha256="b5cccea850096962b5fd9e96f22c4f47d2379224bb41130d9bc038bb6c37dfcb", - preferred=True, - ) - version( - "1.8.10", - sha256="4813b79c5fb8701a625b9924b8203bc7154a77f9b826ad4e034144b4056a160a", - preferred=True, - ) - - variant("shared", default=True, description="Builds a shared version of the library") - - variant("hl", default=False, description="Enable the high-level library") - variant("cxx", default=False, description="Enable C++ support") - variant("fortran", default=False, description="Enable Fortran support") - variant("java", when="@1.10:", default=False, description="Enable Java support") - variant("threadsafe", default=False, description="Enable thread-safe capabilities") - variant("tools", default=True, description="Enable building tools") - variant("mpi", default=True, description="Enable MPI support") - variant("szip", default=False, description="Enable szip support") - # Build HDF5 with API compatibility. - variant( - "api", - default="default", - description="Choose api compatibility for earlier version", - values=("default", "v114", "v112", "v110", "v18", "v16"), - multi=False, - ) - - depends_on("cmake@3.12:", type="build") - depends_on("cmake@3.18:", type="build", when="@1.13:") - - #depends_on("msmpi", when="+mpi platform=windows") - depends_on("mpi", when="+mpi") - depends_on("java", type=("build", "run"), when="+java") - depends_on("szip", when="+szip") - depends_on("zlib@1.1.2:") - - # The compiler wrappers (h5cc, h5fc, etc.) run 'pkg-config'. - # Skip this on Windows since pkgconfig is autotools - for plat in ["cray", "darwin", "linux"]: - depends_on("pkgconfig", when="platform=%s" % plat, type="run") - - conflicts("api=v114", when="@1.6:1.12", msg="v114 is not compatible with this release") - conflicts("api=v112", when="@1.6:1.10", msg="v112 is not compatible with this release") - conflicts("api=v110", when="@1.6:1.8", msg="v110 is not compatible with this release") - conflicts("api=v18", when="@1.6.0:1.6", msg="v18 is not compatible with this release") - - # The Java wrappers cannot be built without shared libs. - conflicts("+java", when="~shared") - # Fortran fails built with shared for old HDF5 versions - conflicts("+fortran", when="+shared@:1.8.15") - # See https://github.com/spack/spack/issues/31085 - conflicts("+fortran+mpi", when="@1.8.22") - - # There are several officially unsupported combinations of the features: - # 1. Thread safety is not guaranteed via high-level C-API but in some cases - # it works. - # conflicts('+threadsafe+hl') - - # 2. Thread safety is not guaranteed via Fortran (CXX) API, but it's - # possible for a dependency tree to contain a package that uses Fortran - # (CXX) API in a single thread and another one that uses low-level C-API - # in multiple threads. To allow for such scenarios, we don't specify the - # following conflicts. - # conflicts('+threadsafe+cxx') - # conflicts('+threadsafe+fortran') - - # 3. Parallel features are not supported via CXX API, but for the reasons - # described in #2 we allow for such combination. - # conflicts('+mpi+cxx') - - # There are known build failures with intel@18.0.1. This issue is - # discussed and patch is provided at - # https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/747951. - patch("h5f90global-mult-obj-same-equivalence-same-common-block.patch", when="@1.10.1%intel@18") - - # Turn line comments into block comments to conform with pre-C99 language - # standards. Versions of hdf5 after 1.8.10 don't require this patch, - # either because they conform to pre-C99 or neglect to ask for pre-C99 - # language standards from their compiler. The hdf5 build system adds - # the -ansi cflag (run 'man gcc' for info on -ansi) for some versions - # of some compilers (see hdf5-1.8.10/config/gnu-flags). The hdf5 build - # system does not provide an option to disable -ansi, but since the - # pre-C99 code is restricted to just five lines of line comments in - # three src files, this patch accomplishes the simple task of patching the - # three src files and leaves the hdf5 build system alone. - patch("pre-c99-comments.patch", when="@1.8.10") - - # There are build errors with GCC 8, see - # https://forum.hdfgroup.org/t/1-10-2-h5detect-compile-error-gcc-8-1-0-on-centos-7-2-solved/4441 - patch( - "https://salsa.debian.org/debian-gis-team/hdf5/raw/bf94804af5f80f662cad80a5527535b3c6537df6/debian/patches/gcc-8.patch", - sha256="57cee5ff1992b4098eda079815c36fc2da9b10e00a9056df054f2384c4fc7523", - when="@1.10.2%gcc@8:", - ) - - # Disable MPI C++ interface when C++ is disabled, otherwise downstream - # libraries fail to link; see https://github.com/spack/spack/issues/12586 - patch( - "h5public-skip-mpicxx.patch", - when="@1.8.10:1.8.21,1.10.0:1.10.5+mpi~cxx", - sha256="b61e2f058964ad85be6ee5ecea10080bf79e73f83ff88d1fa4b602d00209da9c", - ) - - # Fixes BOZ literal constant error when compiled with GCC 10. - # The issue is described here: https://github.com/spack/spack/issues/18625 - patch( - "hdf5_1.8_gcc10.patch", - when="@:1.8.21", - sha256="0e20187cda3980a4fdff410da92358b63de7ebef2df1d7a425371af78e50f666", - ) - - patch("fortran-kinds.patch", when="@1.10.7") - - # This patch may only be needed with GCC11.2 on macOS, but it's valid for - # any of the head HDF5 versions as of 12/2021. Since it's impossible to - # tell what Fortran version is part of a mixed apple-clang toolchain on - # macOS (which is the norm), and this might be an issue for other compilers - # as well, we just apply it to all platforms. - # See https://github.com/HDFGroup/hdf5/issues/1157 - patch("fortran-kinds-2.patch", when="@1.10.8,1.12.1") - - # The argument 'buf_size' of the C function 'h5fget_file_image_c' is - # declared as intent(in) though it is modified by the invocation. As a - # result, aggressive compilers such as Fujitsu's may do a wrong - # optimization to cause an error. - def patch(self): - filter_file( - "INTEGER(SIZE_T), INTENT(IN) :: buf_size", - "INTEGER(SIZE_T), INTENT(OUT) :: buf_size", - "fortran/src/H5Fff.F90", - string=True, - ignore_absent=True, - ) - filter_file( - "INTEGER(SIZE_T), INTENT(IN) :: buf_size", - "INTEGER(SIZE_T), INTENT(OUT) :: buf_size", - "fortran/src/H5Fff_F03.f90", - string=True, - ignore_absent=True, - ) - if self.run_tests: - # hdf5 has ~2200 CPU-intensive tests, some of them have races: - # Often, these loop endless(at least on one Xeon and one EPYC). - # testphdf5 fails indeterministic. This fixes finishing the tests - filter_file( - "REMOVE_ITEM H5P_TESTS", - "REMOVE_ITEM H5P_TESTS t_bigio t_shapesame testphdf5", - "testpar/CMakeTests.cmake", - ) - - # The parallel compiler wrappers (i.e. h5pcc, h5pfc, etc.) reference MPI - # compiler wrappers and do not need to be changed. - filter_compiler_wrappers( - "h5cc", "h5hlcc", "h5fc", "h5hlfc", "h5c++", "h5hlc++", 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" - ) - return url.format(version.up_to(2), version) - - def flag_handler(self, name, flags): - spec = self.spec - cmake_flags = [] - - if name == "cflags": - if spec.compiler.name in ["gcc", "clang", "apple-clang", "oneapi"]: - # Quiet warnings/errors about implicit declaration of functions - # in C99: - cmake_flags.append("-Wno-error=implicit-function-declaration") - # Note that this flag will cause an error if building %nvhpc. - if spec.satisfies("@:1.8.12~shared"): - # More recent versions set CMAKE_POSITION_INDEPENDENT_CODE to - # True and build with PIC flags. - cmake_flags.append(self.compiler.cc_pic_flag) - elif name == "cxxflags": - if spec.satisfies("@:1.8.12+cxx~shared"): - cmake_flags.append(self.compiler.cxx_pic_flag) - elif name == "fflags": - if spec.satisfies("%cce+fortran"): - # Cray compiler generates module files with uppercase names by - # default, which is not handled by the CMake scripts. The - # following flag forces the compiler to produce module files - # with lowercase names. - cmake_flags.append("-ef") - if spec.satisfies("@:1.8.12+fortran~shared"): - cmake_flags.append(self.compiler.fc_pic_flag) - elif name == "ldlibs": - if "+fortran %fj" in spec: - cmake_flags.extend(["-lfj90i", "-lfj90f", "-lfjsrcinfo", "-lelf"]) - - return flags, None, (cmake_flags or None) - - @property - def libs(self): - """HDF5 can be queried for the following parameters: - - - "hl": high-level interface - - "cxx": C++ APIs - - "fortran": Fortran APIs - - "java": Java APIs - - :return: list of matching libraries - """ - query_parameters = self.spec.last_query.extra_parameters - - shared = "+shared" in self.spec - - # This map contains a translation from query_parameters - # to the libraries needed - query2libraries = { - tuple(): ["libhdf5"], - ("cxx", "fortran", "hl", "java"): [ - # When installed with Autotools, the basename of the real - # library file implementing the High-level Fortran interface is - # 'libhdf5hl_fortran'. Starting versions 1.8.22, 1.10.5 and - # 1.12.0, the Autotools installation also produces a symbolic - # link 'libhdf5_hl_fortran.' to - # 'libhdf5hl_fortran.'. Note that in the case of the - # dynamic library, the latter is a symlink to the real sonamed - # file 'libhdf5_fortran.so.'. This means that all - # dynamically linked executables/libraries of the dependent - # packages need 'libhdf5_fortran.so.' with the same - # DT_SONAME entry. However, the CMake installation (at least - # starting version 1.8.10) does not produce it. Instead, the - # basename of the library file is 'libhdf5_hl_fortran'. Which - # means that switching to CMake requires rebuilding of all - # dependant packages that use the High-level Fortran interface. - # Therefore, we do not try to preserve backward compatibility - # with Autotools installations by creating symlinks. The only - # packages that could benefit from it would be those that - # hardcode the library name in their building systems. Such - # packages should simply be patched. - "libhdf5_hl_fortran", - "libhdf5_hl_f90cstub", - "libhdf5_hl_cpp", - "libhdf5_hl", - "libhdf5_fortran", - "libhdf5_f90cstub", - "libhdf5_java", - "libhdf5", - ], - ("cxx", "hl"): [ - "libhdf5_hl_cpp", - "libhdf5_hl", - "libhdf5", - ], - ("fortran", "hl"): [ - "libhdf5_hl_fortran", - "libhdf5_hl_f90cstub", - "libhdf5_hl", - "libhdf5_fortran", - "libhdf5_f90cstub", - "libhdf5", - ], - ("hl",): [ - "libhdf5_hl", - "libhdf5", - ], - ("cxx", "fortran"): [ - "libhdf5_fortran", - "libhdf5_f90cstub", - "libhdf5_cpp", - "libhdf5", - ], - ("cxx",): [ - "libhdf5_cpp", - "libhdf5", - ], - ("fortran",): [ - "libhdf5_fortran", - "libhdf5_f90cstub", - "libhdf5", - ], - ("java",): [ - "libhdf5_java", - "libhdf5", - ], - } - - # Turn the query into the appropriate key - key = tuple(sorted(query_parameters)) - libraries = query2libraries[key] - - return find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) - - @when("@:1.8.21,1.10.0:1.10.5+szip") - def setup_build_environment(self, env): - env.set("SZIP_INSTALL", self.spec["szip"].prefix) - - @run_before("cmake") - def fortran_check(self): - if "+fortran" in self.spec and not self.compiler.fc: - msg = "cannot build a Fortran variant without a Fortran compiler" - raise RuntimeError(msg) - - def cmake_args(self): - spec = self.spec - - if spec.satisfies("@:1.8.15+shared"): - tty.warn("hdf5@:1.8.15+shared does not produce static libraries") - - args = [ - # Always enable this option. This does not actually enable any - # features: it only *allows* the user to specify certain - # combinations of other arguments. - self.define("ALLOW_UNSUPPORTED", True), - # Speed-up the building by skipping the examples: - self.define("HDF5_BUILD_EXAMPLES", False), - self.define( - "BUILD_TESTING", - self.run_tests or - # Version 1.8.22 fails to build the tools when shared libraries - # are enabled but the tests are disabled. - spec.satisfies("@1.8.22+shared+tools"), - ), - self.define("HDF5_ENABLE_Z_LIB_SUPPORT", True), - self.define_from_variant("HDF5_ENABLE_SZIP_SUPPORT", "szip"), - self.define_from_variant("HDF5_ENABLE_SZIP_ENCODING", "szip"), - self.define_from_variant("BUILD_SHARED_LIBS", "shared"), - self.define("ONLY_SHARED_LIBS", False), - self.define_from_variant("HDF5_ENABLE_PARALLEL", "mpi"), - self.define_from_variant("HDF5_ENABLE_THREADSAFE", "threadsafe"), - self.define_from_variant("HDF5_BUILD_HL_LIB", "hl"), - self.define_from_variant("HDF5_BUILD_CPP_LIB", "cxx"), - self.define_from_variant("HDF5_BUILD_FORTRAN", "fortran"), - self.define_from_variant("HDF5_BUILD_JAVA", "java"), - self.define_from_variant("HDF5_BUILD_TOOLS", "tools"), - ] - - api = spec.variants["api"].value - if api != "default": - args.append(self.define("DEFAULT_API_VERSION", api)) - - if "+mpi" in spec and "platform=windows" not in spec: - args.append(self.define("CMAKE_C_COMPILER", spec["mpi"].mpicc)) - - if "+cxx" in self.spec: - args.append(self.define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx)) - - if "+fortran" in self.spec: - args.append(self.define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc)) - - # work-around for https://github.com/HDFGroup/hdf5/issues/1320 - if spec.satisfies("@1.10.8,1.13.0"): - args.append(self.define("HDF5_INSTALL_CMAKE_DIR", "share/cmake/hdf5")) - - return args - - @run_after("install") - def ensure_parallel_compiler_wrappers(self): - # When installed with Autotools and starting at least version 1.8.10, - # the package produces C compiler wrapper called either 'h5cc' (when MPI - # support is disabled) or 'h5pcc' (when MPI support is enabled). The - # CMake installation produces the wrapper called 'h5cc' (regardless of - # whether MPI support is enabled) only starting versions 1.8.21, 1.10.2 - # and 1.12.0. The current develop versions also produce 'h5pcc' when MPI - # support is enabled and the file is identical to 'h5cc'. Here, we make - # sure that 'h5pcc' is available when MPI support is enabled (only for - # versions that generate 'h5cc'). - if self.spec.satisfies("@1.8.21:1.8.22,1.10.2:1.10.7,1.12.0+mpi"): - with working_dir(self.prefix.bin): - # No try/except here, fix the condition above instead: - symlink("h5cc", "h5pcc") - - # The same as for 'h5pcc'. However, the CMake installation produces the - # Fortran compiler wrapper called 'h5fc' only starting versions 1.8.22, - # 1.10.6 and 1.12.0. The current develop versions do not produce 'h5pfc' - # at all. Here, we make sure that 'h5pfc' is available when Fortran and - # MPI support are enabled (only for versions that generate 'h5fc'). - if self.spec.satisfies( - "@1.8.22:1.8," "1.10.6:1.10," "1.12.0:1.12," "develop:" "+fortran+mpi" - ): - with working_dir(self.prefix.bin): - # No try/except here, fix the condition above instead: - symlink("h5fc", "h5pfc") - - @run_after("install") - def fix_package_config(self): - # We need to fix the pkg-config files, which are also used by the - # compiler wrappers. The files are created starting versions 1.8.21, - # 1.10.2 and 1.12.0. However, they are broken (except for the version - # 1.8.22): the files are named -.pc but reference - # packages. This was fixed in the develop versions at some point: the - # files started referencing - packages but got broken - # again: the files got names .pc but references had not been - # updated accordingly. Another issue, which we address here, is that - # some Linux distributions install pkg-config files named hdf5.pc and we - # want to override them. Therefore, the following solution makes sure - # that each -.pc file is symlinked by .pc and all - # references to - packages in the original files are - # replaced with references to packages. - pc_files = find(self.prefix.lib.pkgconfig, "hdf5*.pc", recursive=False) - - if not pc_files: - # This also tells us that the pkgconfig directory does not exist. - return - - # Replace versioned references in all pkg-config files: - filter_file( - r"(Requires(?:\.private)?:.*)(hdf5[^\s,]*)(?:-[^\s,]*)(.*)", - r"\1\2\3", - *pc_files, - backup=False, - ) - - # Create non-versioned symlinks to the versioned pkg-config files: - with working_dir(self.prefix.lib.pkgconfig): - for f in pc_files: - src_filename = os.path.basename(f) - version_sep_idx = src_filename.find("-") - if version_sep_idx > -1: - tgt_filename = src_filename[:version_sep_idx] + ".pc" - if not os.path.exists(tgt_filename): - symlink(src_filename, tgt_filename) - - @run_after("install") - @on_package_attributes(run_tests=True) - def check_install(self): - self._check_install() - - def _check_install(self): - # Build and run a small program to test the installed HDF5 library - spec = self.spec - print("Checking HDF5 installation...") - checkdir = "spack-check" - with working_dir(checkdir, create=True): - # Because the release number in a develop branch is not fixed, - # only the major and minor version numbers are compared. - # Otherwise all 3 numbers are checked. - if "develop" in str(spec.version.up_to(3)): - source = r""" -#include -#include -#include -int main(int argc, char **argv) { - unsigned majnum, minnum, relnum; - herr_t herr = H5get_libversion(&majnum, &minnum, &relnum); - assert(!herr); - printf("HDF5 version %d.%d %u.%u\n", H5_VERS_MAJOR, H5_VERS_MINOR, - majnum, minnum); - return 0; -} -""" - else: - source = r""" -#include -#include -#include -int main(int argc, char **argv) { - unsigned majnum, minnum, relnum; - herr_t herr = H5get_libversion(&majnum, &minnum, &relnum); - assert(!herr); - printf("HDF5 version %d.%d.%d %u.%u.%u\n", H5_VERS_MAJOR, H5_VERS_MINOR, - H5_VERS_RELEASE, majnum, minnum, relnum); - return 0; -} -""" - expected = """\ -HDF5 version {version} {version} -""".format( - version=str(spec.version.up_to(3)) - ) - if "develop" in expected: - # Remove 'develop-' from the version in spack for checking - # version against the version in the HDF5 code. - expected = """\ -HDF5 version {version} {version} -""".format( - version=str(spec.version.up_to(3)).partition("-")[2] - ) - with open("check.c", "w") as f: - f.write(source) - if "+mpi" in spec: - cc = Executable(spec["mpi"].mpicc) - else: - cc = Executable(self.compiler.cc) - cc(*(["-c", "check.c"] + spec["hdf5"].headers.cpp_flags.split())) - cc(*(["-o", "check", "check.o"] + spec["hdf5"].libs.ld_flags.split())) - try: - check = Executable("./check") - output = check(output=str) - except ProcessError: - output = "" - success = output == expected - if not success: - print("Produced output does not match expected output.") - print("Expected output:") - print("-" * 80) - print(expected) - print("-" * 80) - print("Produced output:") - print("-" * 80) - print(output) - print("-" * 80) - raise RuntimeError("HDF5 install check failed") - shutil.rmtree(checkdir) - - def _test_check_versions(self): - """Perform version checks on selected installed package binaries.""" - spec_vers_str = "Version {0}".format(self.spec.version) - if "develop" in spec_vers_str: - # Remove 'develop-' from the version in spack for checking - # version against the version in the HDF5 code. - spec_vers_str = spec_vers_str.partition("-")[2] - - exes = [ - "h5copy", - "h5diff", - "h5dump", - "h5format_convert", - "h5ls", - "h5mkgrp", - "h5repack", - "h5stat", - "h5unjam", - ] - use_short_opt = ["h52gif", "h5repart", "h5unjam"] - for exe in exes: - reason = "test: ensuring version of {0} is {1}".format(exe, spec_vers_str) - option = "-V" if exe in use_short_opt else "--version" - self.run_test( - exe, option, spec_vers_str, installed=True, purpose=reason, skip_missing=True - ) - - def _test_example(self): - """This test performs copy, dump, and diff on an example hdf5 file.""" - test_data_dir = self.test_suite.current_test_data_dir - - filename = "spack.h5" - h5_file = test_data_dir.join(filename) - - reason = "test: ensuring h5dump produces expected output" - expected = get_escaped_text_output(test_data_dir.join("dump.out")) - self.run_test( - "h5dump", - filename, - expected, - installed=True, - purpose=reason, - skip_missing=True, - work_dir=test_data_dir, - ) - - reason = "test: ensuring h5copy runs" - options = ["-i", h5_file, "-s", "Spack", "-o", "test.h5", "-d", "Spack"] - self.run_test( - "h5copy", options, [], installed=True, purpose=reason, skip_missing=True, work_dir="." - ) - - reason = "test: ensuring h5diff shows no differences between orig and" " copy" - self.run_test( - "h5diff", - [h5_file, "test.h5"], - [], - installed=True, - purpose=reason, - skip_missing=True, - work_dir=".", - ) - - def test(self): - """Perform smoke tests on the installed package.""" - # Simple version check tests on known binaries - self._test_check_versions() - - # Run sequence of commands on an hdf5 file - self._test_example() - - # Run existing install check - self._check_install() diff --git a/scripts/uberenv_configs/packages/hdf5/pre-c99-comments.patch b/scripts/uberenv_configs/packages/hdf5/pre-c99-comments.patch deleted file mode 100644 index 97743e8fa..000000000 --- a/scripts/uberenv_configs/packages/hdf5/pre-c99-comments.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/test/th5s.c b/test/th5s.c -index 462bc36..8e18fad 100644 ---- a/test/th5s.c -+++ b/test/th5s.c -@@ -730,8 +730,8 @@ test_h5s_zero_dim(void) - ret = H5Pset_chunk(plist_id, SPACE1_RANK, chunk_dims); - CHECK(ret, FAIL, "H5Pset_chunk"); - -- // ret = H5Pset_alloc_time(plist_id, alloc_time); -- // CHECK(ret, FAIL, "H5Pset_alloc_time"); -+ /* ret = H5Pset_alloc_time(plist_id, alloc_time); */ -+ /* CHECK(ret, FAIL, "H5Pset_alloc_time"); */ - - dset1 = H5Dcreate2(fid1, BASICDATASET1, H5T_NATIVE_INT, sid_chunk, H5P_DEFAULT, plist_id, H5P_DEFAULT); - CHECK(dset1, FAIL, "H5Dcreate2"); -diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c -index ee6de5e..3ed6045 100644 ---- a/tools/h5dump/h5dump_ddl.c -+++ b/tools/h5dump/h5dump_ddl.c -@@ -1341,8 +1341,8 @@ handle_attributes(hid_t fid, const char *attr, void UNUSED * data, int UNUSED pe - string_dataformat.do_escape = display_escape; - outputformat = &string_dataformat; - -- //attr_name = attr + j + 1; -- // need to replace escape characters -+ /* attr_name = attr + j + 1; */ -+ /* need to replace escape characters */ - attr_name = h5tools_str_replace(attr + j + 1, "\\/", "/"); - - -diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c -index 9ce3524..3b4e5e7 100644 ---- a/tools/lib/h5tools_str.c -+++ b/tools/lib/h5tools_str.c -@@ -632,7 +632,7 @@ h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, - h5tools_str_append(str, "%s", OPT(info->line_indent, "")); - } - --// ctx->need_prefix = 0; -+/* ctx->need_prefix = 0; */ - } - - /*------------------------------------------------------------------------- diff --git a/scripts/uberenv_configs/packages/hdf5/test/dump.out b/scripts/uberenv_configs/packages/hdf5/test/dump.out deleted file mode 100644 index 58decefc1..000000000 --- a/scripts/uberenv_configs/packages/hdf5/test/dump.out +++ /dev/null @@ -1,45 +0,0 @@ -HDF5 "spack.h5" { -GROUP "/" { - GROUP "Spack" { - GROUP "Software" { - ATTRIBUTE "Distribution" { - DATATYPE H5T_STRING { - STRSIZE H5T_VARIABLE; - STRPAD H5T_STR_NULLTERM; - CSET H5T_CSET_UTF8; - CTYPE H5T_C_S1; - } - DATASPACE SCALAR - DATA { - (0): "Open Source" - } - } - DATASET "data" { - DATATYPE H5T_IEEE_F64LE - DATASPACE SIMPLE { ( 7, 11 ) / ( 7, 11 ) } - DATA { - (0,0): 0.371141, 0.508482, 0.585975, 0.0944911, 0.684849, - (0,5): 0.580396, 0.720271, 0.693561, 0.340432, 0.217145, - (0,10): 0.636083, - (1,0): 0.686996, 0.773501, 0.656767, 0.617543, 0.226132, - (1,5): 0.768632, 0.0548711, 0.54572, 0.355544, 0.591548, - (1,10): 0.233007, - (2,0): 0.230032, 0.192087, 0.293845, 0.0369338, 0.038727, - (2,5): 0.0977931, 0.966522, 0.0821391, 0.857921, 0.495703, - (2,10): 0.746006, - (3,0): 0.598494, 0.990266, 0.993009, 0.187481, 0.746391, - (3,5): 0.140095, 0.122661, 0.929242, 0.542415, 0.802758, - (3,10): 0.757941, - (4,0): 0.372124, 0.411982, 0.270479, 0.950033, 0.329948, - (4,5): 0.936704, 0.105097, 0.742285, 0.556565, 0.18988, 0.72797, - (5,0): 0.801669, 0.271807, 0.910649, 0.186251, 0.868865, - (5,5): 0.191484, 0.788371, 0.920173, 0.582249, 0.682022, - (5,10): 0.146883, - (6,0): 0.826824, 0.0886705, 0.402606, 0.0532444, 0.72509, - (6,5): 0.964683, 0.330362, 0.833284, 0.630456, 0.411489, 0.247806 - } - } - } - } -} -} diff --git a/scripts/uberenv_configs/packages/hdf5/test/spack.h5 b/scripts/uberenv_configs/packages/hdf5/test/spack.h5 deleted file mode 100644 index c2f3a6f39..000000000 Binary files a/scripts/uberenv_configs/packages/hdf5/test/spack.h5 and /dev/null differ diff --git a/scripts/uberenv_configs/packages/python/cpython-windows-externals.patch b/scripts/uberenv_configs/packages/python/cpython-windows-externals.patch deleted file mode 100644 index c3bcce983..000000000 --- a/scripts/uberenv_configs/packages/python/cpython-windows-externals.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat -index b5a44e3..52941c7 100644 ---- a/PCbuild/get_externals.bat -+++ b/PCbuild/get_externals.bat -@@ -76,7 +76,7 @@ for %%e in (%libraries%) do ( - echo.Fetching external binaries... - - set binaries= --if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi -+if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi-3.3.0 - if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1k-1 - if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.9.0 - if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 -diff --git a/PCbuild/python.props b/PCbuild/python.props -index 419d5eb..c66fb07 100644 ---- a/PCbuild/python.props -+++ b/PCbuild/python.props -@@ -59,8 +59,8 @@ - $(ExternalsDir)sqlite-3.35.5.0\ - $(ExternalsDir)bzip2-1.0.6\ - $(ExternalsDir)xz-5.2.2\ -- $(ExternalsDir)libffi\ -- $(ExternalsDir)libffi\$(ArchName)\ -+ $(ExternalsDir)libffi-3.3.0\ -+ $(ExternalsDir)libffi-3.3.0\$(ArchName)\ - $(libffiOutDir)include - $(ExternalsDir)openssl-1.1.1k\ - $(ExternalsDir)openssl-bin-1.1.1k-1\$(ArchName)\ diff --git a/scripts/uberenv_configs/packages/python/cray-rpath-2.3.patch b/scripts/uberenv_configs/packages/python/cray-rpath-2.3.patch deleted file mode 100644 index 54a85cc64..000000000 --- a/scripts/uberenv_configs/packages/python/cray-rpath-2.3.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/Lib/distutils/unixccompiler.py 2003-06-02 05:27:40.000000000 +1000 -+++ b/Lib/distutils/unixccompiler.py 2017-05-13 13:52:45.554213616 +1000 -@@ -208,7 +208,8 @@ - elif compiler[:3] == "gcc" or compiler[:3] == "g++": - return "-Wl,-R" + dir - else: -- return "-R" + dir -+ # Patched by spack to use gcc syntax by default: -+ return "-Wl,-R" + dir - - def library_option(self, lib): - return "-l" + lib diff --git a/scripts/uberenv_configs/packages/python/cray-rpath-3.1.patch b/scripts/uberenv_configs/packages/python/cray-rpath-3.1.patch deleted file mode 100644 index f203bbbaa..000000000 --- a/scripts/uberenv_configs/packages/python/cray-rpath-3.1.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/Lib/distutils/unixccompiler.py 2009-05-09 21:55:12.000000000 +1000 -+++ b/Lib/distutils/unixccompiler.py 2017-05-13 14:30:18.077518999 +1000 -@@ -299,10 +299,8 @@ - else: - return "-Wl,-R" + dir - else: -- # No idea how --enable-new-dtags would be passed on to -- # ld if this system was using GNU ld. Don't know if a -- # system like this even exists. -- return "-R" + dir -+ # Patched by spack to use gcc syntax by default: -+ return "-Wl,-R" + dir - - def library_option(self, lib): - return "-l" + lib diff --git a/scripts/uberenv_configs/packages/python/fj-rpath-2.3.patch b/scripts/uberenv_configs/packages/python/fj-rpath-2.3.patch deleted file mode 100644 index 2ebda4cc1..000000000 --- a/scripts/uberenv_configs/packages/python/fj-rpath-2.3.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/Lib/distutils/unixccompiler.py 2003-06-02 05:27:40.000000000 +1000 -+++ b/Lib/distutils/unixccompiler.py 2017-05-13 13:52:45.554213616 +1000 -@@ -208,7 +208,8 @@ - elif compiler[:3] == "gcc" or compiler[:3] == "g++": - return "-Wl,-R" + dir - else: -- return "-R" + dir -+ # Patched by spack to use GNU ld syntax by default: -+ return "-Wl,--enable-new-dtags,-R" + dir - - def library_option(self, lib): - return "-l" + lib diff --git a/scripts/uberenv_configs/packages/python/fj-rpath-3.1.patch b/scripts/uberenv_configs/packages/python/fj-rpath-3.1.patch deleted file mode 100644 index d25b58da7..000000000 --- a/scripts/uberenv_configs/packages/python/fj-rpath-3.1.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/Lib/distutils/unixccompiler.py 2009-05-09 21:55:12.000000000 +1000 -+++ b/Lib/distutils/unixccompiler.py 2017-05-13 14:30:18.077518999 +1000 -@@ -215,7 +211,8 @@ - return "-L" + dir - - def _is_gcc(self, compiler_name): -- return "gcc" in compiler_name or "g++" in compiler_name -+ return "gcc" in compiler_name or "g++" in compiler_name \ -+ or "fcc" in compiler_name or "FCC" in compiler_name - - def runtime_library_dir_option(self, dir): - # XXX Hackish, at the very least. See Python bug #445902: - diff --git a/scripts/uberenv_configs/packages/python/fj-rpath-3.9.patch b/scripts/uberenv_configs/packages/python/fj-rpath-3.9.patch deleted file mode 100644 index 1542b367e..000000000 --- a/scripts/uberenv_configs/packages/python/fj-rpath-3.9.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- spack-src/Lib/distutils/unixccompiler.py.org 2022-01-31 14:42:34.000000000 +0900 -+++ spack-src/Lib/distutils/unixccompiler.py 2022-01-31 14:43:19.000000000 +0900 -@@ -212,7 +212,7 @@ - - def _is_gcc(self, compiler_name): - # clang uses same syntax for rpath as gcc -- return any(name in compiler_name for name in ("gcc", "g++", "clang")) -+ return any(name in compiler_name for name in ("gcc", "g++", "clang", "fcc", "FCC")) - - def runtime_library_dir_option(self, dir): - # XXX Hackish, at the very least. See Python bug #445902: diff --git a/scripts/uberenv_configs/packages/python/gcc-8-2.7.14.patch b/scripts/uberenv_configs/packages/python/gcc-8-2.7.14.patch deleted file mode 100644 index 72c879cde..000000000 --- a/scripts/uberenv_configs/packages/python/gcc-8-2.7.14.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/Include/objimpl.h b/Include/objimpl.h -index 5f2868332955..cbf6bc3f8763 100644 ---- a/Include/objimpl.h -+++ b/Include/objimpl.h -@@ -248,6 +248,20 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); - /* for source compatibility with 2.2 */ - #define _PyObject_GC_Del PyObject_GC_Del - -+/* -+ * Former over-aligned definition of PyGC_Head, used to compute the size of the -+ * padding for the new version below. -+ */ -+union _gc_head; -+union _gc_head_old { -+ struct { -+ union _gc_head_old *gc_next; -+ union _gc_head_old *gc_prev; -+ Py_ssize_t gc_refs; -+ } gc; -+ long double dummy; -+}; -+ - /* GC information is stored BEFORE the object structure. */ - typedef union _gc_head { - struct { -@@ -255,7 +269,8 @@ typedef union _gc_head { - union _gc_head *gc_prev; - Py_ssize_t gc_refs; - } gc; -- long double dummy; /* force worst-case alignment */ -+ double dummy; /* Force at least 8-byte alignment. */ -+ char dummy_padding[sizeof(union _gc_head_old)]; - } PyGC_Head; - - extern PyGC_Head *_PyGC_generation0; diff --git a/scripts/uberenv_configs/packages/python/intel-3.6.7.patch b/scripts/uberenv_configs/packages/python/intel-3.6.7.patch deleted file mode 100644 index f2277624a..000000000 --- a/scripts/uberenv_configs/packages/python/intel-3.6.7.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 87ed388f41d761ddddc8447e5104569f2436c005 Mon Sep 17 00:00:00 2001 -From: Victor Stinner -Date: Fri, 11 Oct 2019 15:13:51 +0200 -Subject: [PATCH] bpo-37415: Fix stdatomic.h header check for ICC compiler - -Fix stdatomic.h header check for ICC compiler: the ICC implementation -lacks atomic_uintptr_t type which is needed by Python. - -Test: - -* atomic_int and atomic_uintptr_t types -* atomic_load_explicit() and atomic_store_explicit() -* memory_order_relaxed and memory_order_seq_cst constants - -But don't test ATOMIC_VAR_INIT(): it's not used in Python. ---- - configure | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index f1979c1b8124c..1b30a848a77e7 100755 ---- a/configure -+++ b/configure -@@ -16734,9 +16722,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext - - - #include -- atomic_int value = ATOMIC_VAR_INIT(1); -+ atomic_int int_var; -+ atomic_uintptr_t uintptr_var; - int main() { -- int loaded_value = atomic_load(&value); -+ atomic_store_explicit(&int_var, 5, memory_order_relaxed); -+ atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed); -+ int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst); - return 0; - } - diff --git a/scripts/uberenv_configs/packages/python/package.py b/scripts/uberenv_configs/packages/python/package.py deleted file mode 100644 index 089df0749..000000000 --- a/scripts/uberenv_configs/packages/python/package.py +++ /dev/null @@ -1,1664 +0,0 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import glob -import json -import os -import platform -import re -import subprocess -import sys -from shutil import copy -from typing import Dict, List - -import llnl.util.tty as tty -from llnl.util.filesystem import ( - is_nonsymlink_exe_with_shebang, - path_contains_subdirectory, -) -from llnl.util.lang import dedupe, match_predicate - -from spack.build_environment import dso_suffix, stat_suffix -from spack.package import * -from spack.util.environment import is_system_path -from spack.util.prefix import Prefix - -is_windows = sys.platform == "win32" - - -class Python(Package): - """The Python programming language.""" - - homepage = "https://www.python.org/" - url = "https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz" - list_url = "https://www.python.org/ftp/python/" - list_depth = 1 - - maintainers = ["adamjstewart", "skosukhin", "scheibelp", "pradyunsg"] - - phases = ["configure", "build", "install"] - - #: phase - install_targets = ["install"] - build_targets = [] # type: List[str] - - version("3.11.2", sha256="2411c74bda5bbcfcddaf4531f66d1adc73f247f529aee981b029513aefdbf849") - version("3.11.1", sha256="baed518e26b337d4d8105679caf68c5c32630d702614fc174e98cb95c46bdfa4") - version("3.11.0", sha256="64424e96e2457abbac899b90f9530985b51eef2905951febd935f0e73414caeb") - version("3.10.10", sha256="fba64559dde21ebdc953e4565e731573bb61159de8e4d4cedee70fb1196f610d") - version("3.10.9", sha256="4ccd7e46c8898f4c7862910a1703aa0e63525913a519abb2f55e26220a914d88") - version("3.10.8", sha256="f400c3fb394b8bef1292f6dc1292c5fadc3533039a5bc0c3e885f3e16738029a") - version("3.10.7", sha256="1b2e4e2df697c52d36731666979e648beeda5941d0f95740aafbf4163e5cc126") - version("3.10.6", sha256="848cb06a5caa85da5c45bd7a9221bb821e33fc2bdcba088c127c58fad44e6343") - version("3.10.5", sha256="18f57182a2de3b0be76dfc39fdcfd28156bb6dd23e5f08696f7492e9e3d0bf2d") - version("3.10.4", sha256="f3bcc65b1d5f1dc78675c746c98fcee823c038168fc629c5935b044d0911ad28") - version("3.10.3", sha256="5a3b029bad70ba2a019ebff08a65060a8b9b542ffc1a83c697f1449ecca9813b") - version("3.10.2", sha256="3c0ede893011319f9b0a56b44953a3d52c7abf9657c23fb4bc9ced93b86e9c97") - version("3.10.1", sha256="b76117670e7c5064344b9c138e141a377e686b9063f3a8a620ff674fa8ec90d3") - version("3.10.0", sha256="c4e0cbad57c90690cb813fb4663ef670b4d0f587d8171e2c42bd4c9245bd2758") - version( - "3.9.13", - sha256="829b0d26072a44689a6b0810f5b4a3933ee2a0b8a4bfc99d7c5893ffd4f97c44", - preferred=True, - ) - version("3.9.12", sha256="70e08462ebf265012bd2be88a63d2149d880c73e53f1712b7bbbe93750560ae8") - version("3.9.11", sha256="3442400072f582ac2f0df30895558f08883b416c8c7877ea55d40d00d8a93112") - version("3.9.10", sha256="1aa9c0702edbae8f6a2c95f70a49da8420aaa76b7889d3419c186bfc8c0e571e") - version("3.9.9", sha256="2cc7b67c1f3f66c571acc42479cdf691d8ed6b47bee12c9b68430413a17a44ea") - version("3.9.8", sha256="7447fb8bb270942d620dd24faa7814b1383b61fa99029a240025fd81c1db8283") - version("3.9.7", sha256="a838d3f9360d157040142b715db34f0218e535333696a5569dc6f854604eb9d1") - version("3.9.6", sha256="d0a35182e19e416fc8eae25a3dcd4d02d4997333e4ad1f2eee6010aadc3fe866") - version("3.9.5", sha256="e0fbd5b6e1ee242524430dee3c91baf4cbbaba4a72dd1674b90fda87b713c7ab") - version("3.9.4", sha256="66c4de16daa74a825cf9da9ddae1fe020b72c3854b73b1762011cc33f9e4592f") - version("3.9.3", sha256="3afeb61a45b5a2e6f1c0f621bd8cf925a4ff406099fdb3d8c97b993a5f43d048") - version("3.9.2", sha256="7899e8a6f7946748830d66739f2d8f2b30214dad956e56b9ba216b3de5581519") - version("3.9.1", sha256="29cb91ba038346da0bd9ab84a0a55a845d872c341a4da6879f462e94c741f117") - version("3.9.0", sha256="df796b2dc8ef085edae2597a41c1c0a63625ebd92487adaef2fed22b567873e8") - version("3.8.13", sha256="903b92d76354366b1d9c4434d0c81643345cef87c1600adfa36095d7b00eede4") - version("3.8.12", sha256="316aa33f3b7707d041e73f246efedb297a70898c4b91f127f66dc8d80c596f1a") - version("3.8.11", sha256="b77464ea80cec14581b86aeb7fb2ff02830e0abc7bcdc752b7b4bdfcd8f3e393") - version("3.8.10", sha256="b37ac74d2cbad2590e7cd0dd2b3826c29afe89a734090a87bf8c03c45066cb65") - version("3.8.9", sha256="9779ec1df000bf86914cdd40860b88da56c1e61db59d37784beca14a259ac9e9") - version("3.8.8", sha256="76c0763f048e4f9b861d24da76b7dd5c7a3ba7ec086f40caedeea359263276f7") - version("3.8.7", sha256="20e5a04262f0af2eb9c19240d7ec368f385788bba2d8dfba7e74b20bab4d2bac") - version("3.8.6", sha256="313562ee9986dc369cd678011bdfd9800ef62fbf7b1496228a18f86b36428c21") - version("3.8.5", sha256="015115023c382eb6ab83d512762fe3c5502fa0c6c52ffebc4831c4e1a06ffc49") - version("3.8.4", sha256="32c4d9817ef11793da4d0d95b3191c4db81d2e45544614e8449255ca9ae3cc18") - version("3.8.3", sha256="6af6d4d2e010f9655518d0fc6738c7ff7069f10a4d2fbd55509e467f092a8b90") - version("3.8.2", sha256="e634a7a74776c2b89516b2e013dda1728c89c8149b9863b8cea21946daf9d561") - version("3.8.1", sha256="c7cfa39a43b994621b245e029769e9126caa2a93571cee2e743b213cceac35fb") - version("3.8.0", sha256="f1069ad3cae8e7ec467aa98a6565a62a48ef196cb8f1455a245a08db5e1792df") - version("3.7.13", sha256="e405417f50984bc5870c7e7a9f9aeb93e9d270f5ac67f667a0cd3a09439682b5") - version("3.7.12", sha256="33b4daaf831be19219659466d12645f87ecec6eb21d4d9f9711018a7b66cce46") - version("3.7.11", sha256="b4fba32182e16485d0a6022ba83c9251e6a1c14676ec243a9a07d3722cd4661a") - version("3.7.10", sha256="c9649ad84dc3a434c8637df6963100b2e5608697f9ba56d82e3809e4148e0975") - version("3.7.9", sha256="39b018bc7d8a165e59aa827d9ae45c45901739b0bbb13721e4f973f3521c166a") - version("3.7.8", sha256="0e25835614dc221e3ecea5831b38fa90788b5389b99b675a751414c858789ab0") - version("3.7.7", sha256="8c8be91cd2648a1a0c251f04ea0bb4c2a5570feb9c45eaaa2241c785585b475a") - version("3.7.6", sha256="aeee681c235ad336af116f08ab6563361a0c81c537072c1b309d6e4050aa2114") - version("3.7.5", sha256="8ecc681ea0600bbfb366f2b173f727b205bb825d93d2f0b286bc4e58d37693da") - version("3.7.4", sha256="d63e63e14e6d29e17490abbe6f7d17afb3db182dbd801229f14e55f4157c4ba3") - version("3.7.3", sha256="d62e3015f2f89c970ac52343976b406694931742fbde2fed8d1ce8ebb4e1f8ff") - version("3.7.2", sha256="f09d83c773b9cc72421abba2c317e4e6e05d919f9bcf34468e192b6a6c8e328d") - version("3.7.1", sha256="36c1b81ac29d0f8341f727ef40864d99d8206897be96be73dc34d4739c9c9f06") - version("3.7.0", sha256="85bb9feb6863e04fb1700b018d9d42d1caac178559ffa453d7e6a436e259fd0d") - version( - "3.6.15", - sha256="54570b7e339e2cfd72b29c7e2fdb47c0b7b18b7412e61de5b463fc087c13b043", - deprecated=True, - ) - version( - "3.6.14", - sha256="70064897bc434d6eae8bcc3e5678f282b5ea776d60e695da548a1219ccfd27a5", - deprecated=True, - ) - version( - "3.6.13", - sha256="614950d3d54f6e78dac651b49c64cfe2ceefea5af3aff3371a9e4b27a53b2669", - deprecated=True, - ) - version( - "3.6.12", - sha256="12dddbe52385a0f702fb8071e12dcc6b3cb2dde07cd8db3ed60e90d90ab78693", - deprecated=True, - ) - version( - "3.6.11", - sha256="96621902f89746fffc22f39749c07da7c2917b232e72352e6837d41850f7b90c", - deprecated=True, - ) - version( - "3.6.10", - sha256="7034dd7cba98d4f94c74f9edd7345bac71c8814c41672c64d9044fa2f96f334d", - deprecated=True, - ) - version( - "3.6.9", - sha256="47fc92a1dcb946b9ed0abc311d3767b7215c54e655b17fd1d3f9b538195525aa", - deprecated=True, - ) - version( - "3.6.8", - sha256="7f5b1f08b3b0a595387ef6c64c85b1b13b38abef0dd871835ee923262e4f32f0", - deprecated=True, - ) - version( - "3.6.7", - sha256="b7c36f7ed8f7143b2c46153b7332db2227669f583ea0cce753facf549d1a4239", - deprecated=True, - ) - version( - "3.6.6", - sha256="7d56dadf6c7d92a238702389e80cfe66fbfae73e584189ed6f89c75bbf3eda58", - deprecated=True, - ) - version( - "3.6.5", - sha256="53a3e17d77cd15c5230192b6a8c1e031c07cd9f34a2f089a731c6f6bd343d5c6", - deprecated=True, - ) - version( - "3.6.4", - sha256="7dc453e1a93c083388eb1a23a256862407f8234a96dc4fae0fc7682020227486", - deprecated=True, - ) - version( - "3.6.3", - sha256="ab6193af1921b30f587b302fe385268510e80187ca83ca82d2bfe7ab544c6f91", - deprecated=True, - ) - version( - "3.6.2", - sha256="7919489310a5f17f7acbab64d731e46dca0702874840dadce8bd4b2b3b8e7a82", - deprecated=True, - ) - version( - "3.6.1", - sha256="aa50b0143df7c89ce91be020fe41382613a817354b33acdc6641b44f8ced3828", - deprecated=True, - ) - version( - "3.6.0", - sha256="aa472515800d25a3739833f76ca3735d9f4b2fe77c3cb21f69275e0cce30cb2b", - deprecated=True, - ) - version( - "3.5.10", - sha256="3496a0daf51913718a6f10e3eda51fa43634cb6151cb096f312d48bdbeff7d3a", - deprecated=True, - ) - version( - "3.5.9", - sha256="67a1d4fc6e4540d6a092cadc488e533afa961b3c9becc74dc3d6b55cb56e0cc1", - deprecated=True, - ) - version( - "3.5.8", - sha256="18c88dfd260147bc7247e6356010e5d4916dfbfc480f6434917f88e61228177a", - deprecated=True, - ) - version( - "3.5.7", - sha256="542d94920a2a06a471a73b51614805ad65366af98145b0369bc374cf248b521b", - deprecated=True, - ) - version( - "3.5.6", - sha256="30d2ff093988e74283e1abfee823292c6b59590796b9827e95ba4940b27d26f8", - deprecated=True, - ) - version( - "3.5.5", - sha256="2f988db33913dcef17552fd1447b41afb89dbc26e3cdfc068ea6c62013a3a2a5", - deprecated=True, - ) - version( - "3.5.4", - sha256="6ed87a8b6c758cc3299a8b433e8a9a9122054ad5bc8aad43299cff3a53d8ca44", - deprecated=True, - ) - version( - "3.5.3", - sha256="d8890b84d773cd7059e597dbefa510340de8336ec9b9e9032bf030f19291565a", - deprecated=True, - ) - version( - "3.5.2", - sha256="1524b840e42cf3b909e8f8df67c1724012c7dc7f9d076d4feef2d3eff031e8a0", - deprecated=True, - ) - version( - "3.5.1", - sha256="687e067d9f391da645423c7eda8205bae9d35edc0c76ef5218dcbe4cc770d0d7", - deprecated=True, - ) - version( - "3.5.0", - sha256="584e3d5a02692ca52fce505e68ecd77248a6f2c99adf9db144a39087336b0fe0", - deprecated=True, - ) - version( - "3.4.10", - sha256="217757699249ab432571b381386d441e12b433100ab5f908051fcb7cced2539d", - deprecated=True, - ) - version( - "3.4.3", - sha256="8b743f56e9e50bf0923b9e9c45dd927c071d7aa56cd46569d8818add8cf01147", - deprecated=True, - ) - version( - "3.3.6", - sha256="0a58ad1f1def4ecc90b18b0c410a3a0e1a48cf7692c75d1f83d0af080e5d2034", - deprecated=True, - ) - version( - "3.2.6", - sha256="fc1e41296e29d476f696303acae293ae7a2310f0f9d0d637905e722a3f16163e", - deprecated=True, - ) - version( - "3.1.5", - sha256="d12dae6d06f52ef6bf1271db4d5b4d14b5dd39813e324314e72b648ef1bc0103", - deprecated=True, - ) - version( - "2.7.18", - sha256="da3080e3b488f648a3d7a4560ddee895284c3380b11d6de75edb986526b9a814", - deprecated=True, - ) - version( - "2.7.17", - sha256="f22059d09cdf9625e0a7284d24a13062044f5bf59d93a7f3382190dfa94cecde", - deprecated=True, - ) - version( - "2.7.16", - sha256="01da813a3600876f03f46db11cc5c408175e99f03af2ba942ef324389a83bad5", - deprecated=True, - ) - version( - "2.7.15", - sha256="18617d1f15a380a919d517630a9cd85ce17ea602f9bbdc58ddc672df4b0239db", - deprecated=True, - ) - version( - "2.7.14", - sha256="304c9b202ea6fbd0a4a8e0ad3733715fbd4749f2204a9173a58ec53c32ea73e8", - deprecated=True, - ) - version( - "2.7.13", - sha256="a4f05a0720ce0fd92626f0278b6b433eee9a6173ddf2bced7957dfb599a5ece1", - deprecated=True, - ) - version( - "2.7.12", - sha256="3cb522d17463dfa69a155ab18cffa399b358c966c0363d6c8b5b3bf1384da4b6", - deprecated=True, - ) - version( - "2.7.11", - sha256="82929b96fd6afc8da838b149107078c02fa1744b7e60999a8babbc0d3fa86fc6", - deprecated=True, - ) - version( - "2.7.10", - sha256="eda8ce6eec03e74991abb5384170e7c65fcd7522e409b8e83d7e6372add0f12a", - deprecated=True, - ) - version( - "2.7.9", - sha256="c8bba33e66ac3201dabdc556f0ea7cfe6ac11946ec32d357c4c6f9b018c12c5b", - deprecated=True, - ) - version( - "2.7.8", - sha256="74d70b914da4487aa1d97222b29e9554d042f825f26cb2b93abd20fdda56b557", - deprecated=True, - ) - - extendable = True - - # Variants to avoid cyclical dependencies for concretizer - variant("libxml2", default=True, description="Use a gettext library build with libxml2") - - variant( - "debug", default=False, description="debug build with extra checks (this is high overhead)" - ) - - # --enable-shared is known to cause problems for some users on macOS - # This is a problem for Python 2.7 only, not Python3 - # See http://bugs.python.org/issue29846 - variant("shared", default=True, description="Enable shared libraries") - # From https://docs.python.org/2/c-api/unicode.html: Python's default - # builds use a 16-bit type for Py_UNICODE and store Unicode values - # internally as UCS2. It is also possible to build a UCS4 version of Python - # (most recent Linux distributions come with UCS4 builds of Python). These - # builds then use a 32-bit type for Py_UNICODE and store Unicode data - # internally as UCS4. Note that UCS2 and UCS4 Python builds are not binary - # compatible. - variant("ucs4", default=False, description="Enable UCS4 (wide) unicode strings") - variant("pic", default=True, description="Produce position-independent code (for shared libs)") - variant( - "optimizations", - default=False, - description="Enable expensive build-time optimizations, if available", - ) - # See https://legacy.python.org/dev/peps/pep-0394/ - variant( - "pythoncmd", - default=not is_windows, - description="Symlink 'python3' executable to 'python' " "(not PEP 394 compliant)", - ) - - # Optional Python modules - variant("readline", default=not is_windows, description="Build readline module") - variant("ssl", default=True, description="Build ssl module") - variant("sqlite3", default=True, description="Build sqlite3 module") - variant("dbm", default=True, description="Build dbm module") - variant("nis", default=False, description="Build nis module") - variant("zlib", default=True, description="Build zlib module") - variant("bz2", default=True, description="Build bz2 module") - variant("lzma", default=True, description="Build lzma module", when="@3.3:") - variant("pyexpat", default=True, description="Build pyexpat module") - variant("ctypes", default=True, description="Build ctypes module") - variant("tkinter", default=False, description="Build tkinter module") - variant("uuid", default=True, description="Build uuid module") - variant("tix", default=False, description="Build Tix module") - - if not is_windows: - depends_on("pkgconfig@0.9.0:", type="build") - depends_on("gettext +libxml2", when="+libxml2") - depends_on("gettext ~libxml2", when="~libxml2") - - # Optional dependencies - # See detect_modules() in setup.py for details - depends_on("readline", when="+readline") - depends_on("ncurses", when="+readline") - depends_on("openssl", when="+ssl") - # https://raw.githubusercontent.com/python/cpython/84471935ed2f62b8c5758fd544c7d37076fe0fa5/Misc/NEWS - # https://docs.python.org/3.5/whatsnew/changelog.html#python-3-5-4rc1 - depends_on("openssl@:1.0.2z", when="@:2.7.13,3.0.0:3.5.2+ssl") - depends_on( - "openssl@1.0.2:", when="@3.7:+ssl" - ) # https://docs.python.org/3/whatsnew/3.7.html#build-changes - depends_on( - "openssl@1.1.1:", when="@3.10:+ssl" - ) # https://docs.python.org/3.10/whatsnew/3.10.html#build-changes - depends_on("sqlite@3.0.8:", when="@:3.9+sqlite3") - depends_on( - "sqlite@3.7.15:", when="@3.10:+sqlite3" - ) # https://docs.python.org/3.10/whatsnew/3.10.html#build-changes - depends_on("gdbm", when="+dbm") # alternatively ndbm or berkeley-db - depends_on("libnsl", when="+nis") - depends_on("zlib@1.1.3:", when="+zlib") - depends_on("bzip2", when="+bz2") - depends_on("xz", when="@3.3:+lzma") - depends_on("expat", when="+pyexpat") - depends_on("libffi", when="+ctypes") - depends_on("tk", when="+tkinter") - depends_on("tcl", when="+tkinter") - depends_on("uuid", when="+uuid") - depends_on("tix", when="+tix") - - # Python needs to be patched to build extensions w/ mixed C/C++ code: - # https://github.com/NixOS/nixpkgs/pull/19585/files - # https://bugs.python.org/issue1222585 - # - # NOTE: This patch puts Spack's default Python installation out of - # sync with standard Python installs. If you're using such an - # installation as an external and encountering build issues with mixed - # C/C++ modules, consider installing a Spack-managed Python with - # this patch instead. For more information, see: - # https://github.com/spack/spack/pull/16856 - patch("python-2.7.8-distutils-C++.patch", when="@2.7.8:2.7.16") - patch("python-2.7.17+-distutils-C++.patch", when="@2.7.17:2.7.18") - patch("python-2.7.17+-distutils-C++-fixup.patch", when="@2.7.17:2.7.18") - patch("python-3.6.8-distutils-C++.patch", when="@3.6.8,3.7.2") - patch("python-3.7.3-distutils-C++.patch", when="@3.7.3") - patch("python-3.7.4+-distutils-C++.patch", when="@3.7.4:3.10.99") - patch("python-3.7.4+-distutils-C++-testsuite.patch", when="@3.7.4:3.10.99") - patch("cpython-windows-externals.patch", when="@:3.9.6 platform=windows") - patch("tkinter.patch", when="@:2.8,3.3:3.7 platform=darwin") - # Patch the setup script to deny that tcl/x11 exists rather than allowing - # autodetection of (possibly broken) system components - patch("tkinter-3.8.patch", when="@3.8:3.9 ~tkinter") - patch("tkinter-3.10.patch", when="@3.10:3.10.99 ~tkinter") - - # Ensure that distutils chooses correct compiler option for RPATH on cray: - patch("cray-rpath-2.3.patch", when="@2.3:3.0.1 platform=cray") - patch("cray-rpath-3.1.patch", when="@3.1:3 platform=cray") - - # Ensure that distutils chooses correct compiler option for RPATH on fj: - patch("fj-rpath-2.3.patch", when="@2.3:3.0.1 %fj") - patch("fj-rpath-3.1.patch", when="@3.1:3.9.7,3.10.0 %fj") - patch("fj-rpath-3.9.patch", when="@3.9.8:3.9,3.10.1:3.10.99 %fj") - - # Fixes an alignment problem with more aggressive optimization in gcc8 - # https://github.com/python/cpython/commit/0b91f8a668201fc58fa732b8acc496caedfdbae0 - patch("gcc-8-2.7.14.patch", when="@2.7.14 %gcc@8:") - - # Fixes build with the Intel compilers - # https://github.com/python/cpython/pull/16717 - patch("intel-3.6.7.patch", when="@3.6.7:3.6.8,3.7.1:3.7.5 %intel") - - # CPython tries to build an Objective-C file with GCC's C frontend - # https://github.com/spack/spack/pull/16222 - # https://github.com/python/cpython/pull/13306 - conflicts( - "%gcc platform=darwin", - msg="CPython does not compile with GCC on macOS yet, use clang. " - "See: https://github.com/python/cpython/pull/13306", - ) - # For more information refer to this bug report: - # https://bugs.python.org/issue29712 - conflicts( - "@:2.8 +shared", - when="+optimizations", - msg="+optimizations is incompatible with +shared in python@2.X", - ) - conflicts("+tix", when="~tkinter", msg="python+tix requires python+tix+tkinter") - conflicts("%nvhpc") - conflicts( - "@:2.7", - when="platform=darwin target=aarch64:", - msg="Python 2.7 is too old for Apple Silicon", - ) - - # Used to cache various attributes that are expensive to compute - _config_vars = {} # type: Dict[str, Dict[str, str]] - - # An in-source build with --enable-optimizations fails for python@3.X - build_directory = "spack-build" - - executables = [r"^python[\d.]*[mw]?$"] - - @classmethod - def determine_version(cls, exe): - # Newer versions of Python support `--version`, - # but older versions only support `-V` - # Python 2 sends to STDERR, while Python 3 sends to STDOUT - # Output looks like: - # Python 3.7.7 - # On pre-production Ubuntu, this is also possible: - # Python 3.10.2+ - output = Executable(exe)("-V", output=str, error=str) - match = re.search(r"Python\s+([A-Za-z0-9_.-]+)", output) - return match.group(1) if match else None - - @classmethod - def determine_variants(cls, exes, version_str): - python = Executable(exes[0]) - - variants = "" - for exe in exes: - if os.path.basename(exe) == "python": - variants += "+pythoncmd" - break - else: - variants += "~pythoncmd" - - for module in ["readline", "sqlite3", "dbm", "nis", "zlib", "bz2", "ctypes", "uuid"]: - try: - python("-c", "import " + module, error=os.devnull) - variants += "+" + module - except ProcessError: - variants += "~" + module - - # Some variants enable multiple modules - try: - python("-c", "import ssl", error=os.devnull) - python("-c", "import hashlib", error=os.devnull) - variants += "+ssl" - except ProcessError: - variants += "~ssl" - - try: - python("-c", "import xml.parsers.expat", error=os.devnull) - python("-c", "import xml.etree.ElementTree", error=os.devnull) - variants += "+pyexpat" - except ProcessError: - variants += "~pyexpat" - - # Some modules are version-dependent - if Version(version_str) >= Version("3.3"): - try: - python("-c", "import lzma", error=os.devnull) - variants += "+lzma" - except ProcessError: - variants += "~lzma" - - if Version(version_str) >= Version("3"): - try: - python("-c", "import tkinter", error=os.devnull) - variants += "+tkinter" - except ProcessError: - variants += "~tkinter" - - try: - python("-c", "import tkinter.tix", error=os.devnull) - variants += "+tix" - except ProcessError: - variants += "~tix" - else: - try: - python("-c", "import Tkinter", error=os.devnull) - variants += "+tkinter" - except ProcessError: - variants += "~tkinter" - - try: - python("-c", "import Tix", error=os.devnull) - variants += "+tix" - except ProcessError: - variants += "~tix" - - return variants - - def url_for_version(self, version): - url = "https://www.python.org/ftp/python/{0}/Python-{1}.tgz" - return url.format(re.split("[a-z]", str(version))[0], version) - - # TODO: Ideally, these patches would be applied as separate '@run_before' - # functions enabled via '@when', but these two decorators don't work - # when used together. See: https://github.com/spack/spack/issues/12736 - def patch(self): - # NOTE: Python's default installation procedure makes it possible for a - # user's local configurations to change the Spack installation. In - # order to prevent this behavior for a full installation, we must - # modify the installation script so that it ignores user files. - if self.spec.satisfies("@2.7:2.8,3.4:"): - ff = FileFilter("Makefile.pre.in") - ff.filter( - r"^(.*)setup\.py(.*)((build)|(install))(.*)$", r"\1setup.py\2 --no-user-cfg \3\6" - ) - - # NOTE: Older versions of Python do not support the '--with-openssl' - # configuration option, so the installation's module setup file needs - # to be modified directly in order to point to the correct SSL path. - # See: https://stackoverflow.com/a/5939170 - if self.spec.satisfies("@:3.6+ssl"): - ff = FileFilter(join_path("Modules", "Setup.dist")) - ff.filter(r"^#(((SSL=)|(_ssl))(.*))$", r"\1") - ff.filter(r"^#((.*)(\$\(SSL\))(.*))$", r"\1") - ff.filter(r"^SSL=(.*)$", r"SSL={0}".format(self.spec["openssl"].prefix)) - # Because Python uses compiler system paths during install, it's - # possible to pick up a system OpenSSL when building 'python~ssl'. - # To avoid this scenario, we disable the 'ssl' module with patching. - elif self.spec.satisfies("@:3.6~ssl"): - ff = FileFilter("setup.py") - ff.filter(r"^(\s+(ssl_((incs)|(libs)))\s+=\s+)(.*)$", r"\1 None and \6") - ff.filter(r"^(\s+(opensslv_h)\s+=\s+)(.*)$", r"\1 None and \3") - - def setup_build_environment(self, env): - spec = self.spec - - # TODO: The '--no-user-cfg' option for Python installation is only in - # Python v2.7 and v3.4+ (see https://bugs.python.org/issue1180) and - # adding support for ignoring user configuration will require - # significant changes to this package for other Python versions. - if not spec.satisfies("@2.7:2.8,3.4:"): - tty.warn( - ( - "Python v{0} may not install properly if Python " - "user configurations are present." - ).format(self.version) - ) - - # TODO: Python has incomplete support for Python modules with mixed - # C/C++ source, and patches are required to enable building for these - # modules. All Python versions without a viable patch are installed - # with a warning message about this potentially erroneous behavior. - if not spec.satisfies("@2.7.8:2.7.18,3.6.8,3.7.2:"): - tty.warn( - ( - 'Python v{0} does not have the C++ "distutils" patch; ' - "errors may occur when installing Python modules w/ " - "mixed C/C++ source files." - ).format(self.version) - ) - - env.unset("PYTHONPATH") - env.unset("PYTHONHOME") - - # avoid build error on fugaku - if spec.satisfies("@3.10.0 arch=linux-rhel8-a64fx"): - if spec.satisfies("%gcc") or spec.satisfies("%fj"): - env.unset("LC_ALL") - - def flag_handler(self, name, flags): - # python 3.8 requires -fwrapv when compiled with intel - if self.spec.satisfies("@3.8: %intel"): - if name == "cflags": - flags.append("-fwrapv") - - # Fix for following issues for python with aocc%3.2.0: - # https://github.com/spack/spack/issues/29115 - # https://github.com/spack/spack/pull/28708 - if self.spec.satisfies("%aocc@3.2.0", strict=True): - if name == "cflags": - flags.extend(["-mllvm", "-disable-indvar-simplify=true"]) - - # allow flags to be passed through compiler wrapper - return (flags, None, None) - - @property - def plat_arch(self): - """ - String referencing platform architecture - filtered through Python's Windows build file - architecture support map - - Note: This function really only makes - sense to use on Windows, could be overridden to - cross compile however. - """ - - arch_map = {"AMD64": "x64", "x86": "Win32", "IA64": "Win32", "EM64T": "Win32"} - arch = platform.machine() - if arch in arch_map: - arch = arch_map[arch] - return arch - - @property - def win_build_params(self): - """ - Arguments must be passed to the Python build batch script - in order to configure it to spec and system. - A number of these toggle optional MSBuild Projects - directly corresponding to the python support of the same - name. - """ - args = [] - args.append("-p %s" % self.plat_arch) - if self.spec.satisfies("+debug"): - args.append("-d") - if self.spec.satisfies("~ctypes"): - args.append("--no-ctypes") - if self.spec.satisfies("~ssl"): - args.append("--no-ssl") - if self.spec.satisfies("~tkinter"): - args.append("--no-tkinter") - return args - - def win_installer(self, prefix): - """ - Python on Windows does not export an install target - so we must handcraft one here. This structure - directly mimics the install tree of the Python - Installer on Windows. - - Parameters: - prefix (str): Install prefix for package - """ - proj_root = self.stage.source_path - pcbuild_root = os.path.join(proj_root, "PCbuild") - build_root = os.path.join(pcbuild_root, platform.machine().lower()) - include_dir = os.path.join(proj_root, "Include") - copy_tree(include_dir, prefix.include) - doc_dir = os.path.join(proj_root, "Doc") - copy_tree(doc_dir, prefix.Doc) - tools_dir = os.path.join(proj_root, "Tools") - copy_tree(tools_dir, prefix.Tools) - lib_dir = os.path.join(proj_root, "Lib") - copy_tree(lib_dir, prefix.Lib) - pyconfig = os.path.join(proj_root, "PC", "pyconfig.h") - copy(pyconfig, prefix.include) - shared_libraries = [] - shared_libraries.extend(glob.glob("%s\\*.exe" % build_root)) - shared_libraries.extend(glob.glob("%s\\*.dll" % build_root)) - shared_libraries.extend(glob.glob("%s\\*.pyd" % build_root)) - os.makedirs(prefix.DLLs) - for lib in shared_libraries: - file_name = os.path.basename(lib) - if ( - file_name.endswith(".exe") - or (file_name.endswith(".dll") and "python" in file_name) - or "vcruntime" in file_name - ): - copy(lib, prefix) - else: - copy(lib, prefix.DLLs) - static_libraries = glob.glob("%s\\*.lib") - for lib in static_libraries: - copy(lib, prefix.libs) - - def configure_args(self): - spec = self.spec - config_args = [] - cflags = [] - - # setup.py needs to be able to read the CPPFLAGS and LDFLAGS - # as it scans for the library and headers to build - link_deps = spec.dependencies(deptype="link") - - if link_deps: - # Header files are often included assuming they reside in a - # subdirectory of prefix.include, e.g. #include , - # which is why we don't use HeaderList here. The header files of - # libffi reside in prefix.lib but the configure script of Python - # finds them using pkg-config. - cppflags = " ".join("-I" + spec[dep.name].prefix.include for dep in link_deps) - - # Currently, the only way to get SpecBuildInterface wrappers of the - # dependencies (which we need to get their 'libs') is to get them - # using spec.__getitem__. - ldflags = " ".join(spec[dep.name].libs.search_flags for dep in link_deps) - - config_args.extend(["CPPFLAGS=" + cppflags, "LDFLAGS=" + ldflags]) - - # https://docs.python.org/3/whatsnew/3.7.html#build-changes - if spec.satisfies("@:3.6"): - config_args.append("--with-threads") - - if spec.satisfies("@2.7.13:2.8,3.5.3:", strict=True) and "+optimizations" in spec: - config_args.append("--enable-optimizations") - config_args.append("--with-lto") - config_args.append("--with-computed-gotos") - - if spec.satisfies("%gcc platform=darwin"): - config_args.append("--disable-toolbox-glue") - - if spec.satisfies("%intel", strict=True) and spec.satisfies( - "@2.7.12:2.8,3.5.2:3.7", strict=True - ): - config_args.append("--with-icc={0}".format(spack_cc)) - - if "+debug" in spec: - config_args.append("--with-pydebug") - else: - config_args.append("--without-pydebug") - - if "+shared" in spec: - config_args.append("--enable-shared") - else: - config_args.append("--disable-shared") - - if "+ucs4" in spec: - if spec.satisfies("@:2.7"): - config_args.append("--enable-unicode=ucs4") - elif spec.satisfies("@3.0:3.2"): - config_args.append("--with-wide-unicode") - elif spec.satisfies("@3.3:"): - # https://docs.python.org/3.3/whatsnew/3.3.html#functionality - raise ValueError("+ucs4 variant not compatible with Python 3.3 and beyond") - - if spec.satisfies("@2.7.9:2,3.4:"): - config_args.append("--without-ensurepip") - - if "+pic" in spec: - cflags.append(self.compiler.cc_pic_flag) - - if "+ssl" in spec: - if spec.satisfies("@3.7:"): - config_args.append("--with-openssl={0}".format(spec["openssl"].prefix)) - - if "+dbm" in spec: - # Default order is ndbm:gdbm:bdb - config_args.append("--with-dbmliborder=gdbm") - else: - config_args.append("--with-dbmliborder=") - - if "+pyexpat" in spec: - config_args.append("--with-system-expat") - else: - config_args.append("--without-system-expat") - - if "+ctypes" in spec: - config_args.append("--with-system-ffi") - else: - config_args.append("--without-system-ffi") - - if "+tkinter" in spec: - config_args.extend( - [ - "--with-tcltk-includes=-I{0} -I{1}".format( - spec["tcl"].prefix.include, spec["tk"].prefix.include - ), - "--with-tcltk-libs={0} {1}".format( - spec["tcl"].libs.ld_flags, spec["tk"].libs.ld_flags - ), - ] - ) - - # https://docs.python.org/3.8/library/sqlite3.html#f1 - if spec.satisfies("@3.2: +sqlite3 ^sqlite+dynamic_extensions"): - config_args.append("--enable-loadable-sqlite-extensions") - - if spec.satisfies("%oneapi"): - cflags.append("-fp-model=strict") - - if cflags: - config_args.append("CFLAGS={0}".format(" ".join(cflags))) - - return config_args - - def configure(self, spec, prefix): - """Runs configure with the arguments specified in - :meth:`~spack.build_systems.autotools.AutotoolsPackage.configure_args` - and an appropriately set prefix. - """ - with working_dir(self.stage.source_path, create=True): - if is_windows: - pass - else: - options = getattr(self, "configure_flag_args", []) - options += ["--prefix={0}".format(prefix)] - options += self.configure_args() - configure(*options) - - def build(self, spec, prefix): - """Makes the build targets specified by - :py:attr:``~.AutotoolsPackage.build_targets`` - """ - # Windows builds use a batch script to drive - # configure and build in one step - with working_dir(self.stage.source_path): - if is_windows: - pcbuild_root = os.path.join(self.stage.source_path, "PCbuild") - builder_cmd = os.path.join(pcbuild_root, "build.bat") - try: - subprocess.check_output( # novermin - " ".join([builder_cmd] + self.win_build_params), stderr=subprocess.STDOUT - ) - except subprocess.CalledProcessError as e: - raise ProcessError( - "Process exited with status %d" % e.returncode, - long_message=e.output.decode("utf-8"), - ) - else: - # See https://autotools.io/automake/silent.html - params = ["V=1"] - params += self.build_targets - make(*params) - - def install(self, spec, prefix): - """Makes the install targets specified by - :py:attr:``~.AutotoolsPackage.install_targets`` - """ - with working_dir(self.stage.source_path): - if is_windows: - self.win_installer(prefix) - else: - make(*self.install_targets) - - @run_after("install") - def filter_compilers(self): - """Run after install to tell the configuration files and Makefiles - to use the compilers that Spack built the package with. - - If this isn't done, they'll have CC and CXX set to Spack's generic - cc and c++. We want them to be bound to whatever compiler - they were built with.""" - if is_windows: - return - kwargs = {"ignore_absent": True, "backup": False, "string": True} - - filenames = [self.get_sysconfigdata_name(), self.config_vars["makefile_filename"]] - - filter_file(spack_cc, self.compiler.cc, *filenames, **kwargs) - if spack_cxx and self.compiler.cxx: - filter_file(spack_cxx, self.compiler.cxx, *filenames, **kwargs) - - @run_after("install") - def symlink(self): - if is_windows: - return - spec = self.spec - prefix = self.prefix - - # TODO: - # On OpenSuse 13, python uses /lib64/python2.7/lib-dynload/*.so - # instead of /lib/python2.7/lib-dynload/*.so. Oddly enough the - # result is that Python can not find modules like cPickle. A workaround - # for now is to symlink to `lib`: - src = os.path.join(prefix.lib64, "python{0}".format(self.version.up_to(2)), "lib-dynload") - dst = os.path.join(prefix.lib, "python{0}".format(self.version.up_to(2)), "lib-dynload") - if os.path.isdir(src) and not os.path.isdir(dst): - mkdirp(dst) - for f in os.listdir(src): - os.symlink(os.path.join(src, f), os.path.join(dst, f)) - - if spec.satisfies("@3:") and spec.satisfies("+pythoncmd"): - os.symlink(os.path.join(prefix.bin, "python3"), os.path.join(prefix.bin, "python")) - os.symlink( - os.path.join(prefix.bin, "python3-config"), - os.path.join(prefix.bin, "python-config"), - ) - - @run_after("install") - def install_python_gdb(self): - # https://devguide.python.org/gdb/ - src = os.path.join("Tools", "gdb", "libpython.py") - if os.path.exists(src): - install(src, self.command.path + "-gdb.py") - - @run_after("install") - @on_package_attributes(run_tests=True) - def import_tests(self): - """Test that basic Python functionality works.""" - - spec = self.spec - - with working_dir("spack-test", create=True): - # Ensure that readline module works - if "+readline" in spec: - self.command("-c", "import readline") - - # Ensure that ssl module works - if "+ssl" in spec: - self.command("-c", "import ssl") - self.command("-c", "import hashlib") - - # Ensure that sqlite3 module works - if "+sqlite3" in spec: - self.command("-c", "import sqlite3") - - # Ensure that dbm module works - if "+dbm" in spec: - self.command("-c", "import dbm") - - # Ensure that nis module works - if "+nis" in spec: - self.command("-c", "import nis") - - # Ensure that zlib module works - if "+zlib" in spec: - self.command("-c", "import zlib") - - # Ensure that bz2 module works - if "+bz2" in spec: - self.command("-c", "import bz2") - - # Ensure that lzma module works - if spec.satisfies("@3.3:"): - if "+lzma" in spec: - self.command("-c", "import lzma") - - # Ensure that pyexpat module works - if "+pyexpat" in spec: - self.command("-c", "import xml.parsers.expat") - self.command("-c", "import xml.etree.ElementTree") - - # Ensure that ctypes module works - if "+ctypes" in spec: - self.command("-c", "import ctypes") - - # Ensure that tkinter module works - # https://wiki.python.org/moin/TkInter - if "+tkinter" in spec: - # Only works if ForwardX11Trusted is enabled, i.e. `ssh -Y` - if "DISPLAY" in env: - if spec.satisfies("@3:"): - self.command("-c", "import tkinter; tkinter._test()") - else: - self.command("-c", "import Tkinter; Tkinter._test()") - else: - if spec.satisfies("@3:"): - self.command("-c", "import tkinter") - else: - self.command("-c", "import Tkinter") - - # Ensure that uuid module works - if "+uuid" in spec: - self.command("-c", "import uuid") - - # Ensure that tix module works - if "+tix" in spec: - if spec.satisfies("@3:"): - self.command("-c", "import tkinter.tix") - else: - self.command("-c", "import Tix") - - # ======================================================================== - # Set up environment to make install easy for python extensions. - # ======================================================================== - - @property - def command(self): - """Returns the Python command, which may vary depending - on the version of Python and how it was installed. - - In general, Python 2 comes with ``python`` and ``python2`` commands, - while Python 3 only comes with a ``python3`` command. However, some - package managers will symlink ``python`` to ``python3``, while others - may contain ``python3.6``, ``python3.5``, and ``python3.4`` in the - same directory. - - Returns: - Executable: the Python command - """ - # We need to be careful here. If the user is using an externally - # installed python, several different commands could be located - # in the same directory. Be as specific as possible. Search for: - # - # * python3.6 - # * python3 - # * python - # - # in that order if using python@3.6.5, for example. - version = self.spec.version - for ver in [version.up_to(2), version.up_to(1), ""]: - if not is_windows: - path = os.path.join(self.prefix.bin, "python{0}".format(ver)) - else: - path = os.path.join(self.prefix, "python{0}.exe".format(ver)) - if os.path.exists(path): - return Executable(path) - - else: - msg = "Unable to locate {0} command in {1}" - raise RuntimeError(msg.format(self.name, self.prefix.bin)) - - def print_string(self, string): - """Returns the appropriate print string depending on the - version of Python. - - Examples: - - * Python 2 - - .. code-block:: python - - >>> self.print_string('sys.prefix') - 'print sys.prefix' - - * Python 3 - - .. code-block:: python - - >>> self.print_string('sys.prefix') - 'print(sys.prefix)' - """ - if self.spec.satisfies("@:2"): - return "print {0}".format(string) - else: - return "print({0})".format(string) - - @property - def config_vars(self): - """Return a set of variable definitions associated with a Python installation. - - Wrapper around various ``sysconfig`` functions. To see these variables on the - command line, run: - - .. code-block:: console - - $ python -m sysconfig - - Returns: - dict: variable definitions - """ - cmd = """ -import json -from sysconfig import ( - get_config_vars, - get_config_h_filename, - get_makefile_filename, - get_paths, -) - -config = get_config_vars() -config['config_h_filename'] = get_config_h_filename() -config['makefile_filename'] = get_makefile_filename() -config.update(get_paths()) - -%s -""" % self.print_string( - "json.dumps(config)" - ) - - dag_hash = self.spec.dag_hash() - lib_prefix = "lib" if not is_windows else "" - if dag_hash not in self._config_vars: - # Default config vars - version = self.version.up_to(2) - if is_windows: - version = str(version).split(".")[0] - config = { - # get_config_vars - "BINDIR": self.prefix.bin, - "CC": "cc", - "CONFINCLUDEPY": self.prefix.include.join("python{}").format(version), - "CXX": "c++", - "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", - "LDCXXSHARED": "c++", - "PYTHONFRAMEWORKPREFIX": "/System/Library/Frameworks", - "base": self.prefix, - "installed_base": self.prefix, - "installed_platbase": self.prefix, - "platbase": self.prefix, - "prefix": self.prefix, - # get_config_h_filename - "config_h_filename": self.prefix.include.join("python{}") - .join("pyconfig.h") - .format(version), - # get_makefile_filename - "makefile_filename": self.prefix.lib.join("python{0}") - .join("config-{0}-{1}") - .Makefile.format(version, sys.platform), - # get_paths - "data": self.prefix, - "include": self.prefix.include.join("python{}".format(version)), - "platinclude": self.prefix.include64.join("python{}".format(version)), - "platlib": self.prefix.lib64.join("python{}".format(version)).join( - "site-packages" - ), - "platstdlib": self.prefix.lib64.join("python{}".format(version)), - "purelib": self.prefix.lib.join("python{}".format(version)).join("site-packages"), - "scripts": self.prefix.bin, - "stdlib": self.prefix.lib.join("python{}".format(version)), - } - - try: - config.update(json.loads(self.command("-c", cmd, output=str))) - except (ProcessError, RuntimeError): - pass - self._config_vars[dag_hash] = config - return self._config_vars[dag_hash] - - def get_sysconfigdata_name(self): - """Return the full path name of the sysconfigdata file.""" - - libdest = self.config_vars["LIBDEST"] - - filename = "_sysconfigdata.py" - if self.spec.satisfies("@3.6:"): - # Python 3.6.0 renamed the sys config file - cmd = "from sysconfig import _get_sysconfigdata_name; " - cmd += self.print_string("_get_sysconfigdata_name()") - filename = self.command("-c", cmd, output=str).strip() - filename += ".py" - - return join_path(libdest, filename) - - @property - def home(self): - """Most of the time, ``PYTHONHOME`` is simply - ``spec['python'].prefix``. However, if the user is using an - externally installed python, it may be symlinked. For example, - Homebrew installs python in ``/usr/local/Cellar/python/2.7.12_2`` - and symlinks it to ``/usr/local``. Users may not know the actual - installation directory and add ``/usr/local`` to their - ``packages.yaml`` unknowingly. Query the python executable to - determine exactly where it is installed. - """ - return Prefix(self.config_vars["base"]) - - def find_library(self, library): - # Spack installs libraries into lib, except on openSUSE where it installs them - # into lib64. If the user is using an externally installed package, it may be - # in either lib or lib64, so we need to ask Python where its LIBDIR is. - libdir = self.config_vars["LIBDIR"] - - # In Ubuntu 16.04.6 and python 2.7.12 from the system, lib could be in LBPL - # https://mail.python.org/pipermail/python-dev/2013-April/125733.html - libpl = self.config_vars["LIBPL"] - - # The system Python installation on macOS and Homebrew installations - # install libraries into a Frameworks directory - frameworkprefix = self.config_vars["PYTHONFRAMEWORKPREFIX"] - - # Get the active Xcode environment's Framework location. - macos_developerdir = os.environ.get("DEVELOPER_DIR") - if macos_developerdir and os.path.exists(macos_developerdir): - macos_developerdir = os.path.join(macos_developerdir, "Library", "Frameworks") - else: - macos_developerdir = "" - - # Windows libraries are installed directly to BINDIR - win_bin_dir = self.config_vars["BINDIR"] - win_root_dir = self.config_vars["prefix"] - - directories = [ - libdir, - libpl, - 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"]: - directories.append(os.path.join(self.config_vars["base"], subdir)) - - directories = dedupe(directories) - for directory in directories: - path = os.path.join(directory, library) - if os.path.exists(path): - return LibraryList(path) - - @property - def libs(self): - py_version = self.version.up_to(2) - if is_windows: - py_version = str(py_version).replace(".", "") - lib_prefix = "lib" if not is_windows else "" - # The values of LDLIBRARY and LIBRARY aren't reliable. Intel Python uses a - # static binary but installs shared libraries, so sysconfig reports - # libpythonX.Y.a but only libpythonX.Y.so exists. So we add our own paths, too. - shared_libs = [ - self.config_vars["LDLIBRARY"], - "{}python{}.{}".format(lib_prefix, py_version, dso_suffix), - ] - static_libs = [ - self.config_vars["LIBRARY"], - "{}python{}.{}".format(lib_prefix, py_version, stat_suffix), - ] - - # The +shared variant isn't reliable, as `spack external find` currently can't - # detect it. If +shared, prefer the shared libraries, but check for static if - # those aren't found. Vice versa for ~shared. - if "+shared" in self.spec: - candidates = shared_libs + static_libs - else: - candidates = static_libs + shared_libs - - candidates = dedupe(candidates) - - for candidate in candidates: - lib = self.find_library(candidate) - if lib: - return lib - - raise spack.error.NoLibrariesError( - "Unable to find {} libraries with the following names:".format(self.name), - "\n".join(candidates), - ) - - @property - def headers(self): - # Locations where pyconfig.h could be - # This varies by system, especially on macOS where the command line tools are - # installed in a very different directory from the system python interpreter. - py_version = str(self.version.up_to(2)) - candidates = [ - os.path.dirname(self.config_vars["config_h_filename"]), - self.config_vars["INCLUDEPY"], - self.config_vars["CONFINCLUDEPY"], - os.path.join(self.config_vars["base"], "include", py_version), - os.path.join(self.config_vars["base"], "Headers"), - ] - candidates = list(dedupe(candidates)) - - for directory in candidates: - headers = find_headers("pyconfig", directory) - if headers: - config_h = headers[0] - break - else: - raise spack.error.NoHeadersError( - "Unable to locate {} headers in any of these locations:".format(self.name), - "\n".join(candidates), - ) - - headers.directories = [os.path.dirname(config_h)] - return headers - - # https://docs.python.org/3/library/sysconfig.html#installation-paths - # https://discuss.python.org/t/understanding-site-packages-directories/12959 - # https://github.com/pypa/pip/blob/22.1/src/pip/_internal/locations/__init__.py - # https://github.com/pypa/installer/pull/103 - - # NOTE: XCode Python's sysconfing module was incorrectly patched, and hard-codes - # everything to be installed in /Library/Python. Therefore, we need to use a - # fallback in the following methods. For more information, see: - # https://github.com/pypa/pip/blob/22.1/src/pip/_internal/locations/__init__.py#L486 - - @property - def platlib(self): - """Directory for site-specific, platform-specific files. - - Exact directory depends on platform/OS/Python version. Examples include: - - * ``lib/pythonX.Y/site-packages`` on most POSIX systems - * ``lib64/pythonX.Y/site-packages`` on RHEL/CentOS/Fedora with system Python - * ``lib/pythonX/dist-packages`` on Debian/Ubuntu with system Python - * ``lib/python/site-packages`` on macOS with framework Python - * ``Lib/site-packages`` on Windows - - Returns: - str: platform-specific site-packages directory - """ - prefix = self.config_vars["platbase"] + os.sep - path = self.config_vars["platlib"] - if path.startswith(prefix): - return path.replace(prefix, "") - return os.path.join("lib64", "python{}".format(self.version.up_to(2)), "site-packages") - - @property - def purelib(self): - """Directory for site-specific, non-platform-specific files. - - Exact directory depends on platform/OS/Python version. Examples include: - - * ``lib/pythonX.Y/site-packages`` on most POSIX systems - * ``lib/pythonX/dist-packages`` on Debian/Ubuntu with system Python - * ``lib/python/site-packages`` on macOS with framework Python - * ``Lib/site-packages`` on Windows - - Returns: - str: platform-independent site-packages directory - """ - prefix = self.config_vars["base"] + os.sep - path = self.config_vars["purelib"] - if path.startswith(prefix): - return path.replace(prefix, "") - return os.path.join("lib", "python{}".format(self.version.up_to(2)), "site-packages") - - @property - def include(self): - """Directory for non-platform-specific header files. - - Exact directory depends on platform/Python version/ABI flags. Examples include: - - * ``include/pythonX.Y`` on most POSIX systems - * ``include/pythonX.Yd`` for debug builds - * ``include/pythonX.Ym`` for malloc builds - * ``include/pythonX.Yu`` for wide unicode builds - * ``include`` on macOS with framework Python - * ``Include`` on Windows - - Returns: - str: platform-independent header file directory - """ - prefix = self.config_vars["installed_base"] + os.sep - path = self.config_vars["include"] - if path.startswith(prefix): - return path.replace(prefix, "") - return os.path.join("include", "python{}".format(self.version.up_to(2))) - - @property - def easy_install_file(self): - return join_path(self.purelib, "easy-install.pth") - - def setup_run_environment(self, env): - env.prepend_path("CPATH", os.pathsep.join(self.spec["python"].headers.directories)) - - def setup_dependent_build_environment(self, env, dependent_spec): - """Set PYTHONPATH to include the site-packages directory for the - extension and any other python extensions it depends on. - """ - # If we set PYTHONHOME, we must also ensure that the corresponding - # python is found in the build environment. This to prevent cases - # where a system provided python is run against the standard libraries - # of a Spack built python. See issue #7128 - env.set("PYTHONHOME", self.home) - - path = os.path.dirname(self.command.path) - if not is_system_path(path): - env.prepend_path("PATH", path) - - # Add installation prefix to PYTHONPATH, needed to run import tests - prefixes = set() - if dependent_spec.package.extends(self.spec): - prefixes.add(dependent_spec.prefix) - - # Add direct build/run/test dependencies to PYTHONPATH, - # needed to build the package and to run import tests - for direct_dep in dependent_spec.dependencies(deptype=("build", "run", "test")): - if direct_dep.package.extends(self.spec): - prefixes.add(direct_dep.prefix) - - # Add recursive run dependencies of all direct dependencies, - # needed by direct dependencies at run-time - for indirect_dep in direct_dep.traverse(deptype="run"): - if indirect_dep.package.extends(self.spec): - prefixes.add(indirect_dep.prefix) - - for prefix in prefixes: - # Packages may be installed in platform-specific or platform-independent - # site-packages directories - for directory in {self.platlib, self.purelib}: - env.prepend_path("PYTHONPATH", os.path.join(prefix, directory)) - - # We need to make sure that the extensions are compiled and linked with - # the Spack wrapper. Paths to the executables that are used for these - # operations are normally taken from the sysconfigdata file, which we - # modify after the installation (see method filter compilers). The - # modified file contains paths to the real compilers, not the wrappers. - # The values in the file, however, can be overridden with environment - # variables. The first variable, CC (CXX), which is used for - # compilation, is set by Spack for the dependent package by default. - # That is not 100% correct because the value for CC (CXX) in the - # sysconfigdata file often contains additional compiler flags (e.g. - # -pthread), which we lose by simply setting CC (CXX) to the path to the - # Spack wrapper. Moreover, the user might try to build an extension with - # a compiler that is different from the one that was used to build - # Python itself, which might have unexpected side effects. However, the - # experience shows that none of the above is a real issue and we will - # not try to change the default behaviour. Given that, we will simply - # try to modify LDSHARED (LDCXXSHARED), the second variable, which is - # used for linking, in a consistent manner. - - for compile_var, link_var in [("CC", "LDSHARED"), ("CXX", "LDCXXSHARED")]: - # First, we get the values from the sysconfigdata: - config_compile = self.config_vars[compile_var] - config_link = self.config_vars[link_var] - - # The dependent environment will have the compilation command set to - # the following: - new_compile = join_path( - spack.paths.build_env_path, - dependent_spec.package.compiler.link_paths[compile_var.lower()], - ) - - # Normally, the link command starts with the compilation command: - if config_link.startswith(config_compile): - new_link = new_compile + config_link[len(config_compile) :] - else: - # Otherwise, we try to replace the compiler command if it - # appears "in the middle" of the link command; to avoid - # mistaking some substring of a path for the compiler (e.g. to - # avoid replacing "gcc" in "-L/path/to/gcc/"), we require that - # the compiler command be surrounded by spaces. Note this may - # leave "config_link" unchanged if the compilation command does - # not appear in the link command at all, for example if "ld" is - # invoked directly (no change would be required in that case - # because Spack arranges for the Spack ld wrapper to be the - # first instance of "ld" in PATH). - new_link = config_link.replace( - " {0} ".format(config_compile), " {0} ".format(new_compile) - ) - - # There is logic in the sysconfig module that is sensitive to the - # fact that LDSHARED is set in the environment, therefore we export - # the variable only if the new value is different from what we got - # from the sysconfigdata file: - if config_link != new_link and not is_windows: - env.set(link_var, new_link) - - def setup_dependent_run_environment(self, env, dependent_spec): - """Set PYTHONPATH to include the site-packages directory for the - extension and any other python extensions it depends on. - """ - for d in dependent_spec.traverse(deptype=("run"), root=True): - if d.package.extends(self.spec): - # Packages may be installed in platform-specific or platform-independent - # site-packages directories - for directory in {self.platlib, self.purelib}: - env.prepend_path("PYTHONPATH", os.path.join(d.prefix, directory)) - - def setup_dependent_package(self, module, dependent_spec): - """Called before python modules' install() methods.""" - - module.python = self.command - - module.python_include = join_path(dependent_spec.prefix, self.include) - module.python_platlib = join_path(dependent_spec.prefix, self.platlib) - module.python_purelib = join_path(dependent_spec.prefix, self.purelib) - - # Make the site packages directory for extensions - if dependent_spec.package.is_extension: - mkdirp(module.python_platlib) - mkdirp(module.python_purelib) - - # ======================================================================== - # Handle specifics of activating and deactivating python modules. - # ======================================================================== - - def python_ignore(self, ext_pkg, args): - """Add some ignore files to activate/deactivate args.""" - ignore_arg = args.get("ignore", lambda f: False) - - # Always ignore easy-install.pth, as it needs to be merged. - patterns = [r"(site|dist)-packages/easy-install\.pth$"] - - # Ignore pieces of setuptools installed by other packages. - # Must include directory name or it will remove all site*.py files. - if ext_pkg.name != "py-setuptools": - patterns.extend( - [ - r"bin/easy_install[^/]*$", - r"(site|dist)-packages/setuptools[^/]*\.egg$", - r"(site|dist)-packages/setuptools\.pth$", - r"(site|dist)-packages/site[^/]*\.pyc?$", - r"(site|dist)-packages/__pycache__/site[^/]*\.pyc?$", - ] - ) - if ext_pkg.name != "py-pygments": - patterns.append(r"bin/pygmentize$") - if ext_pkg.name != "py-numpy": - patterns.append(r"bin/f2py[0-9.]*$") - - return match_predicate(ignore_arg, patterns) - - def write_easy_install_pth(self, exts, prefix=None): - if not prefix: - prefix = self.prefix - - paths = [] - unique_paths = set() - - for ext in sorted(exts.values()): - easy_pth = join_path(ext.prefix, self.easy_install_file) - - if not os.path.isfile(easy_pth): - continue - - with open(easy_pth) as f: - for line in f: - line = line.rstrip() - - # Skip lines matching these criteria - if not line: - continue - if re.search(r"^(import|#)", line): - continue - if ext.name != "py-setuptools" and re.search(r"setuptools.*egg$", line): - continue - - if line not in unique_paths: - unique_paths.add(line) - paths.append(line) - - main_pth = join_path(prefix, self.easy_install_file) - - if not paths: - if os.path.isfile(main_pth): - os.remove(main_pth) - - else: - with open(main_pth, "w") as f: - f.write("import sys; sys.__plen = len(sys.path)\n") - for path in paths: - f.write("{0}\n".format(path)) - f.write( - "import sys; new=sys.path[sys.__plen:]; " - "del sys.path[sys.__plen:]; " - "p=getattr(sys,'__egginsert',0); " - "sys.path[p:p]=new; " - "sys.__egginsert = p+len(new)\n" - ) - - def activate(self, ext_pkg, view, **args): - ignore = self.python_ignore(ext_pkg, args) - args.update(ignore=ignore) - - super(Python, self).activate(ext_pkg, view, **args) - - extensions_layout = view.extensions_layout - exts = extensions_layout.extension_map(self.spec) - exts[ext_pkg.name] = ext_pkg.spec - - self.write_easy_install_pth(exts, prefix=view.get_projection_for_spec(self.spec)) - - def deactivate(self, ext_pkg, view, **args): - args.update(ignore=self.python_ignore(ext_pkg, args)) - - super(Python, self).deactivate(ext_pkg, view, **args) - - extensions_layout = view.extensions_layout - exts = extensions_layout.extension_map(self.spec) - # Make deactivate idempotent - if ext_pkg.name in exts: - del exts[ext_pkg.name] - self.write_easy_install_pth(exts, prefix=view.get_projection_for_spec(self.spec)) - - def add_files_to_view(self, view, merge_map, skip_if_exists=True): - bin_dir = self.spec.prefix.bin if sys.platform != "win32" else self.spec.prefix - for src, dst in merge_map.items(): - if not path_contains_subdirectory(src, bin_dir): - view.link(src, dst, spec=self.spec) - elif not os.path.islink(src): - copy(src, dst) - if is_nonsymlink_exe_with_shebang(src): - filter_file( - self.spec.prefix, - os.path.abspath(view.get_projection_for_spec(self.spec)), - dst, - backup=False, - ) - else: - # orig_link_target = os.path.realpath(src) is insufficient when - # the spack install tree is located at a symlink or a - # descendent of a symlink. What we need here is the real - # relative path from the python prefix to src - # TODO: generalize this logic in the link_tree object - # add a method to resolve a link relative to the link_tree - # object root. - realpath_src = os.path.realpath(src) - realpath_prefix = os.path.realpath(self.spec.prefix) - realpath_rel = os.path.relpath(realpath_src, realpath_prefix) - orig_link_target = os.path.join(self.spec.prefix, realpath_rel) - - new_link_target = os.path.abspath(merge_map[orig_link_target]) - view.link(new_link_target, dst, spec=self.spec) - - def remove_files_from_view(self, view, merge_map): - bin_dir = self.spec.prefix.bin if not is_windows else self.spec.prefix - for src, dst in merge_map.items(): - if not path_contains_subdirectory(src, bin_dir): - view.remove_file(src, dst) - else: - os.remove(dst) - - def test(self): - # do not use self.command because we are also testing the run env - exe = self.spec["python"].command.name - - # test hello world - msg = "hello world!" - reason = "test: running {0}".format(msg) - options = ["-c", 'print("{0}")'.format(msg)] - self.run_test(exe, options=options, expected=[msg], installed=True, purpose=reason) - - # checks import works and executable comes from the spec prefix - reason = "test: checking import and executable" - print_str = self.print_string("sys.executable") - options = ["-c", "import sys; {0}".format(print_str)] - self.run_test( - exe, options=options, expected=[self.spec.prefix], installed=True, purpose=reason - ) diff --git a/scripts/uberenv_configs/packages/python/python-2.7.17+-distutils-C++-fixup.patch b/scripts/uberenv_configs/packages/python/python-2.7.17+-distutils-C++-fixup.patch deleted file mode 100644 index a3c179b6a..000000000 --- a/scripts/uberenv_configs/packages/python/python-2.7.17+-distutils-C++-fixup.patch +++ /dev/null @@ -1,120 +0,0 @@ -This patch fixes a regression intoduced by python-2.7.17+-distutils-C++.patch -and updates the distutils testsuite to pass with 2.7.16:2.7.18: - -This how the test suite would have to change when the bug is not fixed: - - self.assertEqual(comp.exes['compiler'], -- 'env_cc --sc-cflags --env-cflags --env-cppflags') -+ 'env_cc --env-cflags --env-cppflags') - self.assertEqual(comp.exes['compiler_so'], -- ('env_cc --sc-cflags ' -+ ('env_cc ' - '--env-cflags ''--env-cppflags --sc-ccshared')) - self.assertEqual(comp.exes['compiler'], -- 'sc_cc --sc-cflags') -+ 'sc_cc ') - self.assertEqual(comp.exes['compiler_so'], -- 'sc_cc --sc-cflags --sc-ccshared') -+ 'sc_cc --sc-ccshared') - self.assertEqual(comp.exes['compiler_cxx'], -- 'sc_cxx') -+ 'sc_cxx ') - -As shown, it removes the default, builtin cflags when calling the pure -C compiler CC, which is wrong, introducing a regression. - -The cause is that the patch removes reading the python distutils cflags -value and sets both empty. - -- (cc, cxx, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ -- get_config_vars('CC', 'CXX', 'CFLAGS', -- 'CCSHARED', 'LDSHARED', 'SO', 'AR', -- 'ARFLAGS') -+ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \ -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'SO', 'AR', 'ARFLAGS') -+ cflags = '' -+ cxxflags = '' - -The fix is obvious when comparing it with python-3.7.4+-distutils-C++.patch - -- (cc, cxx, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ -- get_config_vars('CC', 'CXX', 'CFLAGS', -- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') -+ (cc, cxx, cflags, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \ -+ get_config_vars('CC', 'CXX', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') -+ -+ cxxflags = cflags - -When handling CFLAGS the same as in python-3.7.4+-distutils-C++.patch, -the issue is fixed. - ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -181,12 +181,11 @@ - _osx_support.customize_compiler(_config_vars) - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' - -- (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \ -- get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', -+ (cc, cxx, cflags, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \ -+ get_config_vars('CC', 'CXX', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', - 'SO', 'AR', 'ARFLAGS') - -- cflags = '' -- cxxflags = '' -+ cxxflags = cflags - - if 'CC' in os.environ: - newcc = os.environ['CC'] ---- a/Lib/distutils/tests/test_sysconfig.py -+++ b/Lib/distutils/tests/test_sysconfig.py -@@ -65,6 +65,7 @@ - 'CXX': 'sc_cxx', - 'ARFLAGS': '--sc-arflags', - 'CFLAGS': '--sc-cflags', -+ 'CPPFLAGS': '--sc-cppflags', - 'CCSHARED': '--sc-ccshared', - 'LDSHARED': 'sc_ldshared', - 'SO': 'sc_shutil_suffix', -@@ -94,11 +95,12 @@ - os.environ['AR'] = 'env_ar' - os.environ['CC'] = 'env_cc' - os.environ['CPP'] = 'env_cpp' -- os.environ['CXX'] = 'env_cxx --env-cxx-flags' -+ os.environ['CXX'] = 'env_cxx' - os.environ['LDSHARED'] = 'env_ldshared' - os.environ['LDFLAGS'] = '--env-ldflags' - os.environ['ARFLAGS'] = '--env-arflags' - os.environ['CFLAGS'] = '--env-cflags' -+ os.environ['CXXFLAGS'] = '--env-cxxflags' - os.environ['CPPFLAGS'] = '--env-cppflags' - - comp = self.customize_compiler() -@@ -112,7 +114,7 @@ - ('env_cc --sc-cflags ' - '--env-cflags ''--env-cppflags --sc-ccshared')) - self.assertEqual(comp.exes['compiler_cxx'], -- 'env_cxx --env-cxx-flags') -+ 'env_cxx --sc-cflags --env-cxxflags --env-cppflags') - self.assertEqual(comp.exes['linker_exe'], - 'env_cc') - self.assertEqual(comp.exes['linker_so'], -@@ -128,6 +130,7 @@ - del os.environ['LDFLAGS'] - del os.environ['ARFLAGS'] - del os.environ['CFLAGS'] -+ del os.environ['CXXFLAGS'] - del os.environ['CPPFLAGS'] - - comp = self.customize_compiler() -@@ -140,7 +143,7 @@ - self.assertEqual(comp.exes['compiler_so'], - 'sc_cc --sc-cflags --sc-ccshared') - self.assertEqual(comp.exes['compiler_cxx'], -- 'sc_cxx') -+ 'sc_cxx --sc-cflags') - self.assertEqual(comp.exes['linker_exe'], - 'sc_cc') - self.assertEqual(comp.exes['linker_so'], diff --git a/scripts/uberenv_configs/packages/python/python-2.7.17+-distutils-C++.patch b/scripts/uberenv_configs/packages/python/python-2.7.17+-distutils-C++.patch deleted file mode 100644 index 1d2249fcf..000000000 --- a/scripts/uberenv_configs/packages/python/python-2.7.17+-distutils-C++.patch +++ /dev/null @@ -1,269 +0,0 @@ -diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py -index d2aaae7..8bcdb05 100644 ---- a/Lib/_osx_support.py -+++ b/Lib/_osx_support.py -@@ -14,13 +14,13 @@ __all__ = [ - # configuration variables that may contain universal build flags, - # like "-arch" or "-isdkroot", that may need customization for - # the user environment --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', -- 'PY_CORE_CFLAGS') -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', -+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS') - - # configuration variables that may contain compiler calls --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') - - # prefix added to original configuration variable names - _INITPRE = '_OSX_SUPPORT_INITIAL_' -diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py -index 258e138..13b7d0c 100644 ---- a/Lib/distutils/cygwinccompiler.py -+++ b/Lib/distutils/cygwinccompiler.py -@@ -117,8 +117,10 @@ class CygwinCCompiler (UnixCCompiler): - # dllwrap 2.10.90 is buggy - if self.ld_version >= "2.10.90": - self.linker_dll = "gcc" -+ self.linker_dll_cxx = "g++" - else: - self.linker_dll = "dllwrap" -+ self.linker_dll_cxx = "dllwrap" - - # ld_version >= "2.13" support -shared so use it instead of - # -mdll -static -@@ -132,9 +134,13 @@ class CygwinCCompiler (UnixCCompiler): - self.set_executables(compiler='gcc -mcygwin -O -Wall', - compiler_so='gcc -mcygwin -mdll -O -Wall', - compiler_cxx='g++ -mcygwin -O -Wall', -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', - linker_exe='gcc -mcygwin', - linker_so=('%s -mcygwin %s' % -- (self.linker_dll, shared_option))) -+ (self.linker_dll, shared_option)), -+ linker_exe_cxx='g++ -mcygwin', -+ linker_so_cxx=('%s -mcygwin %s' % -+ (self.linker_dll_cxx, shared_option))) - - # cygwin and mingw32 need different sets of libraries - if self.gcc_version == "2.91.57": -@@ -160,8 +166,12 @@ class CygwinCCompiler (UnixCCompiler): - raise CompileError, msg - else: # for other files use the C-compiler - try: -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg - -@@ -327,9 +337,14 @@ class Mingw32CCompiler (CygwinCCompiler): - self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin, - compiler_so='gcc%s -mdll -O -Wall' % no_cygwin, - compiler_cxx='g++%s -O -Wall' % no_cygwin, -+ compiler_so_cxx='g++%s -mdll -O -Wall' % no_cygwin, - linker_exe='gcc%s' % no_cygwin, - linker_so='%s%s %s %s' - % (self.linker_dll, no_cygwin, -+ shared_option, entry_point), -+ linker_exe_cxx='g++%s' % no_cygwin, -+ linker_so_cxx='%s%s %s %s' -+ % (self.linker_dll_cxx, no_cygwin, - shared_option, entry_point)) - # Maybe we should also append -mthreads, but then the finished - # dlls need another dll (mingwm10.dll see Mingw32 docs) -diff --git a/Lib/distutils/emxccompiler.py b/Lib/distutils/emxccompiler.py -index a017205..bdc532c 100644 ---- a/Lib/distutils/emxccompiler.py -+++ b/Lib/distutils/emxccompiler.py -@@ -65,8 +65,12 @@ class EMXCCompiler (UnixCCompiler): - # XXX optimization, warnings etc. should be customizable. - self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', - compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', -+ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', -+ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', - linker_exe='gcc -Zomf -Zmt -Zcrtdll', -- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll') -+ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll', -+ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll', -+ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll') - - # want the gcc library statically linked (so that we don't have - # to distribute a version dependent on the compiler we have) -@@ -83,8 +87,12 @@ class EMXCCompiler (UnixCCompiler): - raise CompileError, msg - else: # for other files use the C-compiler - try: -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg - -diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 1a4b792..9d724b2 100644 ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -181,10 +181,12 @@ def customize_compiler(compiler): - _osx_support.customize_compiler(_config_vars) - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' - -- (cc, cxx, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ -- get_config_vars('CC', 'CXX', 'CFLAGS', -- 'CCSHARED', 'LDSHARED', 'SO', 'AR', -- 'ARFLAGS') -+ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \ -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'SO', 'AR', 'ARFLAGS') -+ -+ cflags = '' -+ cxxflags = '' - - if 'CC' in os.environ: - newcc = os.environ['CC'] -@@ -199,19 +201,27 @@ def customize_compiler(compiler): - cxx = os.environ['CXX'] - if 'LDSHARED' in os.environ: - ldshared = os.environ['LDSHARED'] -+ if 'LDCXXSHARED' in os.environ: -+ ldcxxshared = os.environ['LDCXXSHARED'] - if 'CPP' in os.environ: - cpp = os.environ['CPP'] - else: - cpp = cc + " -E" # not always - if 'LDFLAGS' in os.environ: - ldshared = ldshared + ' ' + os.environ['LDFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] - if 'CFLAGS' in os.environ: - cflags = cflags + ' ' + os.environ['CFLAGS'] - ldshared = ldshared + ' ' + os.environ['CFLAGS'] -+ if 'CXXFLAGS' in os.environ: -+ cxxflags = cxxflags + ' ' + os.environ['CXXFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] - if 'CPPFLAGS' in os.environ: - cpp = cpp + ' ' + os.environ['CPPFLAGS'] - cflags = cflags + ' ' + os.environ['CPPFLAGS'] -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] - ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] - if 'AR' in os.environ: - ar = os.environ['AR'] - if 'ARFLAGS' in os.environ: -@@ -220,13 +230,17 @@ def customize_compiler(compiler): - archiver = ar + ' ' + ar_flags - - cc_cmd = cc + ' ' + cflags -+ cxx_cmd = cxx + ' ' + cxxflags - compiler.set_executables( - preprocessor=cpp, - compiler=cc_cmd, - compiler_so=cc_cmd + ' ' + ccshared, -- compiler_cxx=cxx, -+ compiler_cxx=cxx_cmd, -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared, - linker_so=ldshared, - linker_exe=cc, -+ linker_so_cxx=ldcxxshared, -+ linker_exe_cxx=cxx, - archiver=archiver) - - compiler.shared_lib_extension = so_ext -diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py -index 3af540e..f8f7efe 100644 ---- a/Lib/distutils/unixccompiler.py -+++ b/Lib/distutils/unixccompiler.py -@@ -55,14 +55,17 @@ class UnixCCompiler(CCompiler): - # are pretty generic; they will probably have to be set by an outsider - # (eg. using information discovered by the sysconfig about building - # Python extensions). -- executables = {'preprocessor' : None, -- 'compiler' : ["cc"], -- 'compiler_so' : ["cc"], -- 'compiler_cxx' : ["cc"], -- 'linker_so' : ["cc", "-shared"], -- 'linker_exe' : ["cc"], -- 'archiver' : ["ar", "-cr"], -- 'ranlib' : None, -+ executables = {'preprocessor' : None, -+ 'compiler' : ["cc"], -+ 'compiler_so' : ["cc"], -+ 'compiler_cxx' : ["c++"], -+ 'compiler_so_cxx' : ["c++"], -+ 'linker_so' : ["cc", "-shared"], -+ 'linker_exe' : ["cc"], -+ 'linker_so_cxx' : ["c++", "-shared"], -+ 'linker_exe_cxx' : ["c++"], -+ 'archiver' : ["ar", "-cr"], -+ 'ranlib' : None, - } - - if sys.platform[:6] == "darwin": -@@ -114,12 +117,19 @@ class UnixCCompiler(CCompiler): - - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): - compiler_so = self.compiler_so -+ compiler_so_cxx = self.compiler_so_cxx - if sys.platform == 'darwin': - compiler_so = _osx_support.compiler_fixup(compiler_so, - cc_args + extra_postargs) -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, -+ cc_args + extra_postargs) - try: -- self.spawn(compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg - -@@ -176,23 +186,16 @@ class UnixCCompiler(CCompiler): - ld_args.extend(extra_postargs) - self.mkpath(os.path.dirname(output_filename)) - try: -- if target_desc == CCompiler.EXECUTABLE: -- linker = self.linker_exe[:] -+ if target_lang == "c++": -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe_cxx[:] -+ else: -+ linker = self.linker_so_cxx[:] - else: -- linker = self.linker_so[:] -- if target_lang == "c++" and self.compiler_cxx: -- # skip over environment variable settings if /usr/bin/env -- # is used to set up the linker's environment. -- # This is needed on OSX. Note: this assumes that the -- # normal and C++ compiler have the same environment -- # settings. -- i = 0 -- if os.path.basename(linker[0]) == "env": -- i = 1 -- while '=' in linker[i]: -- i = i + 1 -- -- linker[i] = self.compiler_cxx[i] -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe[:] -+ else: -+ linker = self.linker_so[:] - - if sys.platform == 'darwin': - linker = _osx_support.compiler_fixup(linker, ld_args) diff --git a/scripts/uberenv_configs/packages/python/python-2.7.8-distutils-C++.patch b/scripts/uberenv_configs/packages/python/python-2.7.8-distutils-C++.patch deleted file mode 100644 index d6710066d..000000000 --- a/scripts/uberenv_configs/packages/python/python-2.7.8-distutils-C++.patch +++ /dev/null @@ -1,260 +0,0 @@ ---- a/Lib/distutils/cygwinccompiler.py -+++ b/Lib/distutils/cygwinccompiler.py -@@ -117,8 +117,10 @@ - # dllwrap 2.10.90 is buggy - if self.ld_version >= "2.10.90": - self.linker_dll = "gcc" -+ self.linker_dll_cxx = "g++" - else: - self.linker_dll = "dllwrap" -+ self.linker_dll_cxx = "dllwrap" - - # ld_version >= "2.13" support -shared so use it instead of - # -mdll -static -@@ -132,9 +134,13 @@ - self.set_executables(compiler='gcc -mcygwin -O -Wall', - compiler_so='gcc -mcygwin -mdll -O -Wall', - compiler_cxx='g++ -mcygwin -O -Wall', -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', - linker_exe='gcc -mcygwin', - linker_so=('%s -mcygwin %s' % -- (self.linker_dll, shared_option))) -+ (self.linker_dll, shared_option)), -+ linker_exe_cxx='g++ -mcygwin', -+ linker_so_cxx=('%s -mcygwin %s' % -+ (self.linker_dll_cxx, shared_option))) - - # cygwin and mingw32 need different sets of libraries - if self.gcc_version == "2.91.57": -@@ -160,8 +166,12 @@ - raise CompileError, msg - else: # for other files use the C-compiler - try: -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg - -@@ -327,9 +337,14 @@ - self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin, - compiler_so='gcc%s -mdll -O -Wall' % no_cygwin, - compiler_cxx='g++%s -O -Wall' % no_cygwin, -+ compiler_so_cxx='g++%s -mdll -O -Wall' % no_cygwin, - linker_exe='gcc%s' % no_cygwin, - linker_so='%s%s %s %s' - % (self.linker_dll, no_cygwin, -+ shared_option, entry_point), -+ linker_exe_cxx='g++%s' % no_cygwin, -+ linker_so_cxx='%s%s %s %s' -+ % (self.linker_dll_cxx, no_cygwin, - shared_option, entry_point)) - # Maybe we should also append -mthreads, but then the finished - # dlls need another dll (mingwm10.dll see Mingw32 docs) ---- a/Lib/distutils/emxccompiler.py -+++ b/Lib/distutils/emxccompiler.py -@@ -65,8 +65,12 @@ - # XXX optimization, warnings etc. should be customizable. - self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', - compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', -+ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', -+ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall', - linker_exe='gcc -Zomf -Zmt -Zcrtdll', -- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll') -+ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll', -+ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll', -+ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll') - - # want the gcc library statically linked (so that we don't have - # to distribute a version dependent on the compiler we have) -@@ -83,8 +87,12 @@ - raise CompileError, msg - else: # for other files use the C-compiler - try: -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg - ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -170,10 +170,12 @@ - _osx_support.customize_compiler(_config_vars) - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' - -- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', -- 'CCSHARED', 'LDSHARED', 'SO', 'AR', -- 'ARFLAGS') -+ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \ -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'SO', 'AR', 'ARFLAGS') -+ -+ cflags = '' -+ cxxflags = '' - - if 'CC' in os.environ: - newcc = os.environ['CC'] -@@ -188,19 +190,27 @@ - cxx = os.environ['CXX'] - if 'LDSHARED' in os.environ: - ldshared = os.environ['LDSHARED'] -+ if 'LDCXXSHARED' in os.environ: -+ ldcxxshared = os.environ['LDCXXSHARED'] - if 'CPP' in os.environ: - cpp = os.environ['CPP'] - else: - cpp = cc + " -E" # not always - if 'LDFLAGS' in os.environ: - ldshared = ldshared + ' ' + os.environ['LDFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] - if 'CFLAGS' in os.environ: -- cflags = opt + ' ' + os.environ['CFLAGS'] -+ cflags = os.environ['CFLAGS'] - ldshared = ldshared + ' ' + os.environ['CFLAGS'] -+ if 'CXXFLAGS' in os.environ: -+ cxxflags = os.environ['CXXFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] - if 'CPPFLAGS' in os.environ: - cpp = cpp + ' ' + os.environ['CPPFLAGS'] - cflags = cflags + ' ' + os.environ['CPPFLAGS'] -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] - ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] - if 'AR' in os.environ: - ar = os.environ['AR'] - if 'ARFLAGS' in os.environ: -@@ -209,13 +219,17 @@ - archiver = ar + ' ' + ar_flags - - cc_cmd = cc + ' ' + cflags -+ cxx_cmd = cxx + ' ' + cxxflags - compiler.set_executables( - preprocessor=cpp, - compiler=cc_cmd, - compiler_so=cc_cmd + ' ' + ccshared, -- compiler_cxx=cxx, -+ compiler_cxx=cxx_cmd, -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared, - linker_so=ldshared, - linker_exe=cc, -+ linker_so_cxx=ldcxxshared, -+ linker_exe_cxx=cxx, - archiver=archiver) - - compiler.shared_lib_extension = so_ext ---- a/Lib/distutils/unixccompiler.py -+++ b/Lib/distutils/unixccompiler.py -@@ -55,14 +55,17 @@ - # are pretty generic; they will probably have to be set by an outsider - # (eg. using information discovered by the sysconfig about building - # Python extensions). -- executables = {'preprocessor' : None, -- 'compiler' : ["cc"], -- 'compiler_so' : ["cc"], -- 'compiler_cxx' : ["cc"], -- 'linker_so' : ["cc", "-shared"], -- 'linker_exe' : ["cc"], -- 'archiver' : ["ar", "-cr"], -- 'ranlib' : None, -+ executables = {'preprocessor' : None, -+ 'compiler' : ["cc"], -+ 'compiler_so' : ["cc"], -+ 'compiler_cxx' : ["c++"], -+ 'compiler_so_cxx' : ["c++"], -+ 'linker_so' : ["cc", "-shared"], -+ 'linker_exe' : ["cc"], -+ 'linker_so_cxx' : ["c++", "-shared"], -+ 'linker_exe_cxx' : ["c++"], -+ 'archiver' : ["ar", "-cr"], -+ 'ranlib' : None, - } - - if sys.platform[:6] == "darwin": -@@ -112,12 +115,19 @@ - - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): - compiler_so = self.compiler_so -+ compiler_so_cxx = self.compiler_so_cxx - if sys.platform == 'darwin': - compiler_so = _osx_support.compiler_fixup(compiler_so, - cc_args + extra_postargs) -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, -+ cc_args + extra_postargs) - try: -- self.spawn(compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError, msg: - raise CompileError, msg - -@@ -174,23 +184,16 @@ - ld_args.extend(extra_postargs) - self.mkpath(os.path.dirname(output_filename)) - try: -- if target_desc == CCompiler.EXECUTABLE: -- linker = self.linker_exe[:] -+ if target_lang == "c++": -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe_cxx[:] -+ else: -+ linker = self.linker_so_cxx[:] - else: -- linker = self.linker_so[:] -- if target_lang == "c++" and self.compiler_cxx: -- # skip over environment variable settings if /usr/bin/env -- # is used to set up the linker's environment. -- # This is needed on OSX. Note: this assumes that the -- # normal and C++ compiler have the same environment -- # settings. -- i = 0 -- if os.path.basename(linker[0]) == "env": -- i = 1 -- while '=' in linker[i]: -- i = i + 1 -- -- linker[i] = self.compiler_cxx[i] -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe[:] -+ else: -+ linker = self.linker_so[:] - - if sys.platform == 'darwin': - linker = _osx_support.compiler_fixup(linker, ld_args) ---- a/Lib/_osx_support.py -+++ b/Lib/_osx_support.py -@@ -14,13 +14,13 @@ - # configuration variables that may contain universal build flags, - # like "-arch" or "-isdkroot", that may need customization for - # the user environment --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', -- 'PY_CORE_CFLAGS') -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', -+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS') - - # configuration variables that may contain compiler calls --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') - - # prefix added to original configuration variable names - _INITPRE = '_OSX_SUPPORT_INITIAL_' diff --git a/scripts/uberenv_configs/packages/python/python-3.6.8-distutils-C++.patch b/scripts/uberenv_configs/packages/python/python-3.6.8-distutils-C++.patch deleted file mode 100644 index 5728fad6f..000000000 --- a/scripts/uberenv_configs/packages/python/python-3.6.8-distutils-C++.patch +++ /dev/null @@ -1,241 +0,0 @@ ---- a/Lib/_osx_support.py -+++ b/Lib/_osx_support.py -@@ -14,13 +14,13 @@ __all__ = [ - # configuration variables that may contain universal build flags, - # like "-arch" or "-isdkroot", that may need customization for - # the user environment --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', -- 'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS') -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', -+ 'PY_CPPFLAGS', 'PY_CORE_LDFLAGS', 'PY_CORE_CFLAGS') - - # configuration variables that may contain compiler calls --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') - - # prefix added to original configuration variable names - _INITPRE = '_OSX_SUPPORT_INITIAL_' ---- a/Lib/distutils/cygwinccompiler.py -+++ b/Lib/distutils/cygwinccompiler.py -@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler): - # dllwrap 2.10.90 is buggy - if self.ld_version >= "2.10.90": - self.linker_dll = "gcc" -+ self.linker_dll_cxx = "g++" - else: - self.linker_dll = "dllwrap" -+ self.linker_dll_cxx = "dllwrap" - - # ld_version >= "2.13" support -shared so use it instead of - # -mdll -static -@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler): - self.set_executables(compiler='gcc -mcygwin -O -Wall', - compiler_so='gcc -mcygwin -mdll -O -Wall', - compiler_cxx='g++ -mcygwin -O -Wall', -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', - linker_exe='gcc -mcygwin', - linker_so=('%s -mcygwin %s' % -- (self.linker_dll, shared_option))) -+ (self.linker_dll, shared_option)), -+ linker_exe_cxx='g++ -mcygwin', -+ linker_so_cxx=('%s -mcygwin %s' % -+ (self.linker_dll_cxx, shared_option))) - - # cygwin and mingw32 need different sets of libraries - if self.gcc_version == "2.91.57": -@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler): - raise CompileError(msg) - else: # for other files use the C-compiler - try: -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError as msg: - raise CompileError(msg) - -@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler): - self.set_executables(compiler='gcc -O -Wall', - compiler_so='gcc -mdll -O -Wall', - compiler_cxx='g++ -O -Wall', -+ compiler_so_cxx='g++ -mdll -O -Wall', - linker_exe='gcc', - linker_so='%s %s %s' - % (self.linker_dll, shared_option, -+ entry_point), -+ linker_exe_cxx='g++', -+ linker_so_cxx='%s %s %s' -+ % (self.linker_dll_cxx, shared_option, - entry_point)) - # Maybe we should also append -mthreads, but then the finished - # dlls need another dll (mingwm10.dll see Mingw32 docs) ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -170,9 +170,11 @@ def customize_compiler(compiler): - _osx_support.customize_compiler(_config_vars) - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' - -- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', -- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') -+ (cc, cxx, cflags, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \ -+ get_config_vars('CC', 'CXX', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') -+ -+ cxxflags = cflags - - if 'CC' in os.environ: - newcc = os.environ['CC'] -@@ -187,19 +189,27 @@ def customize_compiler(compiler): - cxx = os.environ['CXX'] - if 'LDSHARED' in os.environ: - ldshared = os.environ['LDSHARED'] -+ if 'LDCXXSHARED' in os.environ: -+ ldcxxshared = os.environ['LDCXXSHARED'] - if 'CPP' in os.environ: - cpp = os.environ['CPP'] - else: - cpp = cc + " -E" # not always - if 'LDFLAGS' in os.environ: - ldshared = ldshared + ' ' + os.environ['LDFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] - if 'CFLAGS' in os.environ: -- cflags = opt + ' ' + os.environ['CFLAGS'] -+ cflags = os.environ['CFLAGS'] - ldshared = ldshared + ' ' + os.environ['CFLAGS'] -+ if 'CXXFLAGS' in os.environ: -+ cxxflags = os.environ['CXXFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] - if 'CPPFLAGS' in os.environ: - cpp = cpp + ' ' + os.environ['CPPFLAGS'] - cflags = cflags + ' ' + os.environ['CPPFLAGS'] -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] - ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] - if 'AR' in os.environ: - ar = os.environ['AR'] - if 'ARFLAGS' in os.environ: -@@ -208,13 +218,17 @@ def customize_compiler(compiler): - archiver = ar + ' ' + ar_flags - - cc_cmd = cc + ' ' + cflags -+ cxx_cmd = cxx + ' ' + cxxflags - compiler.set_executables( - preprocessor=cpp, - compiler=cc_cmd, - compiler_so=cc_cmd + ' ' + ccshared, -- compiler_cxx=cxx, -+ compiler_cxx=cxx_cmd, -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared, - linker_so=ldshared, - linker_exe=cc, -+ linker_so_cxx=ldcxxshared, -+ linker_exe_cxx=cxx, - archiver=archiver) - - compiler.shared_lib_extension = shlib_suffix ---- a/Lib/distutils/unixccompiler.py -+++ b/Lib/distutils/unixccompiler.py -@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler): - # are pretty generic; they will probably have to be set by an outsider - # (eg. using information discovered by the sysconfig about building - # Python extensions). -- executables = {'preprocessor' : None, -- 'compiler' : ["cc"], -- 'compiler_so' : ["cc"], -- 'compiler_cxx' : ["cc"], -- 'linker_so' : ["cc", "-shared"], -- 'linker_exe' : ["cc"], -- 'archiver' : ["ar", "-cr"], -- 'ranlib' : None, -+ executables = {'preprocessor' : None, -+ 'compiler' : ["cc"], -+ 'compiler_so' : ["cc"], -+ 'compiler_cxx' : ["c++"], -+ 'compiler_so_cxx' : ["c++"], -+ 'linker_so' : ["cc", "-shared"], -+ 'linker_exe' : ["cc"], -+ 'linker_so_cxx' : ["c++", "-shared"], -+ 'linker_exe_cxx' : ["c++"], -+ 'archiver' : ["ar", "-cr"], -+ 'ranlib' : None, - } - - if sys.platform[:6] == "darwin": -@@ -110,12 +113,19 @@ class UnixCCompiler(CCompiler): - - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): - compiler_so = self.compiler_so -+ compiler_so_cxx = self.compiler_so_cxx - if sys.platform == 'darwin': - compiler_so = _osx_support.compiler_fixup(compiler_so, - cc_args + extra_postargs) -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, -+ cc_args + extra_postargs) - try: -- self.spawn(compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError as msg: - raise CompileError(msg) - -@@ -173,22 +183,16 @@ class UnixCCompiler(CCompiler): - ld_args.extend(extra_postargs) - self.mkpath(os.path.dirname(output_filename)) - try: -- if target_desc == CCompiler.EXECUTABLE: -- linker = self.linker_exe[:] -+ if target_lang == "c++": -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe_cxx[:] -+ else: -+ linker = self.linker_so_cxx[:] - else: -- linker = self.linker_so[:] -- if target_lang == "c++" and self.compiler_cxx: -- # skip over environment variable settings if /usr/bin/env -- # is used to set up the linker's environment. -- # This is needed on OSX. Note: this assumes that the -- # normal and C++ compiler have the same environment -- # settings. -- i = 0 -- if os.path.basename(linker[0]) == "env": -- i = 1 -- while '=' in linker[i]: -- i += 1 -- linker[i] = self.compiler_cxx[i] -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe[:] -+ else: -+ linker = self.linker_so[:] - - if sys.platform == 'darwin': - linker = _osx_support.compiler_fixup(linker, ld_args) ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -584,10 +584,10 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o - *\ -s*|s*) quiet="-q";; \ - *) quiet="";; \ - esac; \ -- echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ -- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - diff --git a/scripts/uberenv_configs/packages/python/python-3.7.3-distutils-C++.patch b/scripts/uberenv_configs/packages/python/python-3.7.3-distutils-C++.patch deleted file mode 100644 index e29323bf0..000000000 --- a/scripts/uberenv_configs/packages/python/python-3.7.3-distutils-C++.patch +++ /dev/null @@ -1,256 +0,0 @@ -diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py -index db6674e..ccbe09a 100644 ---- a/Lib/_osx_support.py -+++ b/Lib/_osx_support.py -@@ -14,13 +14,13 @@ __all__ = [ - # configuration variables that may contain universal build flags, - # like "-arch" or "-isdkroot", that may need customization for - # the user environment --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', -- 'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS') -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', -+ 'PY_CPPFLAGS', 'PY_CORE_LDFLAGS', 'PY_CORE_CFLAGS') - - # configuration variables that may contain compiler calls --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') - - # prefix added to original configuration variable names - _INITPRE = '_OSX_SUPPORT_INITIAL_' -diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py -index 6c5d777..640fa2d 100644 ---- a/Lib/distutils/cygwinccompiler.py -+++ b/Lib/distutils/cygwinccompiler.py -@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler): - # dllwrap 2.10.90 is buggy - if self.ld_version >= "2.10.90": - self.linker_dll = "gcc" -+ self.linker_dll_cxx = "g++" - else: - self.linker_dll = "dllwrap" -+ self.linker_dll_cxx = "dllwrap" - - # ld_version >= "2.13" support -shared so use it instead of - # -mdll -static -@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler): - self.set_executables(compiler='gcc -mcygwin -O -Wall', - compiler_so='gcc -mcygwin -mdll -O -Wall', - compiler_cxx='g++ -mcygwin -O -Wall', -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', - linker_exe='gcc -mcygwin', - linker_so=('%s -mcygwin %s' % -- (self.linker_dll, shared_option))) -+ (self.linker_dll, shared_option)), -+ linker_exe_cxx='g++ -mcygwin', -+ linker_so_cxx=('%s -mcygwin %s' % -+ (self.linker_dll_cxx, shared_option))) - - # cygwin and mingw32 need different sets of libraries - if self.gcc_version == "2.91.57": -@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler): - raise CompileError(msg) - else: # for other files use the C-compiler - try: -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError as msg: - raise CompileError(msg) - -@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler): - self.set_executables(compiler='gcc -O -Wall', - compiler_so='gcc -mdll -O -Wall', - compiler_cxx='g++ -O -Wall', -+ compiler_so_cxx='g++ -mdll -O -Wall', - linker_exe='gcc', - linker_so='%s %s %s' - % (self.linker_dll, shared_option, -+ entry_point), -+ linker_exe_cxx='g++', -+ linker_so_cxx='%s %s %s' -+ % (self.linker_dll_cxx, shared_option, - entry_point)) - # Maybe we should also append -mthreads, but then the finished - # dlls need another dll (mingwm10.dll see Mingw32 docs) -diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 83160f8..b735369 100644 ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -183,9 +183,11 @@ def customize_compiler(compiler): - _osx_support.customize_compiler(_config_vars) - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' - -- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ -+ (cc, cxx, opt, cflags, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \ - get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', -- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') -+ 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') -+ -+ cxxflags = cflags - - if 'CC' in os.environ: - newcc = os.environ['CC'] -@@ -200,19 +202,27 @@ def customize_compiler(compiler): - cxx = os.environ['CXX'] - if 'LDSHARED' in os.environ: - ldshared = os.environ['LDSHARED'] -+ if 'LDCXXSHARED' in os.environ: -+ ldcxxshared = os.environ['LDCXXSHARED'] - if 'CPP' in os.environ: - cpp = os.environ['CPP'] - else: - cpp = cc + " -E" # not always - if 'LDFLAGS' in os.environ: - ldshared = ldshared + ' ' + os.environ['LDFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] - if 'CFLAGS' in os.environ: - cflags = opt + ' ' + os.environ['CFLAGS'] - ldshared = ldshared + ' ' + os.environ['CFLAGS'] -+ if 'CXXFLAGS' in os.environ: -+ cxxflags = opt + ' ' + os.environ['CXXFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] - if 'CPPFLAGS' in os.environ: - cpp = cpp + ' ' + os.environ['CPPFLAGS'] -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] - cflags = cflags + ' ' + os.environ['CPPFLAGS'] - ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] - if 'AR' in os.environ: - ar = os.environ['AR'] - if 'ARFLAGS' in os.environ: -@@ -221,13 +231,17 @@ def customize_compiler(compiler): - archiver = ar + ' ' + ar_flags - - cc_cmd = cc + ' ' + cflags -+ cxx_cmd = cxx + ' ' + cxxflags - compiler.set_executables( - preprocessor=cpp, - compiler=cc_cmd, - compiler_so=cc_cmd + ' ' + ccshared, -- compiler_cxx=cxx, -+ compiler_cxx=cxx_cmd, -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared, - linker_so=ldshared, - linker_exe=cc, -+ linker_so_cxx=ldcxxshared, -+ linker_exe_cxx=cxx, - archiver=archiver) - - compiler.shared_lib_extension = shlib_suffix -diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py -index d10a78d..7e88781 100644 ---- a/Lib/distutils/unixccompiler.py -+++ b/Lib/distutils/unixccompiler.py -@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler): - # are pretty generic; they will probably have to be set by an outsider - # (eg. using information discovered by the sysconfig about building - # Python extensions). -- executables = {'preprocessor' : None, -- 'compiler' : ["cc"], -- 'compiler_so' : ["cc"], -- 'compiler_cxx' : ["cc"], -- 'linker_so' : ["cc", "-shared"], -- 'linker_exe' : ["cc"], -- 'archiver' : ["ar", "-cr"], -- 'ranlib' : None, -+ executables = {'preprocessor' : None, -+ 'compiler' : ["cc"], -+ 'compiler_so' : ["cc"], -+ 'compiler_cxx' : ["c++"], -+ 'compiler_so_cxx' : ["c++"], -+ 'linker_so' : ["cc", "-shared"], -+ 'linker_exe' : ["cc"], -+ 'linker_so_cxx' : ["c++", "-shared"], -+ 'linker_exe_cxx' : ["c++"], -+ 'archiver' : ["ar", "-cr"], -+ 'ranlib' : None, - } - - if sys.platform[:6] == "darwin": -@@ -110,12 +113,19 @@ class UnixCCompiler(CCompiler): - - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): - compiler_so = self.compiler_so -+ compiler_so_cxx = self.compiler_so_cxx - if sys.platform == 'darwin': - compiler_so = _osx_support.compiler_fixup(compiler_so, - cc_args + extra_postargs) -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, -+ cc_args + extra_postargs) - try: -- self.spawn(compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError as msg: - raise CompileError(msg) - -@@ -173,30 +183,16 @@ class UnixCCompiler(CCompiler): - ld_args.extend(extra_postargs) - self.mkpath(os.path.dirname(output_filename)) - try: -- if target_desc == CCompiler.EXECUTABLE: -- linker = self.linker_exe[:] -+ if target_lang == "c++": -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe_cxx[:] -+ else: -+ linker = self.linker_so_cxx[:] - else: -- linker = self.linker_so[:] -- if target_lang == "c++" and self.compiler_cxx: -- # skip over environment variable settings if /usr/bin/env -- # is used to set up the linker's environment. -- # This is needed on OSX. Note: this assumes that the -- # normal and C++ compiler have the same environment -- # settings. -- i = 0 -- if os.path.basename(linker[0]) == "env": -- i = 1 -- while '=' in linker[i]: -- i += 1 -- -- if os.path.basename(linker[i]) == 'ld_so_aix': -- # AIX platforms prefix the compiler with the ld_so_aix -- # script, so we need to adjust our linker index -- offset = 1 -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe[:] - else: -- offset = 0 -- -- linker[i+offset] = self.compiler_cxx[i] -+ linker = self.linker_so[:] - - if sys.platform == 'darwin': - linker = _osx_support.compiler_fixup(linker, ld_args) -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 2d2e11f..8456e3f 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -615,10 +615,10 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o - *\ -s*|s*) quiet="-q";; \ - *) quiet="";; \ - esac; \ -- echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ -- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - diff --git a/scripts/uberenv_configs/packages/python/python-3.7.4+-distutils-C++-testsuite.patch b/scripts/uberenv_configs/packages/python/python-3.7.4+-distutils-C++-testsuite.patch deleted file mode 100644 index 993610870..000000000 --- a/scripts/uberenv_configs/packages/python/python-3.7.4+-distutils-C++-testsuite.patch +++ /dev/null @@ -1,138 +0,0 @@ -This patch updates the distutils test suite for: -var/spack/repos/builtin/packages/python/python-3.7.4+-distutils-C++.patch - -That patch fixes several shortcomings in the distutils C++ support, -most prominently missing support for passing CXXFLAGS from the environment. - -Since it does not update the distutils testsuite, it causes the testsuite -to fail, which this patch updates to pass. - ------------------------------------------------------------------------------ -Spack changelog -- Added patch header to aid understanding the patch and maintainance -- Updated the distutils testsuite in Lib/distutils/tests/test_sysconfig.py - ------------------------------------------------------------------------------ -Upstream status - -Upstream bug: https://bugs.python.org/issue1222585 - -Status: Closed, wont fix, comment by Eric Araujo, Python Core Dev: -"setuptools and other active build tools are the better target for this feature." -https://bugs.python.org/issue1222585#msg379348 - -But according to the last-but-oncomment, setuptools seems to be lacking there too. -https://bugs.python.org/issue1222585#msg371840 - ------------------------------------------------------------------------------ -Description - -distutils has no support for CXXFLAGS, this patch adds it. - -Upstream distutils requires to pass all CXXFLAGS (C++-specific CFLAGS) -as part of the CXX enviromnent variable instead. - -This patch: -- adds CXXFLAGS support -- adds LDCXXSHARED like LDSHARED -- passes cflags to CXX like it passes them to CC. - -The distutils testsuite is updated accordingly to pass the tests. -Since it passes, it is the authoritative info of the current effects of this patch. - -See the update of the distutils testsuite in Lib/distutils/tests/test_sysconfig.py -below for details on the effect of this patch. - -diff --git a/Lib/distutils/tests/test_sysconfig.py b/Lib/distutils/tests/test_sysconfig.py -index db6674e..ccbe09a 100644 ---- a/Lib/distutils/tests/test_sysconfig.py -+++ b/Lib/distutils/tests/test_sysconfig.py -@@ -89,8 +89,10 @@ - 'CXX': 'sc_cxx', - 'ARFLAGS': '--sc-arflags', - 'CFLAGS': '--sc-cflags', -+ 'CXXFLAGS': '--sc-cxxflags', - 'CCSHARED': '--sc-ccshared', - 'LDSHARED': 'sc_ldshared', -+ 'LDCXXSHARED': 'sc_ldshared_cxx', - 'SHLIB_SUFFIX': 'sc_shutil_suffix', - - # On macOS, disable _osx_support.customize_compiler() -@@ -114,11 +116,13 @@ - os.environ['AR'] = 'env_ar' - os.environ['CC'] = 'env_cc' - os.environ['CPP'] = 'env_cpp' -- os.environ['CXX'] = 'env_cxx --env-cxx-flags' -+ os.environ['CXX'] = 'env_cxx' - os.environ['LDSHARED'] = 'env_ldshared' -+ os.environ['LDCXXSHARED'] = 'env_ldshared_cxx' - os.environ['LDFLAGS'] = '--env-ldflags' - os.environ['ARFLAGS'] = '--env-arflags' - os.environ['CFLAGS'] = '--env-cflags' -+ os.environ['CXXFLAGS'] = '--env-cxxflags' - os.environ['CPPFLAGS'] = '--env-cppflags' - - comp = self.customize_compiler() -@@ -128,16 +132,24 @@ - 'env_cpp --env-cppflags') - self.assertEqual(comp.exes['compiler'], - 'env_cc --sc-cflags --env-cflags --env-cppflags') -+ self.assertEqual(comp.exes['compiler_cxx'], -+ 'env_cxx --sc-cflags --env-cxxflags --env-cppflags') - self.assertEqual(comp.exes['compiler_so'], - ('env_cc --sc-cflags ' - '--env-cflags ''--env-cppflags --sc-ccshared')) -- self.assertEqual(comp.exes['compiler_cxx'], -- 'env_cxx --env-cxx-flags') -+ self.assertEqual(comp.exes['compiler_so_cxx'], -+ ('env_cxx --sc-cflags ' -+ '--env-cxxflags ''--env-cppflags --sc-ccshared')) - self.assertEqual(comp.exes['linker_exe'], - 'env_cc') -+ self.assertEqual(comp.exes['linker_exe_cxx'], -+ 'env_cxx') - self.assertEqual(comp.exes['linker_so'], - ('env_ldshared --env-ldflags --env-cflags' - ' --env-cppflags')) -+ self.assertEqual(comp.exes['linker_so_cxx'], -+ ('env_ldshared_cxx --env-ldflags --env-cxxflags' -+ ' --env-cppflags')) - self.assertEqual(comp.shared_lib_extension, 'sc_shutil_suffix') - - del os.environ['AR'] -@@ -145,9 +157,11 @@ - del os.environ['CPP'] - del os.environ['CXX'] - del os.environ['LDSHARED'] -+ del os.environ['LDCXXSHARED'] - del os.environ['LDFLAGS'] - del os.environ['ARFLAGS'] - del os.environ['CFLAGS'] -+ del os.environ['CXXFLAGS'] - del os.environ['CPPFLAGS'] - - comp = self.customize_compiler() -@@ -157,14 +171,21 @@ - 'sc_cc -E') - self.assertEqual(comp.exes['compiler'], - 'sc_cc --sc-cflags') -+ # TODO: Likely this sould get --sc-cxxflags instead: -+ self.assertEqual(comp.exes['compiler_cxx'], -+ 'sc_cxx --sc-cflags') - self.assertEqual(comp.exes['compiler_so'], - 'sc_cc --sc-cflags --sc-ccshared') -- self.assertEqual(comp.exes['compiler_cxx'], -- 'sc_cxx') -+ self.assertEqual(comp.exes['compiler_so_cxx'], -+ 'sc_cxx --sc-cflags --sc-ccshared') - self.assertEqual(comp.exes['linker_exe'], - 'sc_cc') -+ self.assertEqual(comp.exes['linker_exe_cxx'], -+ 'sc_cxx') - self.assertEqual(comp.exes['linker_so'], - 'sc_ldshared') -+ self.assertEqual(comp.exes['linker_so_cxx'], -+ 'sc_ldshared_cxx') - self.assertEqual(comp.shared_lib_extension, 'sc_shutil_suffix') - - def test_parse_makefile_base(self): diff --git a/scripts/uberenv_configs/packages/python/python-3.7.4+-distutils-C++.patch b/scripts/uberenv_configs/packages/python/python-3.7.4+-distutils-C++.patch deleted file mode 100644 index 02daf0a11..000000000 --- a/scripts/uberenv_configs/packages/python/python-3.7.4+-distutils-C++.patch +++ /dev/null @@ -1,257 +0,0 @@ -diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py -index db6674e..ccbe09a 100644 ---- a/Lib/_osx_support.py -+++ b/Lib/_osx_support.py -@@ -14,13 +14,13 @@ __all__ = [ - # configuration variables that may contain universal build flags, - # like "-arch" or "-isdkroot", that may need customization for - # the user environment --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', -- 'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS') -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', -+ 'PY_CPPFLAGS', 'PY_CORE_LDFLAGS', 'PY_CORE_CFLAGS') - - # configuration variables that may contain compiler calls --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') - - # prefix added to original configuration variable names - _INITPRE = '_OSX_SUPPORT_INITIAL_' -diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py -index 6c5d777..640fa2d 100644 ---- a/Lib/distutils/cygwinccompiler.py -+++ b/Lib/distutils/cygwinccompiler.py -@@ -125,8 +125,10 @@ class CygwinCCompiler(UnixCCompiler): - # dllwrap 2.10.90 is buggy - if self.ld_version >= "2.10.90": - self.linker_dll = "gcc" -+ self.linker_dll_cxx = "g++" - else: - self.linker_dll = "dllwrap" -+ self.linker_dll_cxx = "dllwrap" - - # ld_version >= "2.13" support -shared so use it instead of - # -mdll -static -@@ -140,9 +142,13 @@ class CygwinCCompiler(UnixCCompiler): - self.set_executables(compiler='gcc -mcygwin -O -Wall', - compiler_so='gcc -mcygwin -mdll -O -Wall', - compiler_cxx='g++ -mcygwin -O -Wall', -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall', - linker_exe='gcc -mcygwin', - linker_so=('%s -mcygwin %s' % -- (self.linker_dll, shared_option))) -+ (self.linker_dll, shared_option)), -+ linker_exe_cxx='g++ -mcygwin', -+ linker_so_cxx=('%s -mcygwin %s' % -+ (self.linker_dll_cxx, shared_option))) - - # cygwin and mingw32 need different sets of libraries - if self.gcc_version == "2.91.57": -@@ -166,8 +172,12 @@ class CygwinCCompiler(UnixCCompiler): - raise CompileError(msg) - else: # for other files use the C-compiler - try: -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError as msg: - raise CompileError(msg) - -@@ -302,9 +312,14 @@ class Mingw32CCompiler(CygwinCCompiler): - self.set_executables(compiler='gcc -O -Wall', - compiler_so='gcc -mdll -O -Wall', - compiler_cxx='g++ -O -Wall', -+ compiler_so_cxx='g++ -mdll -O -Wall', - linker_exe='gcc', - linker_so='%s %s %s' - % (self.linker_dll, shared_option, -+ entry_point), -+ linker_exe_cxx='g++', -+ linker_so_cxx='%s %s %s' -+ % (self.linker_dll_cxx, shared_option, - entry_point)) - # Maybe we should also append -mthreads, but then the finished - # dlls need another dll (mingwm10.dll see Mingw32 docs) -diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 0a034ee..ecf4759 100644 ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -188,9 +188,11 @@ def customize_compiler(compiler): - _osx_support.customize_compiler(_config_vars) - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True' - -- (cc, cxx, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ -- get_config_vars('CC', 'CXX', 'CFLAGS', -- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') -+ (cc, cxx, cflags, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \ -+ get_config_vars('CC', 'CXX', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS') -+ -+ cxxflags = cflags - - if 'CC' in os.environ: - newcc = os.environ['CC'] -@@ -205,19 +207,27 @@ def customize_compiler(compiler): - cxx = os.environ['CXX'] - if 'LDSHARED' in os.environ: - ldshared = os.environ['LDSHARED'] -+ if 'LDCXXSHARED' in os.environ: -+ ldcxxshared = os.environ['LDCXXSHARED'] - if 'CPP' in os.environ: - cpp = os.environ['CPP'] - else: - cpp = cc + " -E" # not always - if 'LDFLAGS' in os.environ: - ldshared = ldshared + ' ' + os.environ['LDFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS'] - if 'CFLAGS' in os.environ: - cflags = cflags + ' ' + os.environ['CFLAGS'] - ldshared = ldshared + ' ' + os.environ['CFLAGS'] -+ if 'CXXFLAGS' in os.environ: -+ cxxflags = cxxflags + ' ' + os.environ['CXXFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS'] - if 'CPPFLAGS' in os.environ: - cpp = cpp + ' ' + os.environ['CPPFLAGS'] - cflags = cflags + ' ' + os.environ['CPPFLAGS'] -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS'] - ldshared = ldshared + ' ' + os.environ['CPPFLAGS'] -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS'] - if 'AR' in os.environ: - ar = os.environ['AR'] - if 'ARFLAGS' in os.environ: -@@ -226,13 +236,17 @@ def customize_compiler(compiler): - archiver = ar + ' ' + ar_flags - - cc_cmd = cc + ' ' + cflags -+ cxx_cmd = cxx + ' ' + cxxflags - compiler.set_executables( - preprocessor=cpp, - compiler=cc_cmd, - compiler_so=cc_cmd + ' ' + ccshared, -- compiler_cxx=cxx, -+ compiler_cxx=cxx_cmd, -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared, - linker_so=ldshared, - linker_exe=cc, -+ linker_so_cxx=ldcxxshared, -+ linker_exe_cxx=cxx, - archiver=archiver) - - compiler.shared_lib_extension = shlib_suffix -diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py -index d10a78d..7e88781 100644 ---- a/Lib/distutils/unixccompiler.py -+++ b/Lib/distutils/unixccompiler.py -@@ -52,14 +52,17 @@ class UnixCCompiler(CCompiler): - # are pretty generic; they will probably have to be set by an outsider - # (eg. using information discovered by the sysconfig about building - # Python extensions). -- executables = {'preprocessor' : None, -- 'compiler' : ["cc"], -- 'compiler_so' : ["cc"], -- 'compiler_cxx' : ["cc"], -- 'linker_so' : ["cc", "-shared"], -- 'linker_exe' : ["cc"], -- 'archiver' : ["ar", "-cr"], -- 'ranlib' : None, -+ executables = {'preprocessor' : None, -+ 'compiler' : ["cc"], -+ 'compiler_so' : ["cc"], -+ 'compiler_cxx' : ["c++"], -+ 'compiler_so_cxx' : ["c++"], -+ 'linker_so' : ["cc", "-shared"], -+ 'linker_exe' : ["cc"], -+ 'linker_so_cxx' : ["c++", "-shared"], -+ 'linker_exe_cxx' : ["c++"], -+ 'archiver' : ["ar", "-cr"], -+ 'ranlib' : None, - } - - if sys.platform[:6] == "darwin": -@@ -110,12 +113,19 @@ class UnixCCompiler(CCompiler): - - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): - compiler_so = self.compiler_so -+ compiler_so_cxx = self.compiler_so_cxx - if sys.platform == 'darwin': - compiler_so = _osx_support.compiler_fixup(compiler_so, - cc_args + extra_postargs) -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx, -+ cc_args + extra_postargs) - try: -- self.spawn(compiler_so + cc_args + [src, '-o', obj] + -- extra_postargs) -+ if self.detect_language(src) == 'c++': -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] + -+ extra_postargs) -+ else: -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] + -+ extra_postargs) - except DistutilsExecError as msg: - raise CompileError(msg) - -@@ -173,30 +183,16 @@ class UnixCCompiler(CCompiler): - ld_args.extend(extra_postargs) - self.mkpath(os.path.dirname(output_filename)) - try: -- if target_desc == CCompiler.EXECUTABLE: -- linker = self.linker_exe[:] -+ if target_lang == "c++": -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe_cxx[:] -+ else: -+ linker = self.linker_so_cxx[:] - else: -- linker = self.linker_so[:] -- if target_lang == "c++" and self.compiler_cxx: -- # skip over environment variable settings if /usr/bin/env -- # is used to set up the linker's environment. -- # This is needed on OSX. Note: this assumes that the -- # normal and C++ compiler have the same environment -- # settings. -- i = 0 -- if os.path.basename(linker[0]) == "env": -- i = 1 -- while '=' in linker[i]: -- i += 1 -- -- if os.path.basename(linker[i]) == 'ld_so_aix': -- # AIX platforms prefix the compiler with the ld_so_aix -- # script, so we need to adjust our linker index -- offset = 1 -+ if target_desc == CCompiler.EXECUTABLE: -+ linker = self.linker_exe[:] - else: -- offset = 0 -- -- linker[i+offset] = self.compiler_cxx[i] -+ linker = self.linker_so[:] - - if sys.platform == 'darwin': - linker = _osx_support.compiler_fixup(linker, ld_args) -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 35ca1a8..cfa79df 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -618,10 +618,10 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o - *\ -s*|s*) quiet="-q";; \ - *) quiet="";; \ - esac; \ -- echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ -- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - diff --git a/scripts/uberenv_configs/packages/python/tkinter-3.10.patch b/scripts/uberenv_configs/packages/python/tkinter-3.10.patch deleted file mode 100644 index e06be826b..000000000 --- a/scripts/uberenv_configs/packages/python/tkinter-3.10.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/setup.py 2021-12-06 12:23:39.000000000 -0600 -+++ b/setup.py 2021-12-14 10:30:33.000000000 -0600 -@@ -2099,6 +2099,8 @@ - # - # Detection stops at the first successful method. - -+ return False -+ - # Check for Tcl and Tk at the locations indicated by _TCLTK_INCLUDES - # and _TCLTK_LIBS environment variables. - if self.detect_tkinter_fromenv(): diff --git a/scripts/uberenv_configs/packages/python/tkinter-3.8.patch b/scripts/uberenv_configs/packages/python/tkinter-3.8.patch deleted file mode 100644 index a1fc5729a..000000000 --- a/scripts/uberenv_configs/packages/python/tkinter-3.8.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur a/setup.py b/setup.py ---- a/setup.py.orig 2021-09-29 21:28:23.000000000 -0400 -+++ a/setup.py 2021-09-29 21:28:44.000000000 -0400 -@@ -1826,6 +1826,8 @@ - def detect_tkinter(self): - # The _tkinter module. - -+ return False -+ - # Check whether --with-tcltk-includes and --with-tcltk-libs were - # configured or passed into the make target. If so, use these values - # to build tkinter and bypass the searches for Tcl and TK in standard diff --git a/scripts/uberenv_configs/packages/python/tkinter.patch b/scripts/uberenv_configs/packages/python/tkinter.patch deleted file mode 100644 index 87e190180..000000000 --- a/scripts/uberenv_configs/packages/python/tkinter.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naur a/setup.py b/setup.py ---- a/setup.py 2019-01-13 18:59:14.000000000 -0600 -+++ b/setup.py 2019-01-13 19:00:31.000000000 -0600 -@@ -1787,13 +1787,6 @@ - if self.detect_tkinter_explicitly(): - return - -- # Rather than complicate the code below, detecting and building -- # AquaTk is a separate method. Only one Tkinter will be built on -- # Darwin - either AquaTk, if it is found, or X11 based Tk. -- if (host_platform == 'darwin' and -- self.detect_tkinter_darwin(inc_dirs, lib_dirs)): -- return -- - # Assume we haven't found any of the libraries or include files - # The versions with dots are used on Unix, and the versions without - # dots on Windows, for detection by cygwin. diff --git a/scripts/uberenv_configs/repo.yaml b/scripts/uberenv_configs/repo.yaml new file mode 100644 index 000000000..4e4edabc3 --- /dev/null +++ b/scripts/uberenv_configs/repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: conduit \ No newline at end of file diff --git a/scripts/uberenv_configs/spack_configs b/scripts/uberenv_configs/spack_configs index 68987700f..26a5d1051 160000 --- a/scripts/uberenv_configs/spack_configs +++ b/scripts/uberenv_configs/spack_configs @@ -1 +1 @@ -Subproject commit 68987700f98c632e525e6eeb07337100dd797f16 +Subproject commit 26a5d1051d0fa1191a27dfb4d53fb16a1e8ea6c4 diff --git a/src/docs/sphinx/building.rst b/src/docs/sphinx/building.rst index db5aa9228..f21740ebc 100644 --- a/src/docs/sphinx/building.rst +++ b/src/docs/sphinx/building.rst @@ -238,8 +238,8 @@ Uberenv Options for Building Third Party Dependencies --prefix Destination directory ``uberenv_libs`` --spec Spack spec linux: **%gcc** osx: **%clang** - --spack-config-dir Folder with Spack settings files linux: (empty) - osx: ``scripts/uberenv_configs/spack_configs/config/darwin/`` + --spack-env-file Spack environment file (spack.yaml) linux: (empty) + osx: (empty) -k Ignore SSL Errors **False** --install Fully install conduit, not just dependencies **False** --run_tests Invoke tests during build and against install **False** @@ -262,13 +262,13 @@ Default invocation on Linux: python3 scripts/uberenv/uberenv.py --prefix uberenv_libs \ --spec %gcc -Default invocation on OSX: +Suggested invocation on macOS: .. code:: bash python3 scripts/uberenv/uberenv.py --prefix uberenv_libs \ --spec %clang \ - --spack-config-dir scripts/uberenv_configs/spack_configs/configs/darwin/ + --spack-config-dir scripts/uberenv_configs/spack_configs/envs/darwin/spack.yaml The uberenv `--install` installs conduit\@develop (not just the development dependencies): @@ -288,43 +288,43 @@ To run tests during the build process to validate the build and install, you can For details on Spack's spec syntax, see the `Spack Specs & dependencies `_ documentation. -You can edit yaml files under ``scripts/uberenv/spack_config/{platform}`` or use the **--spack-config-dir** option to specify a directory with compiler and packages yaml files to use with Spack. See the `Spack Compiler Configuration `_ +You use the **--spack-env-file** option to specify a Spack environment file. See the `Spack Environments `_ and `Spack System Packages `_ documentation for details. -For OSX, the defaults in ``spack_configs/darwin/compilers.yaml`` are X-Code's clang and gfortran from https://gcc.gnu.org/wiki/GFortranBinaries#MacOS. +For macOS, the enries in ``scripts/uberenv_configs/spack_configs/envs/darwin/spack.yaml`` are X-Code's clang and gfortran from https://gcc.gnu.org/wiki/GFortranBinaries#MacOS. .. note:: The bootstrapping process ignores ``~/.spack/compilers.yaml`` to avoid conflicts and surprises from a user's specific Spack settings on HPC platforms. -When run, ``uberenv.py`` checkouts a specific version of Spack from github as ``spack`` in the -destination directory. It then uses Spack to build and install Conduit's dependencies into -``spack/opt/spack/``. Finally, it generates a host-config file ``{hostname}.cmake`` in the -destination directory that specifies the compiler settings and paths to all of the dependencies. - - -.. _building_known_hpc: - -Building with Uberenv on Known HPC Platforms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To support testing and installing on common platforms, we maintain sets of Spack compiler and package settings -for a few known HPC platforms. Here are the commonly tested configurations: - - ================== ====================== ====================================== - System OS Tested Configurations (Spack Specs) - ================== ====================== ====================================== - pascal.llnl.gov Linux: TOSS3 %gcc - - %gcc~shared - lassen.llnl.gov Linux: BlueOS %clang\@coral~python~fortran - cori.nersc.gov Linux: SUSE / CNL %gcc - ================== ====================== ====================================== - - -See ``scripts/spack_build_tests/`` for the exact invocations used to test on these platforms. +When run, ``uberenv.py`` checkouts a specific version of Spack from github as ``{prefix}/spack``. +It then uses Spack to build and install Conduit's dependencies to create a Spack environment at +``{prefix}/spack_env``. Finally, it generates a host-config file at ``{prefix}/{hostname}.cmake`` +that specifies the compiler settings and paths to all of the dependencies. + + +.. .. _building_known_hpc: +.. +.. Building with Uberenv on Known HPC Platforms +.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. +.. To support testing and installing on common platforms, we maintain sets of Spack compiler and package settings +.. for a few known HPC platforms. Here are the commonly tested configurations: +.. +.. ================== ====================== ====================================== +.. System OS Tested Configurations (Spack Specs) +.. ================== ====================== ====================================== +.. pascal.llnl.gov Linux: TOSS3 %gcc +.. +.. %gcc~shared +.. lassen.llnl.gov Linux: BlueOS %clang\@coral~python~fortran +.. cori.nersc.gov Linux: SUSE / CNL %gcc +.. ================== ====================== ====================================== +.. +.. +.. See ``scripts/spack_build_tests/`` for the exact invocations used to test on these platforms. .. _building_with_spack: @@ -347,21 +347,12 @@ To build and install Conduit's github develop branch run: spack install conduit@develop -The Conduit Spack package provides several `variants `_ that customize the options and dependencies used to build Conduit: +The Conduit Spack package provides several `variants `_ that customize the options and dependencies used to build Conduit. +To see these variants, please rune - ================== ==================================== ====================================== - Variant Description Default - ================== ==================================== ====================================== - **shared** Build Conduit as shared libraries ON (+shared) - **cmake** Build CMake with Spack ON (+cmake) - **python** Enable Conduit Python support ON (+python) - **mpi** Enable Conduit MPI support ON (+mpi) - **hdf5** Enable Conduit HDF5 support ON (+hdf5) - **silo** Enable Conduit Silo support ON (+silo) - **adios** Enable Conduit ADIOS support OFF (+adios) - **doc** Build Conduit's Documentation OFF (+docs) - ================== ==================================== ====================================== +.. code:: bash + spack info conduit Variants are enabled using ``+`` and disabled using ``~``. For example, to build Conduit with the minimum set of options (and dependencies) run: @@ -370,19 +361,19 @@ Variants are enabled using ``+`` and disabled using ``~``. For example, to build spack install conduit~python~mpi~hdf5~silo~docs -You can specify specific versions of a dependency using ``^``. For Example, to build Conduit with Python 3: +You can specify specific versions of a dependency using ``^``. For Example, to build Conduit with Python 3,19,19: .. code:: bash - spack install conduit+python ^python@3 + spack install conduit+python ^python@3.10.10 .. _supported_cmake: Supported CMake Versions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -We recommend CMake 3.9 or newer. We test building Conduit with CMake 3.9 and 3.14. Other versions of CMake may work, however CMake 3.18.0 and 3.18.1 have known issues that impact HDF5 support. CMake 3.18.2 resolved the HDF5 issues. +We recommend CMake 3.20 or newer. We test building Conduit with CMake 3.14 and 3.2x variants. Using Conduit in Another Project diff --git a/src/docs/sphinx/conf.py b/src/docs/sphinx/conf.py index 91a6bb4d0..799f835ca 100644 --- a/src/docs/sphinx/conf.py +++ b/src/docs/sphinx/conf.py @@ -36,6 +36,7 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', + 'sphinxcontrib.jquery', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.mathjax' diff --git a/src/docs/sphinx/quick_start.rst b/src/docs/sphinx/quick_start.rst index ad4708d3e..d390a8ec8 100644 --- a/src/docs/sphinx/quick_start.rst +++ b/src/docs/sphinx/quick_start.rst @@ -23,7 +23,7 @@ The quickest path to install conduit and its dependencies is via :ref:`uberenv < After this completes, ``build/conduit-install`` will contain a Conduit install. -For more details about building and installing Conduit see :doc:`building`. This page provides detailed info about Conduit's CMake options, :ref:`uberenv ` and :ref:`Spack ` support. We also provide info about :ref:`building for known HPC clusters using uberenv ` and a :ref:`Docker example ` that leverages Spack. +For more details about building and installing Conduit see :doc:`building`. This page provides detailed info about Conduit's CMake options, :ref:`uberenv ` and :ref:`Spack ` support. We a :ref:`Docker example ` that leverages Spack. Installing Conduit with pip diff --git a/src/docs/sphinx/requirements.txt b/src/docs/sphinx/requirements.txt index fa154353b..4b76d7bb2 100644 --- a/src/docs/sphinx/requirements.txt +++ b/src/docs/sphinx/requirements.txt @@ -2,3 +2,4 @@ docutils sphinx==6.2.1 sphinx-rtd-theme==1.2.2 + diff --git a/src/examples/docker/ubuntu/Dockerfile b/src/examples/docker/ubuntu/Dockerfile index d4f2b019a..43bf8e944 100644 --- a/src/examples/docker/ubuntu/Dockerfile +++ b/src/examples/docker/ubuntu/Dockerfile @@ -55,17 +55,16 @@ RUN tar -xf conduit.docker.src.tar # will not run for the root user RUN cd conduit && python3 scripts/uberenv/uberenv.py \ -k \ - --spec "%gcc+mpi~doc" \ - --spack-config-dir=scripts/uberenv_configs/spack_configs/configs/alpinedav/ubuntu_18.04_devel/ + --spec "%gcc+mpi" \ + --spack-env-file=scripts/uberenv_configs/spack_configs/envs/alpinedav-ubuntu_18.04_devel/spack.yaml # configure a debug build with cmake -RUN cd conduit && mkdir build-debug -RUN cd conduit/build-debug && \ - ../uberenv_libs/spack/opt/spack/*/*/cmake*/bin/cmake \ +RUN cd conduit && \ + uberenv_libs/spack/opt/spack/*/*/cmake*/bin/cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_INSTALL_PREFIX=/conduit/install-debug \ - -C ../uberenv_libs/*.cmake \ - ../src + -C /conduit/uberenv_libs/*-patch.cmake \ + -B build-debug -S src # build, test, and install conduit RUN cd conduit/build-debug && make