]> git.pld-linux.org Git - packages/python3-zopfli.git/blob - python-zopfli.spec
- new
[packages/python3-zopfli.git] / python-zopfli.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Zopfli module for Python
8 Summary(pl.UTF-8):      Moduł zopfli dla Pythona
9 Name:           python-zopfli
10 Version:        0.1.9
11 Release:        1
12 License:        Apache v2.0
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/zopfli/
15 Source0:        https://files.pythonhosted.org/packages/source/z/zopfli/zopfli-%{version}.zip
16 # Source0-md5:  f66b6f4132533b9b0ab8b0af757237bf
17 URL:            https://pypi.org/project/zopfli/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.5
20 BuildRequires:  python-setuptools
21 BuildRequires:  python-setuptools_scm
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-modules >= 1:3.2
25 BuildRequires:  python3-setuptools
26 BuildRequires:  python3-setuptools_scm
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.714
30 BuildRequires:  unzip
31 Requires:       python-modules >= 1:2.5
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 pyzopfli is a straight forward wrapper around zopfli's ZlibCompress
36 method.
37
38 %description -l pl.UTF-8
39 pyzopfli to bezpośrednie obudowanie metody ZlibCompress biblioteki
40 zopfli.
41
42 %package -n python3-zopfli
43 Summary:        Zopfli module for Python
44 Summary(pl.UTF-8):      Moduł zopfli dla Pythona
45 Group:          Libraries/Python
46 Requires:       python3-modules >= 1:3.2
47
48 %description -n python3-zopfli
49 pyzopfli is a straight forward wrapper around zopfli's ZlibCompress
50 method.
51
52 %description -n python3-zopfli -l pl.UTF-8
53 pyzopfli to bezpośrednie obudowanie metody ZlibCompress biblioteki
54 zopfli.
55
56 %prep
57 %setup -q -n zopfli-%{version}
58
59 %build
60 %if %{with python2}
61 %py_build
62
63 %if %{with tests}
64 PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
65 %{__python} tests/tests.py
66 %endif
67 %endif
68
69 %if %{with python3}
70 %py3_build
71
72 %if %{with tests}
73 PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
74 %{__python3} tests/tests.py
75 %endif
76 %endif
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %if %{with python2}
82 %py_install
83
84 %py_postclean
85 %endif
86
87 %if %{with python3}
88 %py3_install
89 %endif
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %if %{with python2}
95 %files
96 %defattr(644,root,root,755)
97 %doc README.rst
98 %dir %{py_sitedir}/zopfli
99 %attr(755,root,root) %{py_sitedir}/zopfli/zopfli.so
100 %{py_sitedir}/zopfli/*.py[co]
101 %{py_sitedir}/zopfli-%{version}-py*.egg-info
102 %endif
103
104 %if %{with python3}
105 %files -n python3-zopfli
106 %defattr(644,root,root,755)
107 %dir %{py3_sitedir}/zopfli
108 %attr(755,root,root) %{py3_sitedir}/zopfli/zopfli.cpython-*.so
109 %{py3_sitedir}/zopfli/*.py
110 %{py3_sitedir}/zopfli/__pycache__
111 %{py3_sitedir}/zopfli-%{version}-py*.egg-info
112 %endif
This page took 0.070648 seconds and 3 git commands to generate.