forked from pool/python-cramjam
Accepting request 1147537 from home:badshah400:branches:devel:languages:python
* Update to version 2.8.1. * pyrus-cramjam is now simply cramjam; adapt to name change in spec and _service file. * Drop cargo_config: Updated rust packaging services include it in vendor.tar.xz. * Split out test into multibuild flavor since it takes a long time to run (about an hour). OBS-URL: https://build.opensuse.org/request/show/1147537 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cramjam?expand=0&rev=9
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-cramjam
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# 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
|
||||
@@ -16,25 +16,38 @@
|
||||
#
|
||||
|
||||
|
||||
# Adjust the version in _service and use `rm -rf pyrus-cramjam; osc service runall` in order to update
|
||||
Name: python-cramjam
|
||||
Version: 2.6.2
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%bcond_without test
|
||||
%define psuffix -test
|
||||
%else
|
||||
%bcond_with test
|
||||
%define psuffix %{nil}
|
||||
%endif
|
||||
|
||||
# Adjust the version in _service and use `rm -rf cramjam; osc service runall` in order to update
|
||||
%define modname cramjam
|
||||
Name: python-cramjam%{psuffix}
|
||||
Version: 2.8.1
|
||||
Release: 0
|
||||
Summary: Thin Python bindings to de/compression algorithms in Rust
|
||||
License: MIT
|
||||
URL: https://github.com/milesgranger/pyrus-cramjam
|
||||
Source: pyrus-cramjam-%{version}.tar.xz
|
||||
URL: https://github.com/milesgranger/cramjam
|
||||
Source: %{modname}-%{version}.tar.xz
|
||||
Source1: vendor.tar.xz
|
||||
Source2: cargo_config
|
||||
BuildRequires: %{python_module base >= 3.7}
|
||||
BuildRequires: %{python_module maturin >= 0.13}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: cargo-packaging
|
||||
BuildRequires: python-rpm-macros
|
||||
# SECTION test dependencies
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module %{modname} = %{version}}
|
||||
BuildRequires: %{python_module hypothesis}
|
||||
BuildRequires: %{python_module memory_profiler}
|
||||
BuildRequires: %{python_module numpy}
|
||||
BuildRequires: %{python_module pytest}
|
||||
%endif
|
||||
# /SECTION
|
||||
BuildRequires: fdupes
|
||||
%python_subpackages
|
||||
@@ -44,22 +57,32 @@ Extremely thin Python bindings to de/compression algorithms in Rust.
|
||||
Allows for using algorithms such as Snappy, without any system dependencies.
|
||||
|
||||
%prep
|
||||
%setup -q -n pyrus-cramjam-%{version} -a1
|
||||
cp %{SOURCE2} .cargo/config
|
||||
%setup -q -n %{modname}-%{version} -a1
|
||||
|
||||
%build
|
||||
%if %{without test}
|
||||
pushd %{modname}-python
|
||||
%pyproject_wheel
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if %{without test}
|
||||
pushd %{modname}-python
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
pushd %{modname}-python
|
||||
%pytest_arch --ignore benchmarks
|
||||
%endif
|
||||
|
||||
%if %{without test}
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%{python_sitearch}/cramjam
|
||||
%{python_sitearch}/cramjam-%{version}.dist-info
|
||||
%{python_sitearch}/%{modname}
|
||||
%{python_sitearch}/%{modname}-%{version}.dist-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user