aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-apache-arrow/APKBUILD
blob: 4cd7523c7ebe82959ba53a3e3108bbc6bb0c92c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
# based on arch linux PKGBUILD
pkgname=py3-apache-arrow
pkgver=7.0.0
pkgrel=0
pkgdesc="multi-language toolbox for accelerated data interchange and in-memory processing"
url="https://arrow.apache.org/"
arch="all !riscv64" # missing glog-dev
license="Apache-2.0"
makedepends="
	apache-arrow-dev
	bzip2-dev
	cython
	gtest-dev
	python3-dev
	py3-setuptools
	py3-setuptools_scm
	py3-numpy-dev
	re2-dev
	snappy-dev
	"
checkdepends="
	py3-pytest
	py3-cffi
	py3-hypothesis
	py3-pandas
	py3-pytest-lazy-fixture
	tzdata
	"
subpackages="$pkgname-dev"
source="https://downloads.apache.org/arrow/arrow-$pkgver/apache-arrow-$pkgver.tar.gz"
builddir="$srcdir/apache-arrow-$pkgver"

# s390x segaults when testing
case "$CARCH" in
	s390x) options="!check" ;;
esac

build() {
	cd python

	case "$CARCH" in
		armhf|armv7) _SIMD="NONE" ;;
		*) _SIMD="DEFAULT" ;;
	esac
	export PYARROW_WITH_PARQUET=1
	python3 setup.py build_ext --inplace --extra-cmake-args="-DARROW_SIMD_LEVEL=$_SIMD"
}

check() {
	# test_memory.py test is jemalloc
	# other tests are various platforms
	cd python
	python3 setup.py install --root="test_install"
	export PYTHONPATH="$(echo $PWD/test_install/usr/lib/python3*/site-packages)"
	pytest pyarrow --deselect=pyarrow/tests/test_memory.py \
		--deselect=pyarrow/tests/test_csv.py \
		--deselect=pyarrow/tests/parquet/test_data_types.py \
		--deselect=pyarrow/tests/test_array.py::test_dictionary_to_numpy \
		--deselect=pyarrow/tests/test_io.py::test_python_file_large_seeks \
		--deselect=pyarrow/tests/test_io.py::test_foreign_buffer \
		--deselect=pyarrow/tests/test_io.py::test_memory_map_large_seeks \
		--deselect=pyarrow/tests/test_pandas.py::TestConvertStructTypes::test_from_numpy_nested \
		--deselect=pyarrow/tests/test_schema.py::test_schema_sizeof \
		--deselect=pyarrow/tests/test_serialization.py::test_primitive_serialization \
		--deselect=pyarrow/tests/test_serialization.py::test_integer_limits
}

package() {
	cd python
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
6727ea625b1a4dc3fd452e94ef5e8fd7a5bdebcf44b105f0ba684687cf126163317caef9e91cfd3722a8defca1f0295741ed0dde2393e85d15559bddd7ecb9a2  apache-arrow-7.0.0.tar.gz
"