]>
Commit | Line | Data |
---|---|---|
943a3032 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | ||
5 | Summary: PSAutoHint - standalone version of AFDKO's autohinter | |
6 | Summary(pl.UTF-8): PSAutoHint - samodzielna wersja autohintera z AFDKO | |
7 | Name: psautohint | |
f1ab17d4 | 8 | Version: 2.4.0 |
163d5e72 | 9 | Release: 2 |
943a3032 JB |
10 | License: Apache v2.0 |
11 | Group: Applications/Publishing | |
12 | #Source0Download: https://github.com/adobe-type-tools/psautohint/releases | |
f1ab17d4 JB |
13 | Source0: https://github.com/adobe-type-tools/psautohint/releases/download/v%{version}/%{name}-%{version}.tar.gz |
14 | # Source0-md5: f626eb26eb635903b1f32f6c1dcf77e5 | |
943a3032 | 15 | URL: https://github.com/adobe-type-tools/psautohint |
f1ab17d4 JB |
16 | BuildRequires: python3 >= 1:3.7 |
17 | BuildRequires: python3-setuptools >= 1:36.4 | |
18 | BuildRequires: python3-setuptools_scm >= 2.1 | |
943a3032 JB |
19 | %if %{with tests} |
20 | # fonttools[ufo] | |
f1ab17d4 | 21 | BuildRequires: python3-fonttools >= 4.29.0 |
943a3032 | 22 | BuildRequires: python3-fs >= 2.2.0 |
f1ab17d4 | 23 | BuildRequires: python3-lxml >= 4.7.1 |
943a3032 | 24 | BuildRequires: python3-pytest >= 5.3.0 |
f1ab17d4 | 25 | BuildRequires: python3-pytest-randomly >= 1.2.3 |
943a3032 | 26 | %endif |
f1ab17d4 JB |
27 | BuildRequires: rpm-pythonprov |
28 | BuildRequires: rpmbuild(macros) >= 1.714 | |
29 | BuildRequires: sed >= 4.0 | |
30 | Requires: python3 >= 1:3.7 | |
943a3032 JB |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
34 | PSAutoHint - standalone version of AFDKO's autohinter. | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | PSAutoHint - samodzielna wersja autohintera z AFDKO. | |
38 | ||
39 | %prep | |
40 | %setup -q | |
41 | ||
f1ab17d4 JB |
42 | # disable pytest-xdist |
43 | %{__sed} -i '/-n auto/d' pytest.ini | |
44 | ||
943a3032 JB |
45 | %build |
46 | %py3_build | |
47 | ||
48 | %if %{with tests} | |
49 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
50 | PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \ | |
51 | %{__python3} -m pytest -v -r a tests/unittests | |
52 | %endif | |
53 | ||
54 | %install | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %py3_install | |
58 | ||
59 | %clean | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %files | |
63 | %defattr(644,root,root,755) | |
64 | %doc COPYING NEWS.md README.md | |
65 | %attr(755,root,root) %{_bindir}/psautohint | |
66 | %attr(755,root,root) %{_bindir}/psstemhist | |
67 | %dir %{py3_sitedir}/psautohint | |
68 | %attr(755,root,root) %{py3_sitedir}/psautohint/_psautohint.cpython-*.so | |
69 | %{py3_sitedir}/psautohint/*.py | |
70 | %{py3_sitedir}/psautohint/__pycache__ | |
71 | %{py3_sitedir}/psautohint-%{version}-py*.egg-info |