## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pypi_name puremagic Name: python-%{pypi_name} Version: 1.28 Release: %{autorelease} Summary: Pure python implementation of magic file detection %global forgeurl https://github.com/cdgriffith/puremagic %global tag %{version} %forgemeta License: MIT URL: %forgeurl Source: %forgesource BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) %global _description %{expand: Pure Python module that will identify a file based on its magic numbers. It does NOT try to match files on non-magic string. In other words it will not search for a string within a certain window of bytes like others might.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %forgeautosetup -p1 # Remove unnecessary shebangs sed -r \ -e '/^#!/d' \ -i puremagic/__init__.py puremagic/__main__.py puremagic/main.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{pypi_name} %check %pytest -v %pyproject_check_import %files -n python3-%{pypi_name} -f %{pyproject_files} %doc AUTHORS.rst CHANGELOG.md README.rst %changelog ## START: Generated by rpmautospec * Fri Nov 22 2024 Sandro - 1.28-1 - Package import ## END: Generated by rpmautospec