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: c925704fee22c5d87f2625c7cd8b8247
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-freetype-py >= 2.2.0
26 BuildRequires: python3-fs >= 2.4.14
27 BuildRequires: python3-fs < 3
28 BuildRequires: python3-lxml >= 4
29 BuildRequires: python3-lxml < 5
30 BuildRequires: python3-lz4 >= 1.7.4.2
31 BuildRequires: python3-matplotlib
32 BuildRequires: python3-pytest >= 3.0
33 BuildRequires: python3-scipy >= 1.7.3
34 BuildRequires: python3-skia-pathops >= 0.7.2
35 BuildRequires: python3-sympy
36 #BuildRequires: python3-ufoLib2 >= 0.13.0
37 %if "%{py3_ver}" < "3.9"
38 BuildRequires: python3-unicodedata2 >= 14.0.0
40 #BuildRequires: python3-zopfli >= 0.1.9
42 BuildRequires: rpm-build >= 4.6
43 BuildRequires: rpmbuild(macros) >= 1.714
45 # preferred versions: reportlab 3.6.3, sphinx_rtd_theme 1.0.0, Sphinx 4.3.1
46 BuildRequires: python3-ReportLab >= 3.5
47 BuildRequires: python3-sphinx_rtd_theme >= 0.4
48 BuildRequires: sphinx-pdg-3 >= 3
50 Requires: python3-fonttools = %{version}-%{release}
51 Requires: python3-setuptools
52 Provides: ttx = %{version}-%{release}
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 TTX/FontTools is a tool for manipulating TrueType and OpenType fonts.
57 It is written in Python and has a BSD-style, open-source license. TTX
58 can dump TrueType and OpenType fonts to an XML-based text format and
61 %description -l pl.UTF-8
62 TTX/FontTools to narzędzie do operacji na fontach TrueType i OpenType.
63 Zostało napisane w Pythonie i ma otwartą licencję w stylu BSD. TTX
64 potrafi wykonywać zrzuty fontów TrueType i OpenType do formatu
65 tekstowego opartego na XML-u oraz dokonać operacji odwrotnej.
67 %package -n python3-fonttools
68 Summary: Python 3 tools to manipulate font files
69 Summary(pl.UTF-8): Narzędzia do manipulacji na plikach fontów dla Pythona 3
70 Group: Libraries/Python
71 Requires: python3-modules >= 1:3.7
72 %if "%{py3_ver}" < "3.9"
73 Requires: python3-unicodedata2 >= 13.0.0.post2
76 %description -n python3-fonttools
77 Python 3 tools to manipulate font files.
79 %description -n python3-fonttools -l pl.UTF-8
80 Narzędzia do manipulacji na plikach fontów dla Pythona 3.
82 %package -n python3-fonttools-apidocs
83 Summary: Documentation for Python fonttools module
84 Summary(pl.UTF-8): Dokumentacja modułu Pythona fonttools
88 %description -n python3-fonttools-apidocs
89 Documentation for Python fonttools module.
91 %description -n python3-fonttools-apidocs -l pl.UTF-8
92 Dokumentacja modułu Pythona fonttools.
101 PATH="$(pwd):$PATH" \
102 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
103 PYTHONPATH=$(pwd)/Lib \
104 %{__python3} -m pytest Tests
108 PYTHONPATH=$(pwd)/Lib \
109 %{__make} -C Doc html \
110 SPHINXBUILD=sphinx-build-3
114 rm -rf $RPM_BUILD_ROOT
119 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/fontTools/cu2qu/*.c
122 rm -rf $RPM_BUILD_ROOT
125 %defattr(644,root,root,755)
126 %doc LICENSE LICENSE.external NEWS.rst README.rst
127 %attr(755,root,root) %{_bindir}/fonttools
128 %attr(755,root,root) %{_bindir}/pyftmerge
129 %attr(755,root,root) %{_bindir}/pyftsubset
130 %attr(755,root,root) %{_bindir}/ttx
131 %{_mandir}/man1/ttx.1*
133 %files -n python3-fonttools
134 %defattr(644,root,root,755)
135 %dir %{py3_sitedir}/fontTools
136 %{py3_sitedir}/fontTools/*.py
137 %{py3_sitedir}/fontTools/__pycache__
138 %{py3_sitedir}/fontTools/cffLib
139 %{py3_sitedir}/fontTools/colorLib
140 %dir %{py3_sitedir}/fontTools/cu2qu
141 %attr(755,root,root) %{py3_sitedir}/fontTools/cu2qu/cu2qu.cpython-*.so
142 %{py3_sitedir}/fontTools/cu2qu/*.py
143 %{py3_sitedir}/fontTools/cu2qu/__pycache__
144 %{py3_sitedir}/fontTools/designspaceLib
145 %{py3_sitedir}/fontTools/encodings
146 %{py3_sitedir}/fontTools/feaLib
147 %{py3_sitedir}/fontTools/merge
148 %{py3_sitedir}/fontTools/misc
149 %{py3_sitedir}/fontTools/mtiLib
150 %{py3_sitedir}/fontTools/otlLib
151 %{py3_sitedir}/fontTools/pens
152 %{py3_sitedir}/fontTools/subset
153 %{py3_sitedir}/fontTools/svgLib
154 %{py3_sitedir}/fontTools/t1Lib
155 %{py3_sitedir}/fontTools/ttLib
156 %{py3_sitedir}/fontTools/ufoLib
157 %{py3_sitedir}/fontTools/unicodedata
158 %{py3_sitedir}/fontTools/varLib
159 %{py3_sitedir}/fontTools/voltLib
160 %{py3_sitedir}/fonttools-%{version}-py*.egg-info
163 %files -n python3-fonttools-apidocs
164 %defattr(644,root,root,755)
165 %doc Doc/build/html/{_images,_modules,_static,cffLib,colorLib,cu2qu,designspaceLib,encodings,feaLib,misc,otlLib,pens,subset,svgLib,ttLib,ufoLib,unicodedata,varLib,*.html,*.js}