]> git.pld-linux.org Git - packages/python-fonttools.git/blob - python-fonttools.spec
791d97b00cd86dc52adf64005272202e827db6fb
[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:        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:  rpmbuild(macros) >= 1.714
45 %if %{with doc}
46 BuildRequires:  sphinx-pdg-2 >= 1.5.5
47 %endif
48 Requires:       python-modules >= 1:2.7
49 Requires:       python-unicodedata2 >= 12.0.0
50 BuildArch:      noarch
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %description
54 Python 2 tools to manipulate font files.
55
56 %description -l pl.UTF-8
57 Narzędzia do manipulacji na plikach fontów dla Pythona 2.
58
59 %package apidocs
60 Summary:        Documentation for Python fonttools module
61 Summary(pl.UTF-8):      Dokumentacja modułu Pythona fonttools
62 Group:          Documentation
63
64 %description apidocs
65 Documentation for Python fonttools module.
66
67 %description apidocs -l pl.UTF-8
68 Dokumentacja modułu Pythona fonttools.
69
70 %package -n python3-fonttools
71 Summary:        Python 3 tools to manipulate font files
72 Summary(pl.UTF-8):      Narzędzia do manipulacji na plikach fontów dla Pythona 3
73 Group:          Libraries/Python
74 Requires:       python3-modules >= 1:3.4
75 %if "%{py3_ver}" < "3.7"
76 Requires:       python3-unicodedata2 >= 12.0.0
77 %endif
78
79 %description -n python3-fonttools
80 Python 3 tools to manipulate font files.
81
82 %description -n python3-fonttools -l pl.UTF-8
83 Narzędzia do manipulacji na plikach fontów dla Pythona 3.
84
85 %prep
86 %setup -q -n fonttools-%{version}
87
88 %build
89 export LC_ALL=C.UTF-8
90 %if %{with python2}
91 %py_build
92
93 %if %{with tests}
94 PYTHONPATH=Lib \
95 %{__python} -m pytest Tests
96 %endif
97 %endif
98
99 %if %{with python3}
100 %py3_build
101
102 %if %{with tests}
103 PYTHONPATH=Lib \
104 %{__python} -m pytest Tests
105 %endif
106 %endif
107
108 %if %{with doc}
109 PYTHONPATH=$(pwd)/build-2/lib \
110 %{__make} -C Doc html \
111         SPHINXBUILD=sphinx-build-2
112 %endif
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116
117 %if %{with python3}
118 %py3_install
119 %endif
120
121 %if %{with python2}
122 %py_install
123
124 %py_postclean
125 %endif
126
127 # packaged from fonttools.spec
128 %{__rm} -r $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %if %{with python2}
134 %files
135 %defattr(644,root,root,755)
136 %{py_sitescriptdir}/fontTools
137 %{py_sitescriptdir}/fonttools-%{version}-py*.egg-info
138
139 %if %{with doc}
140 %files apidocs
141 %defattr(644,root,root,755)
142 %doc Doc/build/html/{_static,designspaceLib,misc,pens,ttLib,varLib,*.html,*.js}
143 %endif
144 %endif
145
146 %if %{with python3}
147 %files -n python3-fonttools
148 %defattr(644,root,root,755)
149 %{py3_sitescriptdir}/fontTools
150 %{py3_sitescriptdir}/fonttools-%{version}-py*.egg-info
151 %endif
This page took 0.088265 seconds and 2 git commands to generate.