15
0
Files
python-fastavro/python-fastavro.spec

81 lines
2.3 KiB
RPMSpec

#
# spec file for package python-fastavro
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?sle15_python_module_pythons}
Name: python-fastavro
Version: 1.9.7
Release: 0
Summary: Fast read/write of AVRO files
License: MIT
URL: https://github.com/fastavro/fastavro
Source: https://files.pythonhosted.org/packages/source/f/fastavro/fastavro-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
# SECTION test requirements
BuildRequires: %{python_module lz4}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pandas}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module zlib-ng}
BuildRequires: %{python_module zstandard}
# /SECTION
BuildRequires: fdupes
Suggests: python-cramjam
Suggests: python-zstandard
Suggests: python-lz4
Suggests: python-lz4
Suggests: python-cramjam
Suggests: python-zstandard
%python_subpackages
%description
Fast read/write of AVRO files
%prep
%setup -q -n fastavro-%{version}
%build
export CFLAGS="%{optflags}"
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/fastavro
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
donttest="test_optional_codecs[snappy]"
donttest+=" or test_optional_codecs_not_installed_reading[snappy]"
%pytest -k "not ($donttest)"
%post
%python_install_alternative fastavro
%postun
%python_uninstall_alternative fastavro
%files %{python_files}
%doc ChangeLog README.md
%license LICENSE
%python_alternative %{_bindir}/fastavro
%{python_sitearch}/*
%changelog