]>
Commit | Line | Data |
---|---|---|
e4814ebe JB |
1 | # |
2 | # Conditional build: | |
e4814ebe JB |
3 | %bcond_without doc # Sphinx documentation |
4 | %bcond_without tests # pytest tests | |
5 | ||
baf8eefc JB |
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 | |
77da64f4 | 8 | Name: fonttools |
c80bac55 | 9 | Version: 4.28.3 |
0c6fccc9 | 10 | Release: 2 |
e4814ebe JB |
11 | # basic license is BSD |
12 | # FontTools includes Adobe AGL & AGLFN, which is under 3-clauses BSD license | |
13 | License: MIT, BSD | |
77da64f4 | 14 | Group: Development/Tools |
e4814ebe JB |
15 | #Source0Download: https://github.com/fonttools/fonttools/releases |
16 | Source0: https://github.com/fonttools/fonttools/archive/%{version}/%{name}-%{version}.tar.gz | |
c80bac55 | 17 | # Source0-md5: c22566ab3889a7ab56f246721d55f813 |
e4814ebe JB |
18 | URL: https://github.com/fonttools/fonttools |
19 | %if %(locale -a | grep -q '^C\.utf8$'; echo $?) | |
20 | BuildRequires: glibc-localedb-all | |
21 | %endif | |
c80bac55 | 22 | BuildRequires: python3-devel >= 1:3.7 |
e4814ebe | 23 | %if %{with tests} |
c80bac55 JB |
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 | |
e4814ebe | 31 | BuildRequires: python3-pytest >= 3.0 |
c80bac55 JB |
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 | |
e4814ebe | 37 | %endif |
c80bac55 | 38 | #BuildRequires: python3-zopfli >= 0.1.4 |
e4814ebe | 39 | %endif |
c80bac55 | 40 | BuildRequires: rpm-build >= 4.6 |
e4814ebe | 41 | BuildRequires: rpmbuild(macros) >= 1.714 |
af4425a8 | 42 | %if %{with doc} |
c80bac55 JB |
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 | |
af4425a8 | 47 | %endif |
e4814ebe JB |
48 | Requires: python3-fonttools = %{version}-%{release} |
49 | Requires: python3-setuptools | |
77da64f4 AM |
50 | Provides: ttx = %{version}-%{release} |
51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
52 | ||
53 | %description | |
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 | |
57 | vice versa. | |
58 | ||
baf8eefc JB |
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. | |
64 | ||
e4814ebe JB |
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 | |
c80bac55 JB |
69 | Requires: python3-modules >= 1:3.7 |
70 | %if "%{py3_ver}" < "3.9" | |
71 | Requires: python3-unicodedata2 >= 13.0.0.post2 | |
6c07898f | 72 | %endif |
e4814ebe JB |
73 | |
74 | %description -n python3-fonttools | |
75 | Python 3 tools to manipulate font files. | |
76 | ||
77 | %description -n python3-fonttools -l pl.UTF-8 | |
78 | Narzędzia do manipulacji na plikach fontów dla Pythona 3. | |
79 | ||
c80bac55 JB |
80 | %package -n python3-fonttools-apidocs |
81 | Summary: Documentation for Python fonttools module | |
82 | Summary(pl.UTF-8): Dokumentacja modułu Pythona fonttools | |
83 | Group: Documentation | |
84 | BuildArch: noarch | |
85 | ||
86 | %description -n python3-fonttools-apidocs | |
87 | Documentation for Python fonttools module. | |
88 | ||
89 | %description -n python3-fonttools-apidocs -l pl.UTF-8 | |
90 | Dokumentacja modułu Pythona fonttools. | |
91 | ||
77da64f4 AM |
92 | %prep |
93 | %setup -q | |
94 | ||
77da64f4 | 95 | %build |
af4425a8 JB |
96 | %py3_build |
97 | ||
98 | %if %{with tests} | |
c80bac55 JB |
99 | PATH="$(pwd):$PATH" \ |
100 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
101 | PYTHONPATH=$(pwd)/Lib \ | |
102 | %{__python3} -m pytest Tests | |
af4425a8 JB |
103 | %endif |
104 | ||
105 | %if %{with doc} | |
c80bac55 | 106 | PYTHONPATH=$(pwd)/Lib \ |
af4425a8 JB |
107 | %{__make} -C Doc html \ |
108 | SPHINXBUILD=sphinx-build-3 | |
e4814ebe | 109 | %endif |
77da64f4 AM |
110 | |
111 | %install | |
112 | rm -rf $RPM_BUILD_ROOT | |
baf8eefc | 113 | |
e4814ebe | 114 | %py3_install |
e4814ebe | 115 | |
c80bac55 JB |
116 | # sources |
117 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/fontTools/cu2qu/*.c | |
77da64f4 AM |
118 | |
119 | %clean | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %files | |
123 | %defattr(644,root,root,755) | |
e4814ebe JB |
124 | %doc LICENSE LICENSE.external NEWS.rst README.rst |
125 | %attr(755,root,root) %{_bindir}/fonttools | |
e4814ebe JB |
126 | %attr(755,root,root) %{_bindir}/pyftmerge |
127 | %attr(755,root,root) %{_bindir}/pyftsubset | |
baf8eefc | 128 | %attr(755,root,root) %{_bindir}/ttx |
77da64f4 | 129 | %{_mandir}/man1/ttx.1* |
e4814ebe | 130 | |
c80bac55 | 131 | %files -n python3-fonttools |
e4814ebe | 132 | %defattr(644,root,root,755) |
c80bac55 JB |
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 | |
e4814ebe JB |
158 | |
159 | %if %{with doc} | |
c80bac55 | 160 | %files -n python3-fonttools-apidocs |
e4814ebe | 161 | %defattr(644,root,root,755) |
c80bac55 | 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} |
e4814ebe | 163 | %endif |