[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]
This commit is contained in:
Valentin Volkl 2021-03-21 18:42:13 +01:00 committed by GitHub
parent 718e65492e
commit e56e72d910
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 5 deletions

View File

@ -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')

View File

@ -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})

View File

@ -7,7 +7,7 @@
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')