]> git.pld-linux.org Git - packages/fonttools.git/blob - fonttools.spec
- updated to 4.28.3; now requires python 3.7+ (last python2 version saved in python...
[packages/fonttools.git] / fonttools.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # pytest tests
5
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
8 Name:           fonttools
9 Version:        4.28.3
10 Release:        1
11 # basic license is BSD
12 # FontTools includes Adobe AGL & AGLFN, which is under 3-clauses BSD license
13 License:        MIT, BSD
14 Group:          Development/Tools
15 #Source0Download: https://github.com/fonttools/fonttools/releases
16 Source0:        https://github.com/fonttools/fonttools/archive/%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5:  c22566ab3889a7ab56f246721d55f813
18 URL:            https://github.com/fonttools/fonttools
19 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
20 BuildRequires:  glibc-localedb-all
21 %endif
22 BuildRequires:  python3-devel >= 1:3.7
23 %if %{with tests}
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
31 BuildRequires:  python3-pytest >= 3.0
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
37 %endif
38 #BuildRequires: python3-zopfli >= 0.1.4
39 %endif
40 BuildRequires:  rpm-build >= 4.6
41 BuildRequires:  rpmbuild(macros) >= 1.714
42 %if %{with doc}
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
47 %endif
48 Requires:       python3-fonttools = %{version}-%{release}
49 Requires:       python3-setuptools
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
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
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
69 Requires:       python3-modules >= 1:3.7
70 %if "%{py3_ver}" < "3.9"
71 Requires:       python3-unicodedata2 >= 13.0.0.post2
72 %endif
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
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
92 %prep
93 %setup -q
94
95 %build
96 %py3_build
97
98 %if %{with tests}
99 PATH="$(pwd):$PATH" \
100 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
101 PYTHONPATH=$(pwd)/Lib \
102 %{__python3} -m pytest Tests
103 %endif
104
105 %if %{with doc}
106 PYTHONPATH=$(pwd)/Lib \
107 %{__make} -C Doc html \
108         SPHINXBUILD=sphinx-build-3
109 %endif
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113
114 %py3_install
115
116 # sources
117 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/fontTools/cu2qu/*.c
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %files
123 %defattr(644,root,root,755)
124 %doc LICENSE LICENSE.external NEWS.rst README.rst
125 %attr(755,root,root) %{_bindir}/fonttools
126 %attr(755,root,root) %{_bindir}/pyftmerge
127 %attr(755,root,root) %{_bindir}/pyftsubset
128 %attr(755,root,root) %{_bindir}/ttx
129 %{_mandir}/man1/ttx.1*
130
131 %files -n python3-fonttools
132 %defattr(644,root,root,755)
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
158
159 %if %{with doc}
160 %files -n python3-fonttools-apidocs
161 %defattr(644,root,root,755)
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}
163 %endif
This page took 0.039686 seconds and 4 git commands to generate.