%global srcname zipstream-ng %global _description %{expand:A modern and easy to use streamable zip file generator. It can package and stream many files and folders on the fly without needing temporary files or excessive memory. Includes the ability to calculate the total size of the stream before any data is actually added (provided no compression is used). This makes it ideal for use in web applications since the total size can be used to set the Content-Length header without having to generate the entire file first (see examples below).} Name: python-%{srcname} Version: 1.5.0 Release: 1%{?dist} Summary: A modern and easy to use streamable zip file generator License: LGPL-3.0-only URL: https://github.com/pR0Ps/%{srcname}/ Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz BuildRequires: python3-devel BuildArch: noarch %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{_description} %prep %autosetup -n %{srcname}-%{version} # Remove shebangs for i in zipstream/*.py; do sed '1{\@^#!/usr/bin/env python@d}' $i >$i.new && touch -r $i $i.new && mv $i.new $i done %generate_buildrequires %pyproject_buildrequires -r -x tests %build %pyproject_wheel %install %pyproject_install %pyproject_save_files zipstream %check %pytest %files -n python3-%{srcname} -f %{pyproject_files} %doc CHANGELOG.md README.md %license LICENSE %{_bindir}/zipserver %changelog * Sat Apr 15 2023 Mohamed El Morabity - 1.5.0-1 - Update to 1.5.0 * Mon Jan 02 2023 Mohamed El Morabity - 1.3.54-1 - Initial RPM release