import python-pyzstd-0.15.10-1.el9

i9cf changed/i9cf/python-pyzstd-0.15.10-1.el9
Sergey Cherevko 7 months ago
commit fb7ebbd55c
Signed by: scherevko
GPG Key ID: D87CBBC16D2E4A72

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/pyzstd-0.15.10.tar.gz

@ -0,0 +1 @@
0a548fd4d24f7fcc018e9d49de9a621bc3c63967 SOURCES/pyzstd-0.15.10.tar.gz

@ -0,0 +1,3 @@
# python-pyzstd
The python-pyzstd package

@ -0,0 +1,30 @@
From 467bd72ad4caadc1b006fc913452b3598c369b73 Mon Sep 17 00:00:00 2001
From: Maxwell G <maxwell@gtmx.me>
Date: Sun, 7 Apr 2024 00:29:36 +0000
Subject: [PATCH] pyzstd_pep517: name config_settings argument correctly
Ref: https://peps.python.org/pep-0517/#get-requires-for-build-wheel
---
build_script/pyzstd_pep517.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/build_script/pyzstd_pep517.py b/build_script/pyzstd_pep517.py
index cea7c94..7b4b3f8 100644
--- a/build_script/pyzstd_pep517.py
+++ b/build_script/pyzstd_pep517.py
@@ -1,10 +1,10 @@
from setuptools import build_meta as _orig
from setuptools.build_meta import *
-def get_requires_for_build_wheel(cfg=None):
+def get_requires_for_build_wheel(config_settings=None):
requires = []
- if isinstance(cfg, dict) and '--build-option' in cfg:
- v = cfg['--build-option']
+ if isinstance(config_settings, dict) and '--build-option' in config_settings:
+ v = config_settings['--build-option']
if isinstance(v, (str, list)) and '--cffi' in v:
requires.append('cffi')
- return _orig.get_requires_for_build_wheel(cfg) + requires
\ No newline at end of file
+ return _orig.get_requires_for_build_wheel(config_settings) + requires

@ -0,0 +1,75 @@
%bcond tests 1
%global forgeurl https://github.com/Rogdham/pyzstd
%define tag %{version}
Name: python-pyzstd
Version: 0.15.10
%forgemeta
Release: 1%{?dist}
Summary: Python bindings to Zstandard (zstd) compression library
License: BSD-3-Clause
URL: %{forgeurl}
Source: %{forgesource}
# pyzstd_pep517: name config_settings argument correctly (#2)
# pyproject-rpm-macros' config_settings support passes it as a kwarg
Patch: %{url}/pull/2.patch#/config_settings-fix.patch
BuildRequires: gcc
BuildRequires: python3-devel
BuildRequires: libzstd-devel
%if %{with tests}
BuildRequires: %{py3_dist pytest}
%endif
%global _description %{expand:
Pyzstd module provides classes and functions for compressing and decompressing
data, using Facebooks Zstandard (or zstd as short name) algorithm.}
%description %_description
%package -n python3-pyzstd
Summary: %{summary}
%description -n python3-pyzstd %_description
%prep
%autosetup -p1 %{forgesetupargs}
# Ensure dynamic-link-zstd is always used
sed -i 's|DYNAMIC_LINK =.*|DYNAMIC_LINK = True|' setup.py
# Stop disabling debuginfo
sed -i "s|'-g0', ||" setup.py
# Fix non-executable-script rpmlint error
sed -i -e '1{\@^#!.*@d}' src/__main__.py
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files pyzstd
%check
%pytest
%files -n python3-pyzstd -f %{pyproject_files}
%doc README.rst
%license LICENSE
%changelog
* Thu Jul 18 2024 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 0.15.10-1
- Rebuilt for MSVSphere 9.4
* Sun Apr 07 2024 Maxwell G <maxwell@gtmx.me> - 0.15.10-1
- Initial package (rhbz#2273823).
Loading…
Cancel
Save