summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorValentin Volkl <valentin.volkl@cern.ch>2021-03-21 18:42:13 +0100
committerGitHub <noreply@github.com>2021-03-21 12:42:13 -0500
commite56e72d910077ca4e8e262388f71c6b33745ade9 (patch)
tree60bf3865821be2f08c18dd4f29983c36aed0083a /var
parent718e65492e8e03524e525b4fd0719eb9a266a4cd (diff)
downloadspack-e56e72d910077ca4e8e262388f71c6b33745ade9.tar.gz
spack-e56e72d910077ca4e8e262388f71c6b33745ade9.tar.bz2
spack-e56e72d910077ca4e8e262388f71c6b33745ade9.tar.xz
spack-e56e72d910077ca4e8e262388f71c6b33745ade9.zip
[py-awkward1] add dlpack dependency (#22220)
* [py-awkward1] add dlpack dependency * [py-awkward] rename package * [py-awkward] address comments from [22220] * [py-awkward] address comments from [22220]
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-awkward/package.py29
-rw-r--r--var/spack/repos/builtin/packages/py-awkward/pybind11.patch14
-rw-r--r--var/spack/repos/builtin/packages/py-awkward1/package.py11
3 files changed, 49 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/py-awkward/package.py b/var/spack/repos/builtin/packages/py-awkward/package.py
new file mode 100644
index 0000000000..278783dc6d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-awkward/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2021 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)
+
+from spack import *
+
+
+class PyAwkward(PythonPackage):
+ """Manipulate JSON-like data with NumPy-like idioms."""
+
+ git = "https://github.com/scikit-hep/awkward-1.0.git"
+ pypi = "awkward/awkward-1.1.2.tar.gz"
+ homepage = "https://awkward-array.org"
+
+ maintainers = ['vvolkl']
+
+ version('1.1.2', sha256='4ae8371d9e6d5bd3e90f3686b433cebc0541c88072655d2c75ec58e79b5d6943')
+
+ patch('pybind11.patch')
+
+ depends_on('py-setuptools', type='build')
+
+ depends_on('python@3.6:', type=('build', 'run'))
+ depends_on('py-numpy@1.13.1:', type=('build', 'run'))
+ depends_on('py-pybind11', type=('build', 'link'))
+ depends_on('dlpack', when="@1.0.0:")
+ depends_on('rapidjson')
+ depends_on('cmake', type='build')
diff --git a/var/spack/repos/builtin/packages/py-awkward/pybind11.patch b/var/spack/repos/builtin/packages/py-awkward/pybind11.patch
new file mode 100644
index 0000000000..8edc76919f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-awkward/pybind11.patch
@@ -0,0 +1,14 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fedfe3a..bf762c9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -107,7 +107,7 @@ addtest(test0074 tests/test_0074-argsort-and-sort-rawarray.cpp)
+
+ # Third tier: Python modules.
+ if (PYBUILD)
+- add_subdirectory(pybind11)
++ find_package(pybind11)
+
+ file(GLOB LAYOUT_SOURCES "src/python/*.cpp")
+ pybind11_add_module(_ext ${LAYOUT_SOURCES})
+
diff --git a/var/spack/repos/builtin/packages/py-awkward1/package.py b/var/spack/repos/builtin/packages/py-awkward1/package.py
index 9e6a3fec7e..be14c4d815 100644
--- a/var/spack/repos/builtin/packages/py-awkward1/package.py
+++ b/var/spack/repos/builtin/packages/py-awkward1/package.py
@@ -7,7 +7,7 @@ from spack import *
class PyAwkward1(PythonPackage):
- """ROOT I/O in pure Python and NumPy."""
+ """DEPRECATED! This package was renamed to py-awkward."""
git = "https://github.com/scikit-hep/awkward-1.0.git"
url = "https://github.com/scikit-hep/awkward-1.0/archive/0.3.1.tar.gz"
@@ -15,15 +15,16 @@ class PyAwkward1(PythonPackage):
maintainers = ['vvolkl']
- version('1.1.2', sha256='626e3a6a2a92dd67abc8692b1ebfa1b447b9594352d6ce8c86c37d7299dc4602')
- version('0.3.1', sha256='7126d9feab8828b0b4f4c6dbc9e28c269a91e28eef4a6033d7ebb5db21f1dab3')
+ version('1.1.2', sha256='626e3a6a2a92dd67abc8692b1ebfa1b447b9594352d6ce8c86c37d7299dc4602', deprecated=True)
+ version('0.3.1', sha256='7126d9feab8828b0b4f4c6dbc9e28c269a91e28eef4a6033d7ebb5db21f1dab3', deprecated=True)
patch('pybind11.patch')
depends_on('py-setuptools', type='build')
depends_on('python@3.6:', type=('build', 'run'))
- depends_on('py-numpy@1.13.1:')
- depends_on('py-pybind11')
+ depends_on('py-numpy@1.13.1:', type=('build', 'run'))
+ depends_on('py-pybind11', type=('build', 'link'))
+ depends_on('dlpack', when="@1.0.0:")
depends_on('rapidjson')
depends_on('cmake', type='build')