]>
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 |
4703a679 JB |
9 | Version: 4.31.2 |
10 | Release: 1 | |
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 | |
4703a679 | 17 | # Source0-md5: c925704fee22c5d87f2625c7cd8b8247 |
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 | 24 | BuildRequires: python3-brotli >= 1.0.9 |
4703a679 | 25 | #BuildRequires: python3-freetype-py >= 2.2.0 |
c80bac55 JB |
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 | |
e4814ebe | 32 | BuildRequires: python3-pytest >= 3.0 |
4703a679 JB |
33 | BuildRequires: python3-scipy >= 1.7.3 |
34 | BuildRequires: python3-skia-pathops >= 0.7.2 | |
c80bac55 | 35 | BuildRequires: python3-sympy |
4703a679 | 36 | #BuildRequires: python3-ufoLib2 >= 0.13.0 |
c80bac55 | 37 | %if "%{py3_ver}" < "3.9" |
4703a679 | 38 | BuildRequires: python3-unicodedata2 >= 14.0.0 |
e4814ebe | 39 | %endif |
4703a679 | 40 | #BuildRequires: python3-zopfli >= 0.1.9 |
e4814ebe | 41 | %endif |
c80bac55 | 42 | BuildRequires: rpm-build >= 4.6 |
e4814ebe | 43 | BuildRequires: rpmbuild(macros) >= 1.714 |
af4425a8 | 44 | %if %{with doc} |
c80bac55 JB |
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 | |
af4425a8 | 49 | %endif |
e4814ebe JB |
50 | Requires: python3-fonttools = %{version}-%{release} |
51 | Requires: python3-setuptools | |
77da64f4 AM |
52 | Provides: ttx = %{version}-%{release} |
53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
54 | ||
55 | %description | |
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 | |
59 | vice versa. | |
60 | ||
baf8eefc JB |
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. | |
66 | ||
e4814ebe JB |
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 | |
c80bac55 JB |
71 | Requires: python3-modules >= 1:3.7 |
72 | %if "%{py3_ver}" < "3.9" | |
73 | Requires: python3-unicodedata2 >= 13.0.0.post2 | |
6c07898f | 74 | %endif |
e4814ebe JB |
75 | |
76 | %description -n python3-fonttools | |
77 | Python 3 tools to manipulate font files. | |
78 | ||
79 | %description -n python3-fonttools -l pl.UTF-8 | |
80 | Narzędzia do manipulacji na plikach fontów dla Pythona 3. | |
81 | ||
c80bac55 JB |
82 | %package -n python3-fonttools-apidocs |
83 | Summary: Documentation for Python fonttools module | |
84 | Summary(pl.UTF-8): Dokumentacja modułu Pythona fonttools | |
85 | Group: Documentation | |
86 | BuildArch: noarch | |
87 | ||
88 | %description -n python3-fonttools-apidocs | |
89 | Documentation for Python fonttools module. | |
90 | ||
91 | %description -n python3-fonttools-apidocs -l pl.UTF-8 | |
92 | Dokumentacja modułu Pythona fonttools. | |
93 | ||
77da64f4 AM |
94 | %prep |
95 | %setup -q | |
96 | ||
77da64f4 | 97 | %build |
af4425a8 JB |
98 | %py3_build |
99 | ||
100 | %if %{with tests} | |
c80bac55 JB |
101 | PATH="$(pwd):$PATH" \ |
102 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
103 | PYTHONPATH=$(pwd)/Lib \ | |
104 | %{__python3} -m pytest Tests | |
af4425a8 JB |
105 | %endif |
106 | ||
107 | %if %{with doc} | |
c80bac55 | 108 | PYTHONPATH=$(pwd)/Lib \ |
af4425a8 JB |
109 | %{__make} -C Doc html \ |
110 | SPHINXBUILD=sphinx-build-3 | |
e4814ebe | 111 | %endif |
77da64f4 AM |
112 | |
113 | %install | |
114 | rm -rf $RPM_BUILD_ROOT | |
baf8eefc | 115 | |
e4814ebe | 116 | %py3_install |
e4814ebe | 117 | |
c80bac55 JB |
118 | # sources |
119 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/fontTools/cu2qu/*.c | |
77da64f4 AM |
120 | |
121 | %clean | |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | ||
124 | %files | |
125 | %defattr(644,root,root,755) | |
e4814ebe JB |
126 | %doc LICENSE LICENSE.external NEWS.rst README.rst |
127 | %attr(755,root,root) %{_bindir}/fonttools | |
e4814ebe JB |
128 | %attr(755,root,root) %{_bindir}/pyftmerge |
129 | %attr(755,root,root) %{_bindir}/pyftsubset | |
baf8eefc | 130 | %attr(755,root,root) %{_bindir}/ttx |
77da64f4 | 131 | %{_mandir}/man1/ttx.1* |
e4814ebe | 132 | |
c80bac55 | 133 | %files -n python3-fonttools |
e4814ebe | 134 | %defattr(644,root,root,755) |
c80bac55 JB |
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 | |
4703a679 | 147 | %{py3_sitedir}/fontTools/merge |
c80bac55 JB |
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 | |
e4814ebe JB |
161 | |
162 | %if %{with doc} | |
c80bac55 | 163 | %files -n python3-fonttools-apidocs |
e4814ebe | 164 | %defattr(644,root,root,755) |
c80bac55 | 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} |
e4814ebe | 166 | %endif |