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