]> git.pld-linux.org Git - packages/python-fonttools.git/blame - python-fonttools.spec
- added singledispatch patch (fix plistlib with singledispatch 3.7); release 6
[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
7c462756
JB
8Summary: Python 2 tools to manipulate font files
9Summary(pl.UTF-8): Narzędzia do manipulacji na plikach fontów dla Pythona 2
7a669b0a 10Name: python-fonttools
af4425a8 11Version: 3.44.0
8980ce56 12Release: 6
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
8980ce56 20Patch0: %{name}-singledispatch.patch
e4814ebe
JB
21URL: https://github.com/fonttools/fonttools
22%if %(locale -a | grep -q '^C\.utf8$'; echo $?)
23BuildRequires: glibc-localedb-all
24%endif
25%if %{with python2}
26BuildRequires: python-devel >= 1:2.7
27BuildRequires: python-setuptools
28%if %{with tests}
af4425a8
JB
29BuildRequires: python-enum34 >= 1.1.6
30BuildRequires: python-fs >= 2.2.0
e4814ebe 31BuildRequires: python-pytest >= 3.0
af4425a8 32BuildRequires: python-unicodedata2 >= 12.0.0
e4814ebe
JB
33%endif
34%endif
35%if %{with python3}
36BuildRequires: python3-devel >= 1:3.4
37%if %{with tests}
af4425a8 38BuildRequires: python3-fs >= 2.2.0
e4814ebe 39BuildRequires: python3-pytest >= 3.0
6c07898f 40%if "%{py3_ver}" < "3.7"
af4425a8 41BuildRequires: python3-unicodedata2 >= 12.0.0
6c07898f 42%endif
e4814ebe
JB
43%endif
44%endif
45BuildRequires: rpmbuild(macros) >= 1.714
af4425a8 46%if %{with doc}
7a669b0a 47BuildRequires: sphinx-pdg-2 >= 1.5.5
af4425a8 48%endif
7c462756
JB
49Requires: python-modules >= 1:2.7
50Requires: python-unicodedata2 >= 12.0.0
e4814ebe 51BuildArch: noarch
77da64f4
AM
52BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54%description
e4814ebe
JB
55Python 2 tools to manipulate font files.
56
7c462756 57%description -l pl.UTF-8
e4814ebe
JB
58Narzędzia do manipulacji na plikach fontów dla Pythona 2.
59
7c462756 60%package apidocs
e4814ebe
JB
61Summary: Documentation for Python fonttools module
62Summary(pl.UTF-8): Dokumentacja modułu Pythona fonttools
63Group: Documentation
64
7c462756 65%description apidocs
e4814ebe
JB
66Documentation for Python fonttools module.
67
7c462756 68%description apidocs -l pl.UTF-8
e4814ebe
JB
69Dokumentacja modułu Pythona fonttools.
70
71%package -n python3-fonttools
72Summary: Python 3 tools to manipulate font files
73Summary(pl.UTF-8): Narzędzia do manipulacji na plikach fontów dla Pythona 3
74Group: Libraries/Python
75Requires: python3-modules >= 1:3.4
6c07898f 76%if "%{py3_ver}" < "3.7"
805b814f 77Requires: python3-unicodedata2 >= 12.0.0
6c07898f 78%endif
e4814ebe
JB
79
80%description -n python3-fonttools
81Python 3 tools to manipulate font files.
82
83%description -n python3-fonttools -l pl.UTF-8
84Narzędzia do manipulacji na plikach fontów dla Pythona 3.
85
77da64f4 86%prep
7a669b0a 87%setup -q -n fonttools-%{version}
8980ce56 88%patch0 -p1
77da64f4 89
77da64f4 90%build
e4814ebe
JB
91export LC_ALL=C.UTF-8
92%if %{with python2}
af4425a8
JB
93%py_build
94
95%if %{with tests}
8980ce56 96PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
af4425a8
JB
97PYTHONPATH=Lib \
98%{__python} -m pytest Tests
e4814ebe
JB
99%endif
100%endif
101
102%if %{with python3}
af4425a8
JB
103%py3_build
104
105%if %{with tests}
8980ce56 106PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
af4425a8
JB
107PYTHONPATH=Lib \
108%{__python} -m pytest Tests
109%endif
110%endif
111
112%if %{with doc}
7a669b0a 113PYTHONPATH=$(pwd)/build-2/lib \
af4425a8 114%{__make} -C Doc html \
7a669b0a 115 SPHINXBUILD=sphinx-build-2
e4814ebe 116%endif
77da64f4
AM
117
118%install
119rm -rf $RPM_BUILD_ROOT
baf8eefc 120
e4814ebe
JB
121%if %{with python3}
122%py3_install
123%endif
124
125%if %{with python2}
126%py_install
77da64f4 127
baf8eefc 128%py_postclean
e4814ebe 129%endif
77da64f4 130
7a669b0a
JB
131# packaged from fonttools.spec
132%{__rm} -r $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
133
77da64f4
AM
134%clean
135rm -rf $RPM_BUILD_ROOT
136
e4814ebe 137%if %{with python2}
7c462756 138%files
e4814ebe
JB
139%defattr(644,root,root,755)
140%{py_sitescriptdir}/fontTools
141%{py_sitescriptdir}/fonttools-%{version}-py*.egg-info
142
143%if %{with doc}
7c462756 144%files apidocs
e4814ebe
JB
145%defattr(644,root,root,755)
146%doc Doc/build/html/{_static,designspaceLib,misc,pens,ttLib,varLib,*.html,*.js}
147%endif
148%endif
149
150%if %{with python3}
151%files -n python3-fonttools
152%defattr(644,root,root,755)
153%{py3_sitescriptdir}/fontTools
154%{py3_sitescriptdir}/fonttools-%{version}-py*.egg-info
155%endif
This page took 0.102329 seconds and 4 git commands to generate.