## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 7; 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 %global forgeurl https://github.com/googlefonts/ots-python/ Name: python-ots # Upstream version is kept in sync with opentype-sanitizer # (https://github.com/khaledhosny/ots), which is normally built and bundled as # part of the Python wheel build. Similarly, we should update this package # together with the opentype-sanitizer package in the distribution, ideally as # a multi-build update. # # See https://github.com/googlefonts/ots-python/issues/3 for the process to # update the source for a new opentype-sanitizer release; send upstream a PR if # they are lagging. Version: 8.1.4 %forgemeta Release: %autorelease Summary: Python wrapper for the OpenType Sanitizer License: BSD URL: %{forgeurl} Source0: %{forgesource} BuildArch: noarch Patch0: python-ots-8.1.4-no-bundled-executable.patch BuildRequires: python3-devel BuildRequires: opentype-sanitizer = %{version} Requires: opentype-sanitizer = %{version} %global common_description %{expand: %{summary}.} %description %{common_description} %package -n python3-ots Summary: %{summary} %description -n python3-ots %{common_description} %prep %forgeautosetup -p1 %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' %pyproject_buildrequires -x testing %build export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' %pyproject_wheel %install export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' export BINDIR=/usr/bin %pyproject_install # Fix the symlink, which was dereferenced during “wheelification”: ln -svf '%{_bindir}/ots-sanitize' '%{buildroot}%{python3_sitelib}/ots/' find '%{buildroot}' %pyproject_save_files ots %check %pytest %files -n python3-ots -f %{pyproject_files} %doc README.md %changelog * lun. déc. 27 2021 Benjamin A. Beasley 8.1.4-7 - Port to pyproject-rpm-macros * dim. sept. 12 2021 Benjamin A. Beasley 8.1.4-6 - Reduce spec file macro indirection * ven. juil. 23 2021 Fedora Release Engineering 8.1.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 8.1.4-2 - Rebuilt for Python 3.10 * Thu May 20 2021 Benjamin A. Beasley - 8.1.4-1 - Initial package