## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec Name: python-vecrec Version: 0.3.0 Release: %autorelease Summary: 2D vector and rectangle library License: MIT URL: https://github.com/kxgames/vecrec Source0: %{pypi_source vecrec} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a substitute. However, the upstream # documentation sources are not really usable at this point: there are several # import errors when we try to build them, and they still have placeholder # values like “cookiecutterproject_name”. %global common_description %{expand: This package provides 2D vector and rectangle classes. These classes were written to be used in games, so they have some methods that conveniently tie into pyglet and pygame, but for the most part they are quite general and could be used for almost anything.} %description %{common_description} %package -n python3-vecrec Summary: %{summary} %description -n python3-vecrec %{common_description} %prep %autosetup -n vecrec-%{version} # Remove HTML coverage directory with bundled JavaScript and other cruft rm -rvf tests/htmlcov # Remove shebangs from modules. These are not script-like, so shebangs are # useless. The find-then-modify pattern keeps us from discarding mtimes on # any sources that do not need modification. find vecrec -type f -exec \ gawk '/^#!/ { print FILENAME }; { nextfile }' '{}' '+' | xargs -r -t sed -r -i '1{/^#!/d}' %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files vecrec %check %pytest tests %files -n python3-vecrec -f %{pyproject_files} # pyproject-rpm-macros takes care of LICENSE.txt; verify with “rpm -qL -p …” %doc README.rst %changelog * Mon Dec 27 2021 Benjamin A. Beasley 0.3.0-1 - Initial package (close RHBZ#2023407)