]>
Commit | Line | Data |
---|---|---|
b5302c4a JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | ||
5 | Summary: CFF table subroutinizer for FontTools | |
6 | Summary(pl.UTF-8): Generator podprocedur tablic CFF dla FontTools | |
7 | Name: python3-compreffor | |
8 | Version: 0.5.1.post1 | |
e1ae6db8 | 9 | Release: 2 |
b5302c4a JB |
10 | License: Apache v2.0 |
11 | Group: Libraries/Python | |
12 | #Source0Download: https://pypi.org/simple/compreffor/ | |
13 | Source0: https://files.pythonhosted.org/packages/source/c/compreffor/compreffor-%{version}.tar.gz | |
14 | # Source0-md5: 1d7014180b5e18219bc1578d40cc312c | |
15 | URL: https://pypi.org/project/compreffor/ | |
16 | BuildRequires: libstdc++-devel >= 6:4.3 | |
17 | BuildRequires: python3-Cython >= 0.29.24 | |
18 | BuildRequires: python3-devel >= 1:3.6 | |
19 | BuildRequires: python3-setuptools | |
20 | BuildRequires: python3-setuptools_scm | |
21 | BuildRequires: python3-setuptools_git_ls_files | |
22 | %if %{with tests} | |
23 | BuildRequires: python3-fonttools >= 4 | |
24 | BuildRequires: python3-pytest >= 2.8 | |
25 | %endif | |
26 | BuildRequires: rpm-pythonprov | |
27 | BuildRequires: rpmbuild(macros) >= 1.714 | |
28 | BuildRequires: sed >= 4.0 | |
29 | Requires: python3-modules >= 1:3.6 | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | CFF table subroutinizer for FontTools. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | Generator podprocedur tablic CFF dla FontTools. | |
37 | ||
38 | %prep | |
39 | %setup -q -n compreffor-%{version} | |
40 | ||
41 | # move out of compreffor dir, so that: | |
42 | # - `import compreffor` can search built-* dirs with binary modules instead of src | |
43 | # - we don't package tests | |
44 | %{__mv} src/python/compreffor/test tests | |
45 | %{__sed} -i -e 's/compreffor\.test\.dummy/.dummy/' tests/pyCompressor_test.py | |
46 | ||
47 | %build | |
48 | %py3_build | |
49 | ||
50 | %if %{with tests} | |
51 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
52 | PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \ | |
53 | %{__python3} -m pytest tests | |
54 | %endif | |
55 | ||
56 | %install | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %py3_install | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %files | |
65 | %defattr(644,root,root,755) | |
66 | %doc README.rst | |
67 | %attr(755,root,root) %{_bindir}/compreffor | |
68 | %dir %{py3_sitedir}/compreffor | |
69 | %attr(755,root,root) %{py3_sitedir}/compreffor/_compreffor.cpython-*.so | |
70 | %{py3_sitedir}/compreffor/*.py | |
71 | %{py3_sitedir}/compreffor/__pycache__ | |
72 | %{py3_sitedir}/compreffor-%{version}-py*.egg-info |