py-pyarrow: new package (#9416)
arrow: add missing dependency for python build The Parquet library moved into the Arrow organisation, hence add a parquet flavor and adapt dependencies.
This commit is contained in:
parent
6738352700
commit
8767167c79
@ -15,12 +15,15 @@ class Arrow(CMakePackage):
|
|||||||
homepage = "http://arrow.apache.org"
|
homepage = "http://arrow.apache.org"
|
||||||
url = "https://github.com/apache/arrow/archive/apache-arrow-0.9.0.tar.gz"
|
url = "https://github.com/apache/arrow/archive/apache-arrow-0.9.0.tar.gz"
|
||||||
|
|
||||||
|
version('0.11.0', '0ac629a7775d86108e403eb66d9f1a3d3bdd6b3a497a86228aa4e8143364b7cc')
|
||||||
version('0.9.0', 'ebbd36c362b9e1d398ca612f6d2531ec')
|
version('0.9.0', 'ebbd36c362b9e1d398ca612f6d2531ec')
|
||||||
version('0.8.0', '56436f6f61ccc68686b7e0ea30bf4d09')
|
version('0.8.0', '56436f6f61ccc68686b7e0ea30bf4d09')
|
||||||
|
|
||||||
depends_on('boost@1.60:')
|
depends_on('boost@1.60:')
|
||||||
depends_on('cmake@3.2.0:', type='build')
|
depends_on('cmake@3.2.0:', type='build')
|
||||||
depends_on('flatbuffers@1.8.0 build_type=Release') # only Release contains flatc
|
depends_on('flatbuffers@1.8.0 build_type=Release') # only Release contains flatc
|
||||||
|
depends_on('python', when='+python')
|
||||||
|
depends_on('py-numpy', when='+python')
|
||||||
depends_on('rapidjson')
|
depends_on('rapidjson')
|
||||||
depends_on('snappy~shared')
|
depends_on('snappy~shared')
|
||||||
depends_on('zlib+pic')
|
depends_on('zlib+pic')
|
||||||
@ -29,6 +32,8 @@ class Arrow(CMakePackage):
|
|||||||
variant('build_type', default='Release',
|
variant('build_type', default='Release',
|
||||||
description='CMake build type',
|
description='CMake build type',
|
||||||
values=('Debug', 'FastDebug', 'Release'))
|
values=('Debug', 'FastDebug', 'Release'))
|
||||||
|
variant('python', default=False, description='Build Python interface')
|
||||||
|
variant('parquet', default=False, description='Build Parquet interface')
|
||||||
|
|
||||||
root_cmakelists_dir = 'cpp'
|
root_cmakelists_dir = 'cpp'
|
||||||
|
|
||||||
@ -48,6 +53,10 @@ def cmake_args(self):
|
|||||||
"-DARROW_WITH_BROTLI=OFF",
|
"-DARROW_WITH_BROTLI=OFF",
|
||||||
"-DARROW_WITH_LZ4=OFF",
|
"-DARROW_WITH_LZ4=OFF",
|
||||||
]
|
]
|
||||||
|
if self.spec.satisfies('+python'):
|
||||||
|
args.append("-DARROW_PYTHON:BOOL=ON")
|
||||||
|
if self.spec.satisfies('+parquet'):
|
||||||
|
args.append("-DARROW_PARQUET:BOOL=ON")
|
||||||
for dep in ('flatbuffers', 'rapidjson', 'snappy', 'zlib', 'zstd'):
|
for dep in ('flatbuffers', 'rapidjson', 'snappy', 'zlib', 'zstd'):
|
||||||
args.append("-D{0}_HOME={1}".format(dep.upper(),
|
args.append("-D{0}_HOME={1}".format(dep.upper(),
|
||||||
self.spec[dep].prefix))
|
self.spec[dep].prefix))
|
||||||
|
37
var/spack/repos/builtin/packages/py-pyarrow/package.py
Normal file
37
var/spack/repos/builtin/packages/py-pyarrow/package.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Copyright 2013-2018 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 PyPyarrow(PythonPackage):
|
||||||
|
"""A cross-language development platform for in-memory data.
|
||||||
|
|
||||||
|
This package contains the Python bindings.
|
||||||
|
"""
|
||||||
|
|
||||||
|
homepage = "http://arrow.apache.org"
|
||||||
|
url = "https://pypi.org/packages/source/p/pyarrow/pyarrow-0.9.0.tar.gz"
|
||||||
|
|
||||||
|
version('0.11.0', sha256='07a6fd71c5d7440f2c42383dd2c5daa12d7f0a012f1e88288ed08a247032aead')
|
||||||
|
version('0.9.0', sha256='7db8ce2f0eff5a00d6da918ce9f9cfec265e13f8a119b4adb1595e5b19fd6242')
|
||||||
|
|
||||||
|
variant('parquet', default=False, description="Build with Parquet support")
|
||||||
|
|
||||||
|
depends_on('cmake@3.0.0:', type='build')
|
||||||
|
depends_on('pkg-config', type='build')
|
||||||
|
depends_on('py-setuptools', type='build')
|
||||||
|
depends_on('py-cython', type='build')
|
||||||
|
|
||||||
|
depends_on('arrow+python')
|
||||||
|
depends_on('arrow+parquet+python', when='+parquet')
|
||||||
|
|
||||||
|
phases = ['build_ext', 'install']
|
||||||
|
|
||||||
|
def build_ext_args(self, spec, prefix):
|
||||||
|
args = []
|
||||||
|
if spec.satisfies('+parquet'):
|
||||||
|
args.append('--with-parquet')
|
||||||
|
return args
|
Loading…
Reference in New Issue
Block a user