From 0a241b241429f77b2f3ad9e3735d2cb4050686b9 Mon Sep 17 00:00:00 2001 From: ketsubouchi Date: Sun, 27 Dec 2020 21:38:54 +0900 Subject: boost: backport python3 import fix (#20301) --- var/spack/repos/builtin/packages/boost/boost_218.patch | 10 ++++++++++ var/spack/repos/builtin/packages/boost/package.py | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/boost/boost_218.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/boost/boost_218.patch b/var/spack/repos/builtin/packages/boost/boost_218.patch new file mode 100644 index 0000000000..ab4d9085f5 --- /dev/null +++ b/var/spack/repos/builtin/packages/boost/boost_218.patch @@ -0,0 +1,10 @@ +--- a/libs/python/src/numpy/numpy.cpp ++++ b/libs/python/src/numpy/numpy.cpp +@@ -19,6 +19,7 @@ static void wrap_import_array() + static void * wrap_import_array() + { + import_array(); ++ return NULL; + } + #endif + diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 858e929b67..de4791a93f 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -256,6 +256,10 @@ class Boost(Package): # See https://github.com/boostorg/build/pull/154 patch('boost_154.patch', when='@:1.63.99') + # Backport Python3 import problem + # See https://github.com/boostorg/python/pull/218 + patch('boost_218.patch', when='@:1.67.99') + def patch(self): # Disable SSSE3 and AVX2 when using the NVIDIA compiler if self.spec.satisfies('%nvhpc'): -- cgit v1.2.3-60-g2f50