|
|
700c000 |
%global srcname cffsubr
|
|
|
700c000 |
|
|
|
700c000 |
Name: python-%{srcname}
|
|
|
1f71f6a |
Version: 0.2.9.post1
|
|
|
b8ae122 |
Release: 8%{?dist}
|
|
|
700c000 |
Summary: Standalone CFF subroutinizer based on the AFDKO tx tool
|
|
|
700c000 |
|
|
|
b3ffe1a |
# The entire source is Apache-2.0, except:
|
|
|
b3ffe1a |
# - These are derived from fonts licened OFL-1.1, but are not packaged, so they
|
|
|
b3ffe1a |
# do not contribute to the licenses of the binary RPMs:
|
|
|
b3ffe1a |
# • tests/data/SourceSansPro-Regular.subset.ttx
|
|
|
b3ffe1a |
# • tests/data/SourceSansVariable-Regular.subset.ttx
|
|
|
fcfee78 |
# See NOTICE.
|
|
|
b3ffe1a |
License: Apache-2.0
|
|
|
700c000 |
URL: https://pypi.org/project/%{srcname}
|
|
|
1f71f6a |
Source0: %{pypi_source %{srcname}}
|
|
|
fcfee78 |
# Written for Fedora in groff_man(7) format based on the output of “cffsubr --help”
|
|
|
fcfee78 |
Source1: %{srcname}.1
|
|
|
700c000 |
|
|
|
ec90fcd |
# Handle importlib.resources.path removal in Python 3.13
|
|
|
ec90fcd |
# https://github.com/adobe-type-tools/cffsubr/pull/24
|
|
|
ec90fcd |
Patch: https://github.com/adobe-type-tools/cffsubr/pull/24.patch
|
|
|
ec90fcd |
|
|
|
700c000 |
BuildArch: noarch
|
|
|
700c000 |
|
|
|
700c000 |
BuildRequires: python3-devel
|
|
|
700c000 |
# From setup_requires in setup.py:
|
|
|
700c000 |
BuildRequires: python3dist(setuptools-scm)
|
|
|
700c000 |
|
|
|
700c000 |
%global txbin /usr/bin/tx
|
|
|
700c000 |
|
|
|
700c000 |
BuildRequires: %{txbin}
|
|
|
700c000 |
BuildRequires: symlinks
|
|
|
700c000 |
|
|
|
700c000 |
%description
|
|
|
700c000 |
Standalone CFF subroutinizer based on the AFDKO tx tool.
|
|
|
700c000 |
|
|
|
700c000 |
%generate_buildrequires
|
|
|
700c000 |
%pyproject_buildrequires -x testing
|
|
|
700c000 |
|
|
|
700c000 |
%package -n python3-%{srcname}
|
|
|
700c000 |
Summary: %{summary}
|
|
|
700c000 |
|
|
|
700c000 |
Requires: %{txbin}
|
|
|
700c000 |
|
|
|
700c000 |
%description -n python3-%{srcname}
|
|
|
700c000 |
Standalone CFF subroutinizer based on the AFDKO tx tool.
|
|
|
700c000 |
|
|
|
700c000 |
%prep
|
|
|
ec90fcd |
%autosetup -n %{srcname}-%{version} -p1
|
|
|
700c000 |
|
|
|
700c000 |
# Patch out setuptools-git-ls-files dependency
|
|
|
700c000 |
sed -r -i '/setuptools-git-ls-files/d' setup.py pyproject.toml
|
|
|
700c000 |
|
|
|
700c000 |
# Do not build the extension, which is a copy of the “tx” executable from
|
|
|
700c000 |
# adobe-afdko:
|
|
|
700c000 |
sed -r -i 's/(ext_modules=)/# \1/' setup.py
|
|
|
700c000 |
|
|
|
700c000 |
# Remove bundled adobe-afdko:
|
|
|
700c000 |
rm -rf external
|
|
|
700c000 |
|
|
|
fcfee78 |
cp -p '%{SOURCE1}' .
|
|
|
fcfee78 |
|
|
|
700c000 |
%build
|
|
|
fcfee78 |
%pyproject_wheel
|
|
|
700c000 |
|
|
|
700c000 |
%install
|
|
|
fcfee78 |
%pyproject_install
|
|
|
fcfee78 |
%pyproject_save_files %{srcname}
|
|
|
700c000 |
|
|
|
700c000 |
# Workaround to prevent a dangling symlink:
|
|
|
700c000 |
install -d "%{buildroot}$(dirname '%{txbin}')"
|
|
|
700c000 |
ln -s '%{txbin}' '%{buildroot}%{txbin}'
|
|
|
700c000 |
|
|
|
700c000 |
# Build a relative symbolic link:
|
|
|
700c000 |
ln -s '%{buildroot}%{txbin}' %{buildroot}/%{python3_sitelib}/%{srcname}/tx
|
|
|
700c000 |
symlinks -c -o %{buildroot}/%{python3_sitelib}/%{srcname}/tx
|
|
|
700c000 |
|
|
|
fcfee78 |
install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{srcname}.1'
|
|
|
fcfee78 |
|
|
|
700c000 |
%check
|
|
|
700c000 |
%if 0%{?fedora} == 33
|
|
|
700c000 |
# Fixing this would require an adobe-afdko update; see
|
|
|
700c000 |
# https://github.com/adobe-type-tools/cffsubr/issues/13.
|
|
|
fcfee78 |
k="${k-}${k+ and }not (TestSubroutinize and test_non_standard_upem_mute_font_matrix_warning)"
|
|
|
700c000 |
%endif
|
|
|
fcfee78 |
%pytest -k "${k-}"
|
|
|
700c000 |
|
|
|
fcfee78 |
%files -n python3-%{srcname} -f %{pyproject_files}
|
|
|
fcfee78 |
# pyproject-rpm-macros handles the LICENSE file; verify with “rpm -qL -p …”
|
|
|
700c000 |
%doc README.md
|
|
|
fcfee78 |
|
|
|
fcfee78 |
# Symbolic link to the “tx” executable; we patched out building a separate copy
|
|
|
fcfee78 |
# for the Python package, so the Python build does not know about this and we
|
|
|
fcfee78 |
# must list it explicitly.
|
|
|
fcfee78 |
%{python3_sitelib}/%{srcname}/tx
|
|
|
700c000 |
# This was just a workaround:
|
|
|
700c000 |
%exclude %{txbin}
|
|
|
700c000 |
|
|
|
fcfee78 |
%{_bindir}/%{srcname}
|
|
|
fcfee78 |
%{_mandir}/man1/%{srcname}.1*
|
|
|
fcfee78 |
|
|
|
700c000 |
%changelog
|
|
|
b8ae122 |
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.9.post1-8
|
|
|
b8ae122 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
b8ae122 |
|
|
|
a0f59ba |
* Mon Jun 19 2023 Python Maint <python-maint@redhat.com> - 0.2.9.post1-7
|
|
|
a0f59ba |
- Rebuilt for Python 3.12
|
|
|
a0f59ba |
|
|
|
54ae64a |
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.9.post1-6
|
|
|
54ae64a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
54ae64a |
|
|
|
b3ffe1a |
* Tue Nov 29 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.9.post1-5
|
|
|
b3ffe1a |
- Update License to SPDX
|
|
|
b3ffe1a |
|
|
|
74f578f |
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.9.post1-4
|
|
|
74f578f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
74f578f |
|
|
|
99da2b0 |
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 0.2.9.post1-3
|
|
|
99da2b0 |
- Rebuilt for Python 3.11
|
|
|
99da2b0 |
|
|
|
f853620 |
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.9.post1-2
|
|
|
f853620 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
f853620 |
|
|
|
fcfee78 |
* Tue Oct 26 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.9-1
|
|
|
fcfee78 |
- Update to 0.2.9 (close RHBZ#2017405)
|
|
|
fcfee78 |
- Add a man page for the new “cffsubr” CLI entry point
|
|
|
fcfee78 |
|
|
|
58426bf |
* Tue Oct 26 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.8-5
|
|
|
58426bf |
- Drop python3dist(setuptools) BR because it is implied by pyproject-rpm-macros,
|
|
|
58426bf |
and pyproject-rpm-macros BR because it is (now) implied by python3-devel
|
|
|
fcfee78 |
- Use the full set of pyproject-rpm-macros
|
|
|
58426bf |
|
|
|
1fa09b3 |
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.8-4
|
|
|
1fa09b3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
1fa09b3 |
|
|
|
8f5eede |
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.2.8-3
|
|
|
8f5eede |
- Rebuilt for Python 3.10
|
|
|
8f5eede |
|
|
|
700c000 |
* Mon Mar 1 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.8-2
|
|
|
700c000 |
- New upstream version 0.2.8
|
|
|
700c000 |
- Simplify files list
|
|
|
700c000 |
- Patch out (missing) setuptools-git-ls-files BR; add missing setuptool-scm BR
|
|
|
700c000 |
- Unbundle tx executable from adobe-afdko and switch package to noarch
|
|
|
700c000 |
- Drop obsolete python_provide macro
|
|
|
700c000 |
- Use %%pytest macro to run the tests
|
|
|
700c000 |
- Use generated BR’s
|
|
|
700c000 |
|
|
|
700c000 |
* Mon Feb 15 2021 Rajeesh KV <rajeeshknambiar@fedoraproject.org> - 0.2.7-1
|
|
|
700c000 |
- Initial packaging
|