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