]> git.pld-linux.org Git - packages/python-fonttools.git/blob - python-fonttools.spec
74a25c50a1a0052623e5bee51686c8c5454c0173
[packages/python-fonttools.git] / python-fonttools.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_with     python3 # CPython 3.x module (version 4+ built from fonttools.spec)
5 %bcond_without  doc     # Sphinx documentation
6 %bcond_without  tests   # pytest tests
7
8 Summary:        A tool to convert TrueType/OpenType fonts to XML and back
9 Summary(pl.UTF-8):      Narzędzie do konwersji fontów TrueType/OpenType do/z XML-a
10 Name:           python-fonttools
11 Version:        3.44.0
12 Release:        5
13 # basic license is BSD
14 # FontTools includes Adobe AGL & AGLFN, which is under 3-clauses BSD license
15 License:        MIT, BSD
16 Group:          Development/Tools
17 #Source0Download: https://github.com/fonttools/fonttools/releases
18 Source0:        https://github.com/fonttools/fonttools/archive/%{version}/fonttools-%{version}.tar.gz
19 # Source0-md5:  3f9ff311081a0f591a09552902671d29
20 URL:            https://github.com/fonttools/fonttools
21 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
22 BuildRequires:  glibc-localedb-all
23 %endif
24 %if %{with python2}
25 BuildRequires:  python-devel >= 1:2.7
26 BuildRequires:  python-setuptools
27 %if %{with tests}
28 BuildRequires:  python-enum34 >= 1.1.6
29 BuildRequires:  python-fs >= 2.2.0
30 BuildRequires:  python-pytest >= 3.0
31 BuildRequires:  python-unicodedata2 >= 12.0.0
32 %endif
33 %endif
34 %if %{with python3}
35 BuildRequires:  python3-devel >= 1:3.4
36 %if %{with tests}
37 BuildRequires:  python3-fs >= 2.2.0
38 BuildRequires:  python3-pytest >= 3.0
39 %if "%{py3_ver}" < "3.7"
40 BuildRequires:  python3-unicodedata2 >= 12.0.0
41 %endif
42 %endif
43 %endif
44 BuildRequires:  rpm-build >= 4.6
45 BuildRequires:  rpmbuild(macros) >= 1.714
46 %if %{with doc}
47 BuildRequires:  sphinx-pdg-2 >= 1.5.5
48 %endif
49 BuildArch:      noarch
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
53 TTX/FontTools is a tool for manipulating TrueType and OpenType fonts.
54 It is written in Python and has a BSD-style, open-source license. TTX
55 can dump TrueType and OpenType fonts to an XML-based text format and
56 vice versa.
57
58 %description -l pl.UTF-8
59 TTX/FontTools to narzędzie do operacji na fontach TrueType i OpenType.
60 Zostało napisane w Pythonie i ma otwartą licencję w stylu BSD. TTX
61 potrafi wykonywać zrzuty fontów TrueType i OpenType do formatu
62 tekstowego opartego na XML-u oraz dokonać operacji odwrotnej.
63
64 %package -n python-fonttools
65 Summary:        Python 2 tools to manipulate font files
66 Summary(pl.UTF-8):      Narzędzia do manipulacji na plikach fontów dla Pythona 2
67 Group:          Libraries/Python
68 Requires:       python-modules >= 1:2.7
69 Requires:       python-unicodedata2 >= 12.0.0
70
71 %description -n python-fonttools
72 Python 2 tools to manipulate font files.
73
74 %description -n python-fonttools -l pl.UTF-8
75 Narzędzia do manipulacji na plikach fontów dla Pythona 2.
76
77 %package -n python-fonttools-apidocs
78 Summary:        Documentation for Python fonttools module
79 Summary(pl.UTF-8):      Dokumentacja modułu Pythona fonttools
80 Group:          Documentation
81 BuildArch:      noarch
82
83 %description -n python-fonttools-apidocs
84 Documentation for Python fonttools module.
85
86 %description -n python-fonttools-apidocs -l pl.UTF-8
87 Dokumentacja modułu Pythona fonttools.
88
89 %package -n python3-fonttools
90 Summary:        Python 3 tools to manipulate font files
91 Summary(pl.UTF-8):      Narzędzia do manipulacji na plikach fontów dla Pythona 3
92 Group:          Libraries/Python
93 Requires:       python3-modules >= 1:3.4
94 %if "%{py3_ver}" < "3.7"
95 Requires:       python3-unicodedata2 >= 12.0.0
96 %endif
97
98 %description -n python3-fonttools
99 Python 3 tools to manipulate font files.
100
101 %description -n python3-fonttools -l pl.UTF-8
102 Narzędzia do manipulacji na plikach fontów dla Pythona 3.
103
104 %prep
105 %setup -q -n fonttools-%{version}
106
107 %build
108 export LC_ALL=C.UTF-8
109 %if %{with python2}
110 %py_build
111
112 %if %{with tests}
113 PYTHONPATH=Lib \
114 %{__python} -m pytest Tests
115 %endif
116 %endif
117
118 %if %{with python3}
119 %py3_build
120
121 %if %{with tests}
122 PYTHONPATH=Lib \
123 %{__python} -m pytest Tests
124 %endif
125 %endif
126
127 %if %{with doc}
128 PYTHONPATH=$(pwd)/build-2/lib \
129 %{__make} -C Doc html \
130         SPHINXBUILD=sphinx-build-2
131 %endif
132
133 %install
134 rm -rf $RPM_BUILD_ROOT
135
136 %if %{with python3}
137 %py3_install
138 %endif
139
140 %if %{with python2}
141 %py_install
142
143 %py_postclean
144 %endif
145
146 # packaged from fonttools.spec
147 %{__rm} -r $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
148
149 %clean
150 rm -rf $RPM_BUILD_ROOT
151
152 %if %{with python2}
153 %files -n python-fonttools
154 %defattr(644,root,root,755)
155 %{py_sitescriptdir}/fontTools
156 %{py_sitescriptdir}/fonttools-%{version}-py*.egg-info
157
158 %if %{with doc}
159 %files -n python-fonttools-apidocs
160 %defattr(644,root,root,755)
161 %doc Doc/build/html/{_static,designspaceLib,misc,pens,ttLib,varLib,*.html,*.js}
162 %endif
163 %endif
164
165 %if %{with python3}
166 %files -n python3-fonttools
167 %defattr(644,root,root,755)
168 %{py3_sitescriptdir}/fontTools
169 %{py3_sitescriptdir}/fonttools-%{version}-py*.egg-info
170 %endif
This page took 0.043898 seconds and 2 git commands to generate.