Name: python-uharfbuzz Version: 0.45.0 Release: %autorelease Summary: Streamlined Cython bindings for the harfbuzz shaping engine License: Apache-2.0 # The entire source is Apache-2.0, except for test fonts that are not bundled # in the binary RPMs and do not contribute to their licenses. # # Apache-2.0, tests/data/LICENSE_OpenSans.txt: # - tests/data/OpenSans.subset.ttf # MIT, tests/data/LICENSE_MutatorSans.txt: # - tests/data/MutatorSans-VF.subset.ttf # MIT, tests/data/LICENSE_ChromaCheck_colr.txt (added by patch) # - tests/data/chromacheck-colr.ttf # OFL-1.1, tests/data/LICENSE_AdobeBlank.txt: # - tests/data/AdobeBlank.fea # - tests/data/AdobeBlank.subset.ttf # OFL-1.1, tests/data/LICENSE_StixTwoMath.txt (added by patch) # - tests/data/STIXTwoMath-Regular.ttf # # Some test fonts have been filtered out of the source because we could not # determine what their licenses were. SourceLicense: %{license} AND MIT AND OFL-1.1 URL: https://github.com/harfbuzz/uharfbuzz # Since harfbuzz is bundled via a git submodule, packaging from the GitHub # archive rather than the PyPI sdist is advantageous: the source does not # contain the bundled harfbuzz at all. # # We still must use a filtered source tarball, obtained by (see Source1): # # ./get_source %%{version} # # This is required because there are a few test fonts for which we cannot # determine the applicable licenses: # # UNKNOWN, introduced in https://github.com/harfbuzz/uharfbuzz/pull/84: # - tests/data/SparseFont.ttf # UNKNOWN, introduced in # https://github.com/harfbuzz/uharfbuzz/commit/5a80c3eaeea58d36b15a76dba45639294e0200ce, # taken from Harfbuzz where they were introduced in # https://github.com/harfbuzz/harfbuzz/commit/30a6fd04d00624129b13b20fb755d6c1c4982637, # but their ultimate provenance is unclear: # - tests/data/noto_handwriting-cff2_colr_1.otf # - tests/data/test_glyphs-glyf_colr_1.ttf # Source0: %%{url}/archive/v%%{version}/uharfbuzz-%%{version}.tar.gz Source0: uharfbuzz-%{version}-filtered.tar.gz Source1: get_source BuildRequires: python3-devel BuildRequires: gcc-c++ BuildRequires: pkgconfig(harfbuzz-subset) %global common_description %{expand: %{summary}.} %description %{common_description} %package -n python3-uharfbuzz Summary: %{summary} %description -n python3-uharfbuzz %{common_description} %prep %autosetup -n uharfbuzz-%{version} # Remove Cythonized C++ sources (if any remain): # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_using_cython find . -type f -exec grep -FrinIl 'Generated by Cython' '{}' '+' | xargs -r -t rm -v %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' export USE_SYSTEM_LIBS=1 %pyproject_buildrequires -t %build export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' export USE_SYSTEM_LIBS=1 %pyproject_wheel %install %pyproject_install %pyproject_save_files -l uharfbuzz %check # Requires SparseFont.ttf, omitted from the source archive, via the sparsefont # fixture: k="${k-}${k+ and }not test_sparsefont_coretext" # Requires noto_handwriting-cff2_colr_1.otf and test_glyphs-glyf_colr_1.ttf, # omitted from the source archive: k="${k-}${k+ and }not test_paint" # Require test_glyphs-glyf_colr_1.ttf, omitted from the source archive, via the # colorv1font fixture: k="${k-}${k+ and }not test_color_palettes" k="${k-}${k+ and }not test_color_palette_color_get_name_id" k="${k-}${k+ and }not test_has_color_paint" k="${k-}${k+ and }not test_glyph_has_color_paint" k="${k-}${k+ and }not TestOTColor" %tox -- -- -k "${k-}" -v %files -n python3-uharfbuzz -f %{pyproject_files} %doc README.md %changelog %autochangelog