3 %bcond_without python2 # CPython 2.x module
4 %bcond_with python3 # CPython 3.x module (version 4+ built from fonttools.spec)
5 %bcond_without doc # Sphinx documentation
6 %bcond_without tests # pytest tests
8 Summary: Python 2 tools to manipulate font files
9 Summary(pl.UTF-8): Narzędzia do manipulacji na plikach fontów dla Pythona 2
10 Name: python-fonttools
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}/fonttools-%{version}.tar.gz
19 # Source0-md5: 3f9ff311081a0f591a09552902671d29
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-enum34 >= 1.1.6
29 BuildRequires: python-fs >= 2.2.0
30 BuildRequires: python-pytest >= 3.0
31 BuildRequires: python-unicodedata2 >= 12.0.0
35 BuildRequires: python3-devel >= 1:3.4
37 BuildRequires: python3-fs >= 2.2.0
38 BuildRequires: python3-pytest >= 3.0
39 %if "%{py3_ver}" < "3.7"
40 BuildRequires: python3-unicodedata2 >= 12.0.0
44 BuildRequires: rpmbuild(macros) >= 1.714
46 BuildRequires: sphinx-pdg-2 >= 1.5.5
48 Requires: python-modules >= 1:2.7
49 Requires: python-unicodedata2 >= 12.0.0
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 Python 2 tools to manipulate font files.
56 %description -l pl.UTF-8
57 Narzędzia do manipulacji na plikach fontów dla Pythona 2.
60 Summary: Documentation for Python fonttools module
61 Summary(pl.UTF-8): Dokumentacja modułu Pythona fonttools
65 Documentation for Python fonttools module.
67 %description apidocs -l pl.UTF-8
68 Dokumentacja modułu Pythona fonttools.
70 %package -n python3-fonttools
71 Summary: Python 3 tools to manipulate font files
72 Summary(pl.UTF-8): Narzędzia do manipulacji na plikach fontów dla Pythona 3
73 Group: Libraries/Python
74 Requires: python3-modules >= 1:3.4
75 %if "%{py3_ver}" < "3.7"
76 Requires: python3-unicodedata2 >= 12.0.0
79 %description -n python3-fonttools
80 Python 3 tools to manipulate font files.
82 %description -n python3-fonttools -l pl.UTF-8
83 Narzędzia do manipulacji na plikach fontów dla Pythona 3.
86 %setup -q -n fonttools-%{version}
95 %{__python} -m pytest Tests
104 %{__python} -m pytest Tests
109 PYTHONPATH=$(pwd)/build-2/lib \
110 %{__make} -C Doc html \
111 SPHINXBUILD=sphinx-build-2
115 rm -rf $RPM_BUILD_ROOT
127 # packaged from fonttools.spec
128 %{__rm} -r $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
131 rm -rf $RPM_BUILD_ROOT
135 %defattr(644,root,root,755)
136 %{py_sitescriptdir}/fontTools
137 %{py_sitescriptdir}/fonttools-%{version}-py*.egg-info
141 %defattr(644,root,root,755)
142 %doc Doc/build/html/{_static,designspaceLib,misc,pens,ttLib,varLib,*.html,*.js}
147 %files -n python3-fonttools
148 %defattr(644,root,root,755)
149 %{py3_sitescriptdir}/fontTools
150 %{py3_sitescriptdir}/fonttools-%{version}-py*.egg-info