3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without doc # Sphinx documentation
6 %bcond_without tests # pytest tests
8 Summary: A tool to convert TrueType/OpenType fonts to XML and back
9 Summary(pl.UTF-8): Narzędzie do konwersji fontów TrueType/OpenType do/z XML-a
13 # basic license is BSD
14 # FontTools includes Adobe AGL & AGLFN, which is under 3-clauses BSD license
16 Group: Development/Tools
17 #Source0Download: https://github.com/fonttools/fonttools/releases
18 Source0: https://github.com/fonttools/fonttools/archive/%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5: e70418b1d9175a29e7574cd3a7988ccd
20 URL: https://github.com/fonttools/fonttools
21 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
22 BuildRequires: glibc-localedb-all
25 BuildRequires: python-devel >= 1:2.7
26 BuildRequires: python-setuptools
28 BuildRequires: python-pytest >= 3.0
29 BuildRequires: python-unicodedata2 >= 11.0.0
32 BuildRequires: sphinx-pdg-2 >= 1.5.5
36 BuildRequires: python3-devel >= 1:3.4
38 BuildRequires: python3-pytest >= 3.0
39 %if "%{py3_ver}" < "3.7"
40 BuildRequires: python3-unicodedata2 >= 11.0.0
44 BuildRequires: rpmbuild(macros) >= 1.714
46 Requires: python-fonttools = %{version}-%{release}
47 Requires: python-setuptools
49 Requires: python3-fonttools = %{version}-%{release}
50 Requires: python3-setuptools
52 Provides: ttx = %{version}-%{release}
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 TTX/FontTools is a tool for manipulating TrueType and OpenType fonts.
58 It is written in Python and has a BSD-style, open-source license. TTX
59 can dump TrueType and OpenType fonts to an XML-based text format and
62 %description -l pl.UTF-8
63 TTX/FontTools to narzędzie do operacji na fontach TrueType i OpenType.
64 Zostało napisane w Pythonie i ma otwartą licencję w stylu BSD. TTX
65 potrafi wykonywać zrzuty fontów TrueType i OpenType do formatu
66 tekstowego opartego na XML-u oraz dokonać operacji odwrotnej.
68 %package -n python-fonttools
69 Summary: Python 2 tools to manipulate font files
70 Summary(pl.UTF-8): Narzędzia do manipulacji na plikach fontów dla Pythona 2
71 Group: Libraries/Python
72 Requires: python-modules >= 1:2.7
73 Requires: python-unicodedata2 >= 11.0.0
75 %description -n python-fonttools
76 Python 2 tools to manipulate font files.
78 %description -n python-fonttools -l pl.UTF-8
79 Narzędzia do manipulacji na plikach fontów dla Pythona 2.
81 %package -n python-fonttools-apidocs
82 Summary: Documentation for Python fonttools module
83 Summary(pl.UTF-8): Dokumentacja modułu Pythona fonttools
86 %description -n python-fonttools-apidocs
87 Documentation for Python fonttools module.
89 %description -n python-fonttools-apidocs -l pl.UTF-8
90 Dokumentacja modułu Pythona fonttools.
92 %package -n python3-fonttools
93 Summary: Python 3 tools to manipulate font files
94 Summary(pl.UTF-8): Narzędzia do manipulacji na plikach fontów dla Pythona 3
95 Group: Libraries/Python
96 Requires: python3-modules >= 1:3.4
97 %if "%{py3_ver}" < "3.7"
98 Requires: python3-unicodedata2 >= 11.0.0
101 %description -n python3-fonttools
102 Python 3 tools to manipulate font files.
104 %description -n python3-fonttools -l pl.UTF-8
105 Narzędzia do manipulacji na plikach fontów dla Pythona 3.
111 export LC_ALL=C.UTF-8
113 %py_build %{?with_tests:test}
115 PYTHONPATH=$(pwd)/build-2/lib \
116 %{__make} -C Doc html \
117 SPHINXBUILD=sphinx-build-2
122 %py3_build %{?with_tests:test}
126 rm -rf $RPM_BUILD_ROOT
139 rm -rf $RPM_BUILD_ROOT
142 %defattr(644,root,root,755)
143 %doc LICENSE LICENSE.external NEWS.rst README.rst
144 %attr(755,root,root) %{_bindir}/fonttools
145 %attr(755,root,root) %{_bindir}/pyftinspect
146 %attr(755,root,root) %{_bindir}/pyftmerge
147 %attr(755,root,root) %{_bindir}/pyftsubset
148 %attr(755,root,root) %{_bindir}/ttx
149 %{_mandir}/man1/ttx.1*
152 %files -n python-fonttools
153 %defattr(644,root,root,755)
154 %{py_sitescriptdir}/fontTools
155 %{py_sitescriptdir}/fonttools-%{version}-py*.egg-info
158 %files -n python-fonttools-apidocs
159 %defattr(644,root,root,755)
160 %doc Doc/build/html/{_static,designspaceLib,misc,pens,ttLib,varLib,*.html,*.js}
165 %files -n python3-fonttools
166 %defattr(644,root,root,755)
167 %{py3_sitescriptdir}/fontTools
168 %{py3_sitescriptdir}/fonttools-%{version}-py*.egg-info