diff --git a/spack.yaml b/spack.yaml index c89c362c76aafd3c431ca3174b2e6fa37147b0ba..87463ffcdceebf59f162baa761df606917b24ca7 100644 --- a/spack.yaml +++ b/spack.yaml @@ -22,7 +22,7 @@ spack: - hepmc3@3.2.4 +python +rootio - stow@2.3.1 - cairo@1.16.0 +fc+ft+X+pdf+gobject - - podio@0.13.1 build_type=RelWithDebInfo + - podio@0.14 build_type=RelWithDebInfo - geant4@10.7.1 cxxstd=17 +opengl +vecgeom +x11 +qt +threads ^qt +opengl - dd4hep@1.18 +geant4 +assimp +hepmc3 +ipo +lcio - acts@14.1.0 +dd4hep +digitization +identification +json +tgeo +ipo +examples +fatras +geant4 diff --git a/spack/packages/podio/package.py b/spack/packages/podio/package.py index 322175f8eb878000888f82312ae9158f29362aa6..8d33b9abb7e9dea0abbef5f9db073844248fdf1b 100644 --- a/spack/packages/podio/package.py +++ b/spack/packages/podio/package.py @@ -17,6 +17,8 @@ class Podio(CMakePackage): tags = ["hep", "key4hep"] version('master', branch='master') + version('0.14', sha256='47f99f1190dc71d6deb52a2b1831250515dbd5c9e0f263c3c8553ffc5b260dfb') + version('0.13.2', sha256='645f6915ca6f34789157c0a9dc8b0e9ec901e019b96eb8a68fb39011602e92eb') version('0.13.1', sha256='2ae561c2a0e46c44245aa2098772374ad246c9fcb1956875c95c69c963501353') version('0.13', sha256='e9cbd4e25730003d3706ad82e28b15cb5bdc524a78b0a26e90b89ea852101498') version('0.12', sha256='1729a2ce21e8b307fc37dfb9a9f5ae031e9f4be4992385cf99dba3e5fdf5323a') @@ -26,20 +28,17 @@ class Podio(CMakePackage): version('0.9', sha256='3cde67556b6b76fd2d004adfaa3b3b6173a110c0c209792bfdb5f9353e21076f') version('0.8', sha256='9d035a7f5ebfae5279a17405003206853271af692f762e2bac8e73825f2af327') - variant('build_type', default='Release', - description='The build type to build', - values=('Debug', 'RelWithDebInfo', 'MinSizeRel', 'Release')) - variant('sio', default=False, description='Build the SIO I/O backend') # cpack config throws an error on some systems patch('cpack.patch', when="@:0.10.0") patch('dictloading.patch', when="@0.10.0") + patch('python-tests.patch', when='@:0.14.0') # issue with build braking for spack as the search-and-replace for "root" # erroneously selects the all files as the build happens under /tmp/root - patch('cmake.patch', when="@0.13.1") + patch('cmake.patch', when="@0.13.1:0.14") depends_on('root@6.08.06: cxxstd=17') @@ -48,12 +47,14 @@ class Podio(CMakePackage): depends_on('py-pyyaml', type=('build', 'run')) depends_on('py-jinja2@2.10.1:', type=('build', 'run'), when='@0.12.0:') depends_on('sio', type=('build', 'link'), when='+sio') + depends_on('catch2@3.0.1:', type=('test'), when="@0.13:") conflicts('+sio', when='@:0.12', msg='sio support requires at least podio@0.13') def cmake_args(self): args = [ - self.define_from_variant('ENABLE_SIO', 'sio') + self.define_from_variant('ENABLE_SIO', 'sio'), + self.define("BUILD_TESTING", self.run_tests), ] return args diff --git a/spack/packages/podio/python-tests.patch b/spack/packages/podio/python-tests.patch new file mode 100644 index 0000000000000000000000000000000000000000..06d14c6e61a7112484ae5b395df126e66d83010e --- /dev/null +++ b/spack/packages/podio/python-tests.patch @@ -0,0 +1,12 @@ +index 5b6e13e..ac9ccf5 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -106,7 +106,7 @@ endif() + add_test( NAME pyunittest COMMAND python -m unittest discover -s ${CMAKE_SOURCE_DIR}/python) + set_property(TEST pyunittest + PROPERTY ENVIRONMENT +- LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_BINARY_DIR}/src:$ENV{LD_LIBRARY_PATH} ++ LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_BINARY_DIR}/src:$<TARGET_FILE_DIR:ROOT::Tree> + PYTHONPATH=${CMAKE_SOURCE_DIR}/python:$ENV{PYTHONPATH} + ROOT_INCLUDE_PATH=${CMAKE_SOURCE_DIR}/tests/datamodel:${ROOT_INCLUDE_PATH}) + set_property(TEST pyunittest PROPERTY DEPENDS write)