]>
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 |
58a46b86 | 9 | Version: 4.38.0 |
4703a679 | 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 | |
58a46b86 | 17 | # Source0-md5: 2e225e2db5bb8541419a2232474dc9a4 |
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 | |
58a46b86 | 22 | BuildRequires: python3-Cython |
c80bac55 | 23 | BuildRequires: python3-devel >= 1:3.7 |
e4814ebe | 24 | %if %{with tests} |
c80bac55 | 25 | BuildRequires: python3-brotli >= 1.0.9 |
58a46b86 JB |
26 | #BuildRequires: python3-freetype-py >= 2.3.0 |
27 | BuildRequires: python3-fs >= 2.4.16 | |
c80bac55 JB |
28 | BuildRequires: python3-fs < 3 |
29 | BuildRequires: python3-lxml >= 4 | |
30 | BuildRequires: python3-lxml < 5 | |
31 | BuildRequires: python3-lz4 >= 1.7.4.2 | |
32 | BuildRequires: python3-matplotlib | |
e4814ebe | 33 | BuildRequires: python3-pytest >= 3.0 |
58a46b86 | 34 | # >= 1.9.1? |
4703a679 JB |
35 | BuildRequires: python3-scipy >= 1.7.3 |
36 | BuildRequires: python3-skia-pathops >= 0.7.2 | |
c80bac55 | 37 | BuildRequires: python3-sympy |
58a46b86 JB |
38 | #BuildRequires: python3-ufoLib2 >= 0.13.1 |
39 | #BuildRequires: python3-uharfbuzz >= 0.30.0 | |
40 | %if "%{ver_lt '%{py3_ver}' '3.11'}" == "1" | |
4703a679 | 41 | BuildRequires: python3-unicodedata2 >= 14.0.0 |
e4814ebe | 42 | %endif |
58a46b86 | 43 | BuildRequires: python3-zopfli >= 0.2.1 |
e4814ebe | 44 | %endif |
c80bac55 | 45 | BuildRequires: rpm-build >= 4.6 |
58a46b86 | 46 | BuildRequires: rpmbuild(macros) >= 1.750 |
af4425a8 | 47 | %if %{with doc} |
c80bac55 JB |
48 | # preferred versions: reportlab 3.6.3, sphinx_rtd_theme 1.0.0, Sphinx 4.3.1 |
49 | BuildRequires: python3-ReportLab >= 3.5 | |
50 | BuildRequires: python3-sphinx_rtd_theme >= 0.4 | |
51 | BuildRequires: sphinx-pdg-3 >= 3 | |
af4425a8 | 52 | %endif |
e4814ebe JB |
53 | Requires: python3-fonttools = %{version}-%{release} |
54 | Requires: python3-setuptools | |
77da64f4 AM |
55 | Provides: ttx = %{version}-%{release} |
56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
57 | ||
58 | %description | |
59 | TTX/FontTools is a tool for manipulating TrueType and OpenType fonts. | |
60 | It is written in Python and has a BSD-style, open-source license. TTX | |
61 | can dump TrueType and OpenType fonts to an XML-based text format and | |
62 | vice versa. | |
63 | ||
baf8eefc JB |
64 | %description -l pl.UTF-8 |
65 | TTX/FontTools to narzędzie do operacji na fontach TrueType i OpenType. | |
66 | Zostało napisane w Pythonie i ma otwartą licencję w stylu BSD. TTX | |
67 | potrafi wykonywać zrzuty fontów TrueType i OpenType do formatu | |
68 | tekstowego opartego na XML-u oraz dokonać operacji odwrotnej. | |
69 | ||
e4814ebe JB |
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 | |
c80bac55 | 74 | Requires: python3-modules >= 1:3.7 |
58a46b86 JB |
75 | %if "%{ver_lt '%{py3_ver}' '3.11'}" == "1" |
76 | Requires: python3-unicodedata2 >= 14.0.0 | |
6c07898f | 77 | %endif |
e4814ebe JB |
78 | |
79 | %description -n python3-fonttools | |
80 | Python 3 tools to manipulate font files. | |
81 | ||
82 | %description -n python3-fonttools -l pl.UTF-8 | |
83 | Narzędzia do manipulacji na plikach fontów dla Pythona 3. | |
84 | ||
c80bac55 JB |
85 | %package -n python3-fonttools-apidocs |
86 | Summary: Documentation for Python fonttools module | |
87 | Summary(pl.UTF-8): Dokumentacja modułu Pythona fonttools | |
88 | Group: Documentation | |
89 | BuildArch: noarch | |
90 | ||
91 | %description -n python3-fonttools-apidocs | |
92 | Documentation for Python fonttools module. | |
93 | ||
94 | %description -n python3-fonttools-apidocs -l pl.UTF-8 | |
95 | Dokumentacja modułu Pythona fonttools. | |
96 | ||
77da64f4 AM |
97 | %prep |
98 | %setup -q | |
99 | ||
77da64f4 | 100 | %build |
af4425a8 JB |
101 | %py3_build |
102 | ||
103 | %if %{with tests} | |
c80bac55 JB |
104 | PATH="$(pwd):$PATH" \ |
105 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
106 | PYTHONPATH=$(pwd)/Lib \ | |
107 | %{__python3} -m pytest Tests | |
af4425a8 JB |
108 | %endif |
109 | ||
110 | %if %{with doc} | |
c80bac55 | 111 | PYTHONPATH=$(pwd)/Lib \ |
af4425a8 JB |
112 | %{__make} -C Doc html \ |
113 | SPHINXBUILD=sphinx-build-3 | |
e4814ebe | 114 | %endif |
77da64f4 AM |
115 | |
116 | %install | |
117 | rm -rf $RPM_BUILD_ROOT | |
baf8eefc | 118 | |
e4814ebe | 119 | %py3_install |
e4814ebe | 120 | |
c80bac55 JB |
121 | # sources |
122 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/fontTools/cu2qu/*.c | |
77da64f4 AM |
123 | |
124 | %clean | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
127 | %files | |
128 | %defattr(644,root,root,755) | |
e4814ebe JB |
129 | %doc LICENSE LICENSE.external NEWS.rst README.rst |
130 | %attr(755,root,root) %{_bindir}/fonttools | |
e4814ebe JB |
131 | %attr(755,root,root) %{_bindir}/pyftmerge |
132 | %attr(755,root,root) %{_bindir}/pyftsubset | |
baf8eefc | 133 | %attr(755,root,root) %{_bindir}/ttx |
77da64f4 | 134 | %{_mandir}/man1/ttx.1* |
e4814ebe | 135 | |
c80bac55 | 136 | %files -n python3-fonttools |
e4814ebe | 137 | %defattr(644,root,root,755) |
c80bac55 JB |
138 | %dir %{py3_sitedir}/fontTools |
139 | %{py3_sitedir}/fontTools/*.py | |
140 | %{py3_sitedir}/fontTools/__pycache__ | |
141 | %{py3_sitedir}/fontTools/cffLib | |
142 | %{py3_sitedir}/fontTools/colorLib | |
58a46b86 | 143 | %{py3_sitedir}/fontTools/config |
c80bac55 JB |
144 | %dir %{py3_sitedir}/fontTools/cu2qu |
145 | %attr(755,root,root) %{py3_sitedir}/fontTools/cu2qu/cu2qu.cpython-*.so | |
146 | %{py3_sitedir}/fontTools/cu2qu/*.py | |
147 | %{py3_sitedir}/fontTools/cu2qu/__pycache__ | |
148 | %{py3_sitedir}/fontTools/designspaceLib | |
149 | %{py3_sitedir}/fontTools/encodings | |
150 | %{py3_sitedir}/fontTools/feaLib | |
4703a679 | 151 | %{py3_sitedir}/fontTools/merge |
c80bac55 JB |
152 | %{py3_sitedir}/fontTools/misc |
153 | %{py3_sitedir}/fontTools/mtiLib | |
154 | %{py3_sitedir}/fontTools/otlLib | |
155 | %{py3_sitedir}/fontTools/pens | |
156 | %{py3_sitedir}/fontTools/subset | |
157 | %{py3_sitedir}/fontTools/svgLib | |
158 | %{py3_sitedir}/fontTools/t1Lib | |
159 | %{py3_sitedir}/fontTools/ttLib | |
160 | %{py3_sitedir}/fontTools/ufoLib | |
161 | %{py3_sitedir}/fontTools/unicodedata | |
162 | %{py3_sitedir}/fontTools/varLib | |
163 | %{py3_sitedir}/fontTools/voltLib | |
164 | %{py3_sitedir}/fonttools-%{version}-py*.egg-info | |
e4814ebe JB |
165 | |
166 | %if %{with doc} | |
c80bac55 | 167 | %files -n python3-fonttools-apidocs |
e4814ebe | 168 | %defattr(644,root,root,755) |
c80bac55 | 169 | %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 | 170 | %endif |