]> git.pld-linux.org Git - packages/fonttools.git/blob - fonttools.spec
- updated to 4.31.2
[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.31.2
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:  c925704fee22c5d87f2625c7cd8b8247
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-freetype-py >= 2.2.0
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
32 BuildRequires:  python3-pytest >= 3.0
33 BuildRequires:  python3-scipy >= 1.7.3
34 BuildRequires:  python3-skia-pathops >= 0.7.2
35 BuildRequires:  python3-sympy
36 #BuildRequires: python3-ufoLib2 >= 0.13.0
37 %if "%{py3_ver}" < "3.9"
38 BuildRequires:  python3-unicodedata2 >= 14.0.0
39 %endif
40 #BuildRequires: python3-zopfli >= 0.1.9
41 %endif
42 BuildRequires:  rpm-build >= 4.6
43 BuildRequires:  rpmbuild(macros) >= 1.714
44 %if %{with doc}
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
49 %endif
50 Requires:       python3-fonttools = %{version}-%{release}
51 Requires:       python3-setuptools
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
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
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
71 Requires:       python3-modules >= 1:3.7
72 %if "%{py3_ver}" < "3.9"
73 Requires:       python3-unicodedata2 >= 13.0.0.post2
74 %endif
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
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
94 %prep
95 %setup -q
96
97 %build
98 %py3_build
99
100 %if %{with tests}
101 PATH="$(pwd):$PATH" \
102 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
103 PYTHONPATH=$(pwd)/Lib \
104 %{__python3} -m pytest Tests
105 %endif
106
107 %if %{with doc}
108 PYTHONPATH=$(pwd)/Lib \
109 %{__make} -C Doc html \
110         SPHINXBUILD=sphinx-build-3
111 %endif
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115
116 %py3_install
117
118 # sources
119 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/fontTools/cu2qu/*.c
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %files
125 %defattr(644,root,root,755)
126 %doc LICENSE LICENSE.external NEWS.rst README.rst
127 %attr(755,root,root) %{_bindir}/fonttools
128 %attr(755,root,root) %{_bindir}/pyftmerge
129 %attr(755,root,root) %{_bindir}/pyftsubset
130 %attr(755,root,root) %{_bindir}/ttx
131 %{_mandir}/man1/ttx.1*
132
133 %files -n python3-fonttools
134 %defattr(644,root,root,755)
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
147 %{py3_sitedir}/fontTools/merge
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
161
162 %if %{with doc}
163 %files -n python3-fonttools-apidocs
164 %defattr(644,root,root,755)
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}
166 %endif
This page took 0.062621 seconds and 4 git commands to generate.