forked from pool/python-cramjam
- Update to 2.9.1
* Add Cargo.lock and bump patch version by @milesgranger in #192 - Release 2.9.0 * Bump libcramjam/isal-rs by @milesgranger in #183 * Add cramjam.zlib, cramjam.experimental.izlib, and cramjam.experimental.ideflate by @milesgranger in #184 - Release 2.8.4 * Add cramjam.experimental.blosc2 * Add cramjam.experimental.igzip (on 64bit targets) * Add wasm32 emscripten build and test for pyodide - Release 2.8.3 * Move LZMA / XZ out of experimental to xz submodule by @milesgranger in #133 * Remove unused Cargo.lock files by @milesgranger in #149 * Fix tests that assume C char is signed by @musicinmybrain in #150 - Release 2.8.2 * Remove zstd-safe dep in libcramjam by @milesgranger in #132 * Remove relative libcramjam dep for python builds by @milesgranger in #131 * Impl eq for python Buffer by @milesgranger in #135 * Fix missing LICENSE file in cramjam-cli by @musicinmybrain in #137 * Adjust the binary name in the cramjam-cli example by @musicinmybrain in #138 * Cargo.toml: set workspace.resolver to 2 by @veprbl in #140 - Add cramjam-opensuse-config.patch: Use some system libraries and avoid static linking - Add cramjam-issue193-test_variants.patch gh#milesgranger/cramjam#193 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cramjam?expand=0&rev=13
This commit is contained in:
100
python-cramjam.spec
Normal file
100
python-cramjam.spec
Normal file
@@ -0,0 +1,100 @@
|
||||
#
|
||||
# spec file for package python-cramjam
|
||||
#
|
||||
# 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/
|
||||
#
|
||||
|
||||
|
||||
%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
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-cramjam%{psuffix}
|
||||
Version: 2.9.1
|
||||
Release: 0
|
||||
Summary: Thin Python bindings to de/compression algorithms in Rust
|
||||
License: MIT
|
||||
URL: https://github.com/milesgranger/cramjam
|
||||
Source: %{modname}-%{version}.tar.xz
|
||||
Source1: vendor.tar.xz
|
||||
# PATCH-FEATURE-OPENSUSE cramjam-opensuse-config.patch code@bnavigator.de -- Use system libraries and avoid static linking
|
||||
Patch0: cramjam-opensuse-config.patch
|
||||
# PATCH-FIX-UPSTREAM cramjam-issue193-test_variants.patch gh#milesgranger/cramjam#193
|
||||
Patch1: cramjam-issue193-test_variants.patch
|
||||
BuildRequires: %{python_module base >= 3.8}
|
||||
BuildRequires: %{python_module maturin >= 0.13}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: cargo-packaging
|
||||
BuildRequires: cmake
|
||||
BuildRequires: libtool
|
||||
BuildRequires: nasm
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: pkgconfig(blosc2)
|
||||
BuildRequires: pkgconfig(libisal)
|
||||
BuildRequires: pkgconfig(libzstd)
|
||||
# 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-xdist}
|
||||
BuildRequires: %{python_module pytest}
|
||||
%endif
|
||||
# /SECTION
|
||||
BuildRequires: fdupes
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Extremely thin Python bindings to de/compression algorithms in Rust.
|
||||
Allows for using algorithms such as Snappy, without any system dependencies.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{modname}-%{version} -a1
|
||||
|
||||
%build
|
||||
%if %{without test}
|
||||
export ZSTD_SYS_USE_PKG_CONFIG=1
|
||||
%pyproject_wheel
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if %{without test}
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
%pytest_arch -n auto --ignore benchmarks
|
||||
%endif
|
||||
|
||||
%if %{without test}
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%{python_sitearch}/%{modname}
|
||||
%{python_sitearch}/%{modname}-%{version}.dist-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user