]>
Commit | Line | Data |
---|---|---|
df903a44 JB |
1 | # |
2 | # conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | # | |
6 | Summary: A Python 2 wrapper for the GPGME library | |
7 | Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki GPGME | |
dfd379f0 | 8 | Name: python-pygpgme |
df903a44 | 9 | Version: 0.3 |
65cd52ce | 10 | Release: 8 |
fcb91f40 | 11 | License: LGPL v2.1+ |
dfd379f0 | 12 | Group: Libraries/Python |
df903a44 JB |
13 | Source0: https://pypi.python.org/packages/source/p/pygpgme/pygpgme-%{version}.tar.gz |
14 | # Source0-md5: d38355af73f0352cde3d410b25f34fd0 | |
dfd379f0 | 15 | URL: https://launchpad.net/products/pygpgme |
55b798fe | 16 | BuildRequires: gpgme-devel |
df903a44 JB |
17 | %if %{with python2} |
18 | BuildRequires: python-devel >= 1:2.4 | |
19 | BuildRequires: python-modules >= 1:2.4 | |
20 | %endif | |
21 | %if %{with python3} | |
e90d87b7 ER |
22 | BuildRequires: python3-devel >= 1:3.2 |
23 | BuildRequires: python3-modules >= 1:3.2 | |
df903a44 | 24 | %endif |
df8cdd13 | 25 | BuildRequires: rpm-pythonprov |
672ca669 | 26 | BuildRequires: rpmbuild(macros) >= 1.710 |
df903a44 | 27 | Requires: python-modules |
dfd379f0 PZ |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
31 | PyGPGME is a Python module that lets you sign, verify, encrypt and | |
32 | decrypt messages using the OpenPGP format. | |
33 | ||
df903a44 JB |
34 | This package contains Python 2 module. |
35 | ||
fcb91f40 JB |
36 | %description -l pl.UTF-8 |
37 | PyGPGME to moduł Pythona pozwalający podpisywać, weryfikować, | |
38 | szyfrować i odszyfrowywać wiadomości w formacie OpenPGP. | |
39 | ||
df903a44 JB |
40 | Ten pakiet zawiera moduł Pythona 2. |
41 | ||
42 | %package -n python3-pygpgme | |
43 | Summary: A Python 3 wrapper for the GPGME library | |
44 | Summary(pl.UTF-8): Interfejs Pythona 3 do biblioteki GPGME | |
45 | Group: Libraries/Python | |
46 | Requires: python3-modules | |
47 | ||
48 | %description -n python3-pygpgme | |
49 | PyGPGME is a Python module that lets you sign, verify, encrypt and | |
50 | decrypt messages using the OpenPGP format. | |
51 | ||
52 | This package contains Python 3 module. | |
53 | ||
54 | %description -n python3-pygpgme -l pl.UTF-8 | |
55 | PyGPGME to moduł Pythona pozwalający podpisywać, weryfikować, | |
56 | szyfrować i odszyfrowywać wiadomości w formacie OpenPGP. | |
57 | ||
58 | Ten pakiet zawiera moduł Pythona 3. | |
59 | ||
dfd379f0 PZ |
60 | %prep |
61 | %setup -q -n pygpgme-%{version} | |
62 | ||
63 | %build | |
df903a44 | 64 | %if %{with python2} |
32fe4c8f | 65 | %py_build |
df903a44 JB |
66 | %endif |
67 | ||
68 | %if %{with python3} | |
32fe4c8f | 69 | %py3_build |
df903a44 | 70 | %endif |
dfd379f0 PZ |
71 | |
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
df903a44 JB |
74 | |
75 | %if %{with python2} | |
32fe4c8f | 76 | %py_install |
dfd379f0 | 77 | |
55b798fe | 78 | %py_postclean |
df903a44 JB |
79 | %endif |
80 | ||
81 | %if %{with python3} | |
32fe4c8f | 82 | %py3_install |
df903a44 | 83 | %endif |
dfd379f0 PZ |
84 | |
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
df903a44 | 88 | %if %{with python2} |
dfd379f0 PZ |
89 | %files |
90 | %defattr(644,root,root,755) | |
df903a44 | 91 | %doc NEWS README |
dfd379f0 PZ |
92 | %dir %{py_sitedir}/gpgme |
93 | %attr(755,root,root) %{py_sitedir}/gpgme/_gpgme.so | |
94 | %{py_sitedir}/gpgme/*.py[co] | |
55b798fe ER |
95 | %if "%{py_ver}" > "2.4" |
96 | %{py_sitedir}/pygpgme-%{version}-py*.egg-info | |
97 | %endif | |
df903a44 JB |
98 | %endif |
99 | ||
100 | %if %{with python3} | |
101 | %files -n python3-pygpgme | |
102 | %defattr(644,root,root,755) | |
103 | %doc NEWS README | |
104 | %dir %{py3_sitedir}/gpgme | |
105 | %attr(755,root,root) %{py3_sitedir}/gpgme/_gpgme.cpython-*.so | |
106 | %{py3_sitedir}/gpgme/*.py | |
107 | %{py3_sitedir}/gpgme/__pycache__ | |
108 | %{py3_sitedir}/pygpgme-%{version}-py*.egg-info | |
109 | %endif |