diff options
author | Matthias Wolf <m+git@sushinara.net> | 2018-10-24 12:53:32 +0200 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2018-10-24 12:53:32 +0200 |
commit | 8767167c79b506af4f72e13b6dfdf49f0fb178b4 (patch) | |
tree | 98d9eb6bd1a16826d8710217ce29ca9efabea003 | |
parent | 67383527009eada6cff250ea3572a81ffe501169 (diff) | |
download | spack-8767167c79b506af4f72e13b6dfdf49f0fb178b4.tar.gz spack-8767167c79b506af4f72e13b6dfdf49f0fb178b4.tar.bz2 spack-8767167c79b506af4f72e13b6dfdf49f0fb178b4.tar.xz spack-8767167c79b506af4f72e13b6dfdf49f0fb178b4.zip |
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.
-rw-r--r-- | var/spack/repos/builtin/packages/arrow/package.py | 9 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/py-pyarrow/package.py | 37 |
2 files changed, 46 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/arrow/package.py b/var/spack/repos/builtin/packages/arrow/package.py index 63d3709f15..7610d1fae0 100644 --- a/var/spack/repos/builtin/packages/arrow/package.py +++ b/var/spack/repos/builtin/packages/arrow/package.py @@ -15,12 +15,15 @@ class Arrow(CMakePackage): homepage = "http://arrow.apache.org" 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.8.0', '56436f6f61ccc68686b7e0ea30bf4d09') depends_on('boost@1.60:') depends_on('cmake@3.2.0:', type='build') 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('snappy~shared') depends_on('zlib+pic') @@ -29,6 +32,8 @@ class Arrow(CMakePackage): variant('build_type', default='Release', description='CMake build type', values=('Debug', 'FastDebug', 'Release')) + variant('python', default=False, description='Build Python interface') + variant('parquet', default=False, description='Build Parquet interface') root_cmakelists_dir = 'cpp' @@ -48,6 +53,10 @@ class Arrow(CMakePackage): "-DARROW_WITH_BROTLI=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'): args.append("-D{0}_HOME={1}".format(dep.upper(), self.spec[dep].prefix)) diff --git a/var/spack/repos/builtin/packages/py-pyarrow/package.py b/var/spack/repos/builtin/packages/py-pyarrow/package.py new file mode 100644 index 0000000000..650e209034 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pyarrow/package.py @@ -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 |