3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # pytest tests
6 Summary: A tool to convert TrueType/OpenType fonts to XML and back
7 Summary(pl.UTF-8): Narzędzie do konwersji fontów TrueType/OpenType do/z XML-a
11 # basic license is BSD
12 # FontTools includes Adobe AGL & AGLFN, which is under 3-clauses BSD license
14 Group: Development/Tools
15 #Source0Download: https://github.com/fonttools/fonttools/releases
16 Source0: https://github.com/fonttools/fonttools/archive/%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5: c22566ab3889a7ab56f246721d55f813
18 URL: https://github.com/fonttools/fonttools
19 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
20 BuildRequires: glibc-localedb-all
22 BuildRequires: python3-devel >= 1:3.7
24 BuildRequires: python3-brotli >= 1.0.9
25 BuildRequires: python3-fs >= 2.4.14
26 BuildRequires: python3-fs < 3
27 BuildRequires: python3-lxml >= 4
28 BuildRequires: python3-lxml < 5
29 BuildRequires: python3-lz4 >= 1.7.4.2
30 BuildRequires: python3-matplotlib
31 BuildRequires: python3-pytest >= 3.0
32 BuildRequires: python3-scipy
33 #BuildRequires: python3-skia-pathops >= 0.5.0
34 BuildRequires: python3-sympy
35 %if "%{py3_ver}" < "3.9"
36 BuildRequires: python3-unicodedata2 >= 13.0.0.post2
38 #BuildRequires: python3-zopfli >= 0.1.4
40 BuildRequires: rpm-build >= 4.6
41 BuildRequires: rpmbuild(macros) >= 1.714
43 # preferred versions: reportlab 3.6.3, sphinx_rtd_theme 1.0.0, Sphinx 4.3.1
44 BuildRequires: python3-ReportLab >= 3.5
45 BuildRequires: python3-sphinx_rtd_theme >= 0.4
46 BuildRequires: sphinx-pdg-3 >= 3
48 Requires: python3-fonttools = %{version}-%{release}
49 Requires: python3-setuptools
50 Provides: ttx = %{version}-%{release}
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 TTX/FontTools is a tool for manipulating TrueType and OpenType fonts.
55 It is written in Python and has a BSD-style, open-source license. TTX
56 can dump TrueType and OpenType fonts to an XML-based text format and
59 %description -l pl.UTF-8
60 TTX/FontTools to narzędzie do operacji na fontach TrueType i OpenType.
61 Zostało napisane w Pythonie i ma otwartą licencję w stylu BSD. TTX
62 potrafi wykonywać zrzuty fontów TrueType i OpenType do formatu
63 tekstowego opartego na XML-u oraz dokonać operacji odwrotnej.
65 %package -n python3-fonttools
66 Summary: Python 3 tools to manipulate font files
67 Summary(pl.UTF-8): Narzędzia do manipulacji na plikach fontów dla Pythona 3
68 Group: Libraries/Python
69 Requires: python3-modules >= 1:3.7
70 %if "%{py3_ver}" < "3.9"
71 Requires: python3-unicodedata2 >= 13.0.0.post2
74 %description -n python3-fonttools
75 Python 3 tools to manipulate font files.
77 %description -n python3-fonttools -l pl.UTF-8
78 Narzędzia do manipulacji na plikach fontów dla Pythona 3.
80 %package -n python3-fonttools-apidocs
81 Summary: Documentation for Python fonttools module
82 Summary(pl.UTF-8): Dokumentacja modułu Pythona fonttools
86 %description -n python3-fonttools-apidocs
87 Documentation for Python fonttools module.
89 %description -n python3-fonttools-apidocs -l pl.UTF-8
90 Dokumentacja modułu Pythona fonttools.
100 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
101 PYTHONPATH=$(pwd)/Lib \
102 %{__python3} -m pytest Tests
106 PYTHONPATH=$(pwd)/Lib \
107 %{__make} -C Doc html \
108 SPHINXBUILD=sphinx-build-3
112 rm -rf $RPM_BUILD_ROOT
117 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/fontTools/cu2qu/*.c
120 rm -rf $RPM_BUILD_ROOT
123 %defattr(644,root,root,755)
124 %doc LICENSE LICENSE.external NEWS.rst README.rst
125 %attr(755,root,root) %{_bindir}/fonttools
126 %attr(755,root,root) %{_bindir}/pyftmerge
127 %attr(755,root,root) %{_bindir}/pyftsubset
128 %attr(755,root,root) %{_bindir}/ttx
129 %{_mandir}/man1/ttx.1*
131 %files -n python3-fonttools
132 %defattr(644,root,root,755)
133 %dir %{py3_sitedir}/fontTools
134 %{py3_sitedir}/fontTools/*.py
135 %{py3_sitedir}/fontTools/__pycache__
136 %{py3_sitedir}/fontTools/cffLib
137 %{py3_sitedir}/fontTools/colorLib
138 %dir %{py3_sitedir}/fontTools/cu2qu
139 %attr(755,root,root) %{py3_sitedir}/fontTools/cu2qu/cu2qu.cpython-*.so
140 %{py3_sitedir}/fontTools/cu2qu/*.py
141 %{py3_sitedir}/fontTools/cu2qu/__pycache__
142 %{py3_sitedir}/fontTools/designspaceLib
143 %{py3_sitedir}/fontTools/encodings
144 %{py3_sitedir}/fontTools/feaLib
145 %{py3_sitedir}/fontTools/misc
146 %{py3_sitedir}/fontTools/mtiLib
147 %{py3_sitedir}/fontTools/otlLib
148 %{py3_sitedir}/fontTools/pens
149 %{py3_sitedir}/fontTools/subset
150 %{py3_sitedir}/fontTools/svgLib
151 %{py3_sitedir}/fontTools/t1Lib
152 %{py3_sitedir}/fontTools/ttLib
153 %{py3_sitedir}/fontTools/ufoLib
154 %{py3_sitedir}/fontTools/unicodedata
155 %{py3_sitedir}/fontTools/varLib
156 %{py3_sitedir}/fontTools/voltLib
157 %{py3_sitedir}/fonttools-%{version}-py*.egg-info
160 %files -n python3-fonttools-apidocs
161 %defattr(644,root,root,755)
162 %doc Doc/build/html/{_images,_modules,_static,cffLib,colorLib,cu2qu,designspaceLib,encodings,feaLib,misc,otlLib,pens,subset,svgLib,ttLib,ufoLib,unicodedata,varLib,*.html,*.js}