From 1e90d857884cc98040f14ab7aa09d003a0c97155cbc217b7c9f007a46a5cb396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 6 Apr 2020 07:07:54 +0000 Subject: [PATCH] - Add patch to use sys.executable and not call py2 binary directly: * use-python-exec.patch - Update to 0.3.3: * no upstream changelog OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-fastparquet?expand=0&rev=18 --- fastparquet-0.3.2.tar.gz | 3 --- fastparquet-0.3.3.tar.gz | 3 +++ python-fastparquet.changes | 12 ++++++++++++ python-fastparquet.spec | 32 +++++++++++++------------------- use-python-exec.patch | 21 +++++++++++++++++++++ 5 files changed, 49 insertions(+), 22 deletions(-) delete mode 100644 fastparquet-0.3.2.tar.gz create mode 100644 fastparquet-0.3.3.tar.gz create mode 100644 use-python-exec.patch diff --git a/fastparquet-0.3.2.tar.gz b/fastparquet-0.3.2.tar.gz deleted file mode 100644 index a4d5320..0000000 --- a/fastparquet-0.3.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b09526e6bc773980215a1581a7c2b97a71e47b78ef196baf1fa748d24d33c2a4 -size 28913056 diff --git a/fastparquet-0.3.3.tar.gz b/fastparquet-0.3.3.tar.gz new file mode 100644 index 0000000..ce5c9a1 --- /dev/null +++ b/fastparquet-0.3.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c13bb15375d97e1f5f5d71731a3e8739cae9de9fc446cdfaec135a2ae93c1cd4 +size 28912181 diff --git a/python-fastparquet.changes b/python-fastparquet.changes index 2c7bb02..d0c43a1 100644 --- a/python-fastparquet.changes +++ b/python-fastparquet.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Apr 6 06:54:36 UTC 2020 - Tomáš Chvátal + +- Add patch to use sys.executable and not call py2 binary directly: + * use-python-exec.patch + +------------------------------------------------------------------- +Mon Apr 6 06:50:26 UTC 2020 - Tomáš Chvátal + +- Update to 0.3.3: + * no upstream changelog + ------------------------------------------------------------------- Fri Oct 25 17:50:50 UTC 2019 - Todd R diff --git a/python-fastparquet.spec b/python-fastparquet.spec index 3867555..f583b90 100644 --- a/python-fastparquet.spec +++ b/python-fastparquet.spec @@ -1,7 +1,7 @@ # # spec file for package python-fastparquet # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,26 +17,31 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -# Test files not included -%bcond_without test %define skip_python2 1 Name: python-fastparquet -Version: 0.3.2 +Version: 0.3.3 Release: 0 Summary: Python support for Parquet file format License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/dask/fastparquet/ Source: https://github.com/dask/fastparquet/archive/%{version}.tar.gz#/fastparquet-%{version}.tar.gz +Patch0: use-python-exec.patch +BuildRequires: %{python_module Brotli} BuildRequires: %{python_module Cython} +BuildRequires: %{python_module bson} BuildRequires: %{python_module cffi >= 0.6} +BuildRequires: %{python_module lz4 >= 0.19.1 } BuildRequires: %{python_module numba >= 0.28} BuildRequires: %{python_module numpy-devel >= 1.11} BuildRequires: %{python_module pandas} BuildRequires: %{python_module pytest-runner} BuildRequires: %{python_module pytest} +BuildRequires: %{python_module python-lzo} +BuildRequires: %{python_module python-snappy} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} +BuildRequires: %{python_module thrift >= 0.11.0} +BuildRequires: %{python_module zstandard} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-numba >= 0.28 @@ -50,17 +55,6 @@ Recommends: python-lz4 >= 0.19.1 Recommends: python-python-lzo Recommends: python-python-snappy Recommends: python-zstandard -%if %{with test} -BuildRequires: %{python_module Brotli} -BuildRequires: %{python_module bson} -BuildRequires: %{python_module lz4 >= 0.19.1 } -BuildRequires: %{python_module python-lzo} -BuildRequires: %{python_module python-snappy} -BuildRequires: %{python_module thrift >= 0.11.0} -BuildRequires: %{python_module zstandard} -BuildRequires: python-funcsigs -BuildRequires: python-singledispatch -%endif %python_subpackages %description @@ -69,6 +63,7 @@ for integrating it into python-based Big Data workflows. %prep %setup -q -n fastparquet-%{version} +%patch0 -p1 %build export CFLAGS="%{optflags}" @@ -79,7 +74,6 @@ export CFLAGS="%{optflags}" %python_expand rm -v %{buildroot}%{$python_sitearch}/fastparquet/speedups.c %python_expand %fdupes %{buildroot}%{$python_sitearch} -%if %{with test} %check cp -r fastparquet/test . mv fastparquet temp @@ -89,11 +83,11 @@ export PYTHONDONTWRITEBYTECODE=1 rm -rf build _build* # Test test_time_millis fails in i586 # test_datetime_roundtrip fails due to a warning being accidentally caught by the test -pytest-%{$python_bin_suffix} test -k 'not test_time_millis and not test_datetime_roundtrip and not test_errors' +# test_import_without_warning fails due to being already imported +pytest-%{$python_bin_suffix} -v test -k 'not test_time_millis and not test_datetime_roundtrip and not test_errors and not test_import_without_warning' } mv temp fastparquet rm -rf test -%endif %files %{python_files} %doc README.rst diff --git a/use-python-exec.patch b/use-python-exec.patch new file mode 100644 index 0000000..0b8a434 --- /dev/null +++ b/use-python-exec.patch @@ -0,0 +1,21 @@ +Index: fastparquet-0.3.3/fastparquet/test/test_api.py +=================================================================== +--- fastparquet-0.3.3.orig/fastparquet/test/test_api.py ++++ fastparquet-0.3.3/fastparquet/test/test_api.py +@@ -4,6 +4,7 @@ from __future__ import unicode_literals + import io + import os + import subprocess ++import sys + from distutils.version import LooseVersion + + import numba +@@ -26,7 +27,7 @@ TEST_DATA = "test-data" + @pytest.mark.skipif(numba.__version__ <= LooseVersion("0.39.0"), reason="Warning from numba.") + def test_import_without_warning(): + # in a subprocess to avoid import chacing issues. +- subprocess.check_call(["python", "-Werror", "-c", "import fastparquet"]) ++ subprocess.check_call([sys.executable, "-Werror", "-c", "import fastparquet"]) + + + def test_statistics(tempdir):