diff options
author | Harmen Stoppels <me@harmenstoppels.nl> | 2024-12-05 10:07:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-05 10:07:24 +0100 |
commit | 22d104d7a92df60dcfed775ae61c5fd725ee6059 (patch) | |
tree | 90a5fa1866976570766404a5134645cd98d3b786 | |
parent | 8b1009a4a074d31b02defc6800ac0161c0bfdc39 (diff) | |
download | spack-22d104d7a92df60dcfed775ae61c5fd725ee6059.tar.gz spack-22d104d7a92df60dcfed775ae61c5fd725ee6059.tar.bz2 spack-22d104d7a92df60dcfed775ae61c5fd725ee6059.tar.xz spack-22d104d7a92df60dcfed775ae61c5fd725ee6059.zip |
ci: add bootstrap stack for python@3.6:3.13 (#47719)
Resurrect latest Python 3.6
Add clingo-bootstrap to Gitlab CI.
7 files changed, 174 insertions, 102 deletions
diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index f082b3b413..07fd16c88b 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -951,3 +951,49 @@ windows-vis-build: needs: - artifacts: True job: windows-vis-generate + +####################################### +# Bootstrap x86_64-linux-gnu +####################################### +.bootstrap-x86_64-linux-gnu: + extends: [ ".linux_x86_64_v3" ] + variables: + SPACK_CI_STACK_NAME: bootstrap-x86_64-linux-gnu + +bootstrap-x86_64-linux-gnu-generate: + extends: [ .generate-x86_64, .bootstrap-x86_64-linux-gnu ] + image: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2 + +bootstrap-x86_64-linux-gnu-build: + extends: [ .build, .bootstrap-x86_64-linux-gnu ] + trigger: + include: + - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml + job: bootstrap-x86_64-linux-gnu-generate + strategy: depend + needs: + - artifacts: True + job: bootstrap-x86_64-linux-gnu-generate + +####################################### +# Bootstrap aarch64-darwin +####################################### +.bootstrap-aarch64-darwin: + extends: [.darwin_aarch64] + variables: + SPACK_CI_STACK_NAME: bootstrap-aarch64-darwin + +bootstrap-aarch64-darwin-generate: + tags: [macos-ventura, apple-clang-15, aarch64-macos] + extends: [.bootstrap-aarch64-darwin, .generate-base] + +bootstrap-aarch64-darwin-build: + extends: [.bootstrap-aarch64-darwin, .build] + trigger: + include: + - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml + job: bootstrap-aarch64-darwin-generate + strategy: depend + needs: + - artifacts: true + job: bootstrap-aarch64-darwin-generate diff --git a/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-aarch64-darwin/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-aarch64-darwin/spack.yaml new file mode 100644 index 0000000000..d267db430e --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-aarch64-darwin/spack.yaml @@ -0,0 +1,33 @@ +spack: + view: false + + packages: + all: + require: target=aarch64 + + config: + deprecated: true # allow old python versions + + specs: + - clingo-bootstrap +optimized ^python@3.13 + - clingo-bootstrap +optimized ^python@3.12 + - clingo-bootstrap +optimized ^python@3.11 + - clingo-bootstrap +optimized ^python@3.10 + - clingo-bootstrap +optimized ^python@3.9 + - clingo-bootstrap +optimized ^python@3.8 + + - clingo-bootstrap@spack +optimized ^python@3.13 + - clingo-bootstrap@spack +optimized ^python@3.12 + - clingo-bootstrap@spack +optimized ^python@3.11 + - clingo-bootstrap@spack +optimized ^python@3.10 + - clingo-bootstrap@spack +optimized ^python@3.9 + - clingo-bootstrap@spack +optimized ^python@3.8 + + ci: + pipeline-gen: + - build-job-remove: + tags: [spack, public] + - build-job: + variables: + CI_GPG_KEY_ROOT: /etc/protected-runner + tags: [macos-ventura, apple-clang-15, aarch64-macos] diff --git a/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-x86_64-linux-gnu/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-x86_64-linux-gnu/spack.yaml new file mode 100644 index 0000000000..67d5b20fa3 --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/stacks/bootstrap-x86_64-linux-gnu/spack.yaml @@ -0,0 +1,35 @@ +spack: + view: false + + packages: + all: + require: target=x86_64_v3 + + config: + deprecated: true # allow old python versions + + specs: + - clingo-bootstrap +optimized ^python@3.13 + - clingo-bootstrap +optimized ^python@3.12 + - clingo-bootstrap +optimized ^python@3.11 + - clingo-bootstrap +optimized ^python@3.10 + - clingo-bootstrap +optimized ^python@3.9 + - clingo-bootstrap +optimized ^python@3.8 + - clingo-bootstrap +optimized ^python@3.7 + - clingo-bootstrap +optimized ^python@3.6 + + - clingo-bootstrap@spack +optimized ^python@3.13 + - clingo-bootstrap@spack +optimized ^python@3.12 + - clingo-bootstrap@spack +optimized ^python@3.11 + - clingo-bootstrap@spack +optimized ^python@3.10 + - clingo-bootstrap@spack +optimized ^python@3.9 + - clingo-bootstrap@spack +optimized ^python@3.8 + - clingo-bootstrap@spack +optimized ^python@3.7 + - clingo-bootstrap@spack +optimized ^python@3.6 + + ci: + pipeline-gen: + - build-job: + image: + name: ghcr.io/spack/ubuntu-24.04:v2024-09-05-v2 + entrypoint: [''] diff --git a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py index bff3edef94..1725808203 100644 --- a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py @@ -44,7 +44,8 @@ class ClingoBootstrap(Clingo): patch("mimalloc.patch", when="@5.5.0:") patch("mimalloc-pre-5.5.0.patch", when="@:5.4") # ensure we hide libstdc++ with custom operator new/delete symbols - patch("version-script.patch") + patch("version-script.patch", when="@spack,5.5:5.6") + patch("version-script-5.4.patch", when="@5.2:5.4") # CMake at version 3.16.0 or higher has the possibility to force the # Python interpreter, which is crucial to build against external Python diff --git a/var/spack/repos/builtin/packages/clingo-bootstrap/version-script-5.4.patch b/var/spack/repos/builtin/packages/clingo-bootstrap/version-script-5.4.patch new file mode 100644 index 0000000000..60be38ee1a --- /dev/null +++ b/var/spack/repos/builtin/packages/clingo-bootstrap/version-script-5.4.patch @@ -0,0 +1,35 @@ +diff --git a/libclingo/CMakeLists.txt b/libclingo/CMakeLists.txt +index 041fd6f0..e8c4caf6 100644 +--- a/libclingo/CMakeLists.txt ++++ b/libclingo/CMakeLists.txt +@@ -50,6 +50,19 @@ target_include_directories(libclingo + PRIVATE + "$<BUILD_INTERFACE:${CLASP_SOURCE_DIR}/app>") + target_compile_definitions(libclingo PRIVATE CLINGO_BUILD_LIBRARY) ++ ++# Hide private symbols on Linux. ++include(CheckCSourceCompiles) ++file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/version.map" "{ global: f; local: *;};") ++set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS}) ++set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/version.map'") ++check_c_source_compiles("void f(void) {} int main(void) {return 0;}" HAVE_LD_VERSION_SCRIPT) ++set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE}) ++file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/version.map") ++if(HAVE_LD_VERSION_SCRIPT) ++set_target_properties(libclingo PROPERTIES LINK_FLAGS "-Wl,--version-script='${CMAKE_CURRENT_SOURCE_DIR}/clingo.map'") ++endif() ++ + if (NOT CLINGO_BUILD_SHARED) + target_compile_definitions(libclingo PUBLIC CLINGO_NO_VISIBILITY) + else() +diff --git a/libclingo/clingo.map b/libclingo/clingo.map +new file mode 100644 +index 00000000..a665456c +--- /dev/null ++++ b/libclingo/clingo.map +@@ -0,0 +1,4 @@ ++{ ++ global: clingo_*; gringo_*; g_clingo_*; ++ local: *; ++}; +\ No newline at end of file diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 677c4c06d2..89930c88d5 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -62,20 +62,20 @@ class PySetuptools(Package, PythonExtension): extends("python") - depends_on("python@3.7:", when="@59.7:", type=("build", "run")) - depends_on("python@3.6:", when="@51:", type=("build", "run")) - depends_on("python@3.5:", when="@45:50", type=("build", "run")) - depends_on("python@2.7:2.8,3.5:", when="@44", type=("build", "run")) - depends_on("python@2.7:2.8,3.4:", when="@:43", type=("build", "run")) + with default_args(type=("build", "run")): + depends_on("python@3.9:", when="@75.4:") + depends_on("python@3.8:", when="@68.1:") + depends_on("python@3.7:", when="@59.7:") + depends_on("python@3.6:", when="@51:") - # Uses HTMLParser.unescape - depends_on("python@:3.8", when="@:41.0", type=("build", "run")) + # Uses HTMLParser.unescape + depends_on("python@:3.8", when="@:41.0") - # Uses collections.MutableMapping - depends_on("python@:3.9", when="@:40.4.2", type=("build", "run")) + # Uses collections.MutableMapping + depends_on("python@:3.9", when="@:40.4.2") - # https://github.com/pypa/setuptools/issues/3661 - depends_on("python@:3.11", when="@:67", type=("build", "run")) + # https://github.com/pypa/setuptools/issues/3661 + depends_on("python@:3.11", when="@:67") depends_on("py-pip", type="build") diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index f6d13f4906..841b94b54c 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -132,96 +132,13 @@ class Python(Package): version("3.8.2", sha256="e634a7a74776c2b89516b2e013dda1728c89c8149b9863b8cea21946daf9d561") version("3.8.1", sha256="c7cfa39a43b994621b245e029769e9126caa2a93571cee2e743b213cceac35fb") version("3.8.0", sha256="f1069ad3cae8e7ec467aa98a6565a62a48ef196cb8f1455a245a08db5e1792df") - version( - "3.7.17", - sha256="fd50161bc2a04f4c22a0971ff0f3856d98b4bf294f89740a9f06b520aae63b49", - deprecated=True, - ) - version( - "3.7.16", - sha256="0cf2da07fa464636755215415909e22eb1d058817af4824bc15af8390d05fb38", - deprecated=True, - ) - version( - "3.7.15", - sha256="cf2993798ae8430f3af3a00d96d9fdf320719f4042f039380dca79967c25e436", - deprecated=True, - ) - version( - "3.7.14", - sha256="82b2abf8978caa61a9011d166eede831b32de9cbebc0db8162900fa23437b709", - deprecated=True, - ) - version( - "3.7.13", - sha256="e405417f50984bc5870c7e7a9f9aeb93e9d270f5ac67f667a0cd3a09439682b5", - deprecated=True, - ) - version( - "3.7.12", - sha256="33b4daaf831be19219659466d12645f87ecec6eb21d4d9f9711018a7b66cce46", - deprecated=True, - ) - version( - "3.7.11", - sha256="b4fba32182e16485d0a6022ba83c9251e6a1c14676ec243a9a07d3722cd4661a", - deprecated=True, - ) - version( - "3.7.10", - sha256="c9649ad84dc3a434c8637df6963100b2e5608697f9ba56d82e3809e4148e0975", - deprecated=True, - ) - version( - "3.7.9", - sha256="39b018bc7d8a165e59aa827d9ae45c45901739b0bbb13721e4f973f3521c166a", - deprecated=True, - ) - version( - "3.7.8", - sha256="0e25835614dc221e3ecea5831b38fa90788b5389b99b675a751414c858789ab0", - deprecated=True, - ) - version( - "3.7.7", - sha256="8c8be91cd2648a1a0c251f04ea0bb4c2a5570feb9c45eaaa2241c785585b475a", - deprecated=True, - ) - version( - "3.7.6", - sha256="aeee681c235ad336af116f08ab6563361a0c81c537072c1b309d6e4050aa2114", - deprecated=True, - ) - version( - "3.7.5", - sha256="8ecc681ea0600bbfb366f2b173f727b205bb825d93d2f0b286bc4e58d37693da", - deprecated=True, - ) - version( - "3.7.4", - sha256="d63e63e14e6d29e17490abbe6f7d17afb3db182dbd801229f14e55f4157c4ba3", - deprecated=True, - ) - version( - "3.7.3", - sha256="d62e3015f2f89c970ac52343976b406694931742fbde2fed8d1ce8ebb4e1f8ff", - deprecated=True, - ) - version( - "3.7.2", - sha256="f09d83c773b9cc72421abba2c317e4e6e05d919f9bcf34468e192b6a6c8e328d", - deprecated=True, - ) - version( - "3.7.1", - sha256="36c1b81ac29d0f8341f727ef40864d99d8206897be96be73dc34d4739c9c9f06", - deprecated=True, - ) - version( - "3.7.0", - sha256="85bb9feb6863e04fb1700b018d9d42d1caac178559ffa453d7e6a436e259fd0d", - deprecated=True, - ) + with default_args(deprecated=True): + version( + "3.7.17", sha256="fd50161bc2a04f4c22a0971ff0f3856d98b4bf294f89740a9f06b520aae63b49" + ) + version( + "3.6.15", sha256="54570b7e339e2cfd72b29c7e2fdb47c0b7b18b7412e61de5b463fc087c13b043" + ) depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated @@ -298,6 +215,11 @@ class Python(Package): depends_on("tix", when="+tix") depends_on("libxcrypt", when="+crypt") + patch( + "https://bugs.python.org/file44413/alignment.patch", + when="@3.6", + sha256="d39bacde16128f380933992ea7f237ac8f70f9cdffb40c051aca3be46dc29bdf", + ) # 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 |