## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 11; 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 Name: python-opentype-sanitizer # Historically, the upstream version was kept in sync with opentype-sanitizer # (https://github.com/khaledhosny/ots), which is normally built and bundled as # part of the Python wheel build. # # Since this project was archived upstream and is now unmaintained, we cannot # keep it updated and must switch to bundling the appropriate # opentype-sanitizer sources so that opentype-sanitizer can still be updated. # This is a short-term band-aid for existing stable branches; going forward, # the package will simply be retired. Version: 9.1.0 Release: %autorelease Summary: Python wrapper for the OpenType Sanitizer # The entire source is BSD-3-Clause, including the bundled opentype-sanitizer # sources, except for the following files from opentype-sanitizer, which are # build-system files that do not contribute to the licenses of the binary RPMs: # subprojects/packagefiles/brotli/LICENSE.build: MIT License # subprojects/packagefiles/brotli/meson.build: MIT License # subprojects/packagefiles/woff2/LICENSE.build: MIT License # subprojects/packagefiles/woff2/meson.build: MIT License License: BSD-3-Clause URL: https://github.com/googlefonts/ots-python Source0: %{url}/archive/v%{version}/ots-python-%{version}.tar.gz # Generated with Source2 (./get_source 9.1.0) in order to filter out test # fonts, some of which are dubiously licensed. Source1: ots-9.1.0.tar.xz # Script to filter out test fonts from Source1: Source2: get_source # Downstream-only: get the bundled opentype-sanitizer from the working # directory instead of downloading it. Patch: opentype-sanitizer-9.1.0-no-download.patch # Downstream-only: do not strip the bundled opentype-sanitizer executable Patch: opentype-sanitizer-9.1.0-no-strip.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: python3-devel # For the bundled opentype-sanitizer: BuildRequires: meson BuildRequires: ninja-build BuildRequires: gcc-c++ BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(libwoff2dec) BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(gtest) %global common_description %{expand: %{summary}.} %description %{common_description} %package -n python3-opentype-sanitizer Summary: %{summary} # The package was renamed due to PyPI parity requirements. Provide a compatible # upgrade path. We must do this for three releases. Since the renaming occurred # prior to the release of Fedora 36, we can remove this after Fedora 38 reaches # end-of-life. Obsoletes: python3-ots < 8.2.1-9 Provides: python3-ots = %{version}-%{release} # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides_for_importable_modules %py_provides python3-ots Provides: bundled(opentype-sanitizer) = %{version} %description -n python3-opentype-sanitizer %{common_description} %prep %autosetup -n ots-python-%{version} -p1 ln -s '%{SOURCE1}' # Since we use a modified (filtered) source archive, we must update the # expected checksum. sed -r -i "s/(sha256 = )[[:xdigit:]]{64}/\\1$( sha256sum -b '%{SOURCE1}' | awk '{print $1}' )/" setup.cfg %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}' %pyproject_install %pyproject_save_files -l ots %check %pytest %files -n python3-opentype-sanitizer -f %{pyproject_files} %doc README.md %changelog ## START: Generated by rpmautospec * Thu Oct 03 2024 Benjamin A. Beasley - 9.1.0-11 - Bundle opentype-sanitizer so we can update it separately * Fri Jul 19 2024 Fedora Release Engineering - 9.1.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 07 2024 Python Maint - 9.1.0-9 - Rebuilt for Python 3.13 * Fri Jan 26 2024 Fedora Release Engineering - 9.1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 9.1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Dec 18 2023 Benjamin A. Beasley - 9.1.0-4 - Assert that %%pyproject_files contains a license file * Fri Jul 21 2023 Fedora Release Engineering - 9.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jun 13 2023 Python Maint - 9.1.0-2 - Rebuilt for Python 3.12 * Wed May 31 2023 Benjamin A. Beasley - 9.1.0-1 - Update to 9.1.0 * Fri Jan 20 2023 Fedora Release Engineering - 9.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Dec 20 2022 Benjamin A. Beasley - 9.0.0-2 - Leaf package: remove i686 support * Sat Sep 17 2022 Benjamin A. Beasley - 9.0.0-1 - Update to 9.0.0 (close RHBZ#2127188) * Wed Sep 14 2022 Benjamin A. Beasley - 8.2.2-1 - Update to 8.2.2 (close RHBZ#2126797) * Wed Sep 14 2022 Benjamin A. Beasley - 8.2.1-14 - Update License to SPDX * Fri Jul 22 2022 Fedora Release Engineering - 8.2.1-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 8.2.1-12 - Rebuilt for Python 3.11 * Wed Apr 20 2022 Benjamin A. Beasley - 8.2.1-11 - Drop “forge” macros, which aren’t doing much here * Wed Apr 20 2022 Benjamin A. Beasley - 8.2.1-10 - Stop numbering patches * Wed Mar 02 2022 Benjamin A. Beasley - 8.2.1-9 - Initial package (renamed python-ots; fix RHBZ#2049273) ## END: Generated by rpmautospec