3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # unit tests [require dbus and some Secret Service daemon running]
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Python 2 bindings to Freedesktop.org Secret Service API
9 Summary(pl.UTF-8): Wiązania Pythona 2 do API Secret Service z Freedesktop.org
10 Name: python-secretstorage
14 Group: Libraries/Python
15 #Source0Download: https://pypi.python.org/simple/secretstorage
16 Source0: https://pypi.python.org/packages/24/af/50f2324784ee65e2b752624144249c7710e761be437dd82815ff86d3021f/SecretStorage-%{version}.tar.gz
17 # Source0-md5: 9a6f9e4c9962e6cd616624c331fce1ab
18 URL: https://github.com/mitya57/secretstorage
19 BuildRequires: rpm-pythonprov
20 # for the py_build, py_install macros
21 BuildRequires: rpmbuild(macros) >= 1.714
23 BuildRequires: python-modules >= 1:2.7
24 BuildRequires: python-setuptools
26 BuildRequires: python-discover
30 BuildRequires: python3-modules >= 1:3.2
31 BuildRequires: python3-setuptools
33 BuildRequires: python3-Sphinx
36 BuildRequires: python3-discover
39 Requires: python-modules >= 1:2.7
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 This module provides a way for securely storing passwords and other
47 It uses D-Bus Secret Service API that is supported by GNOME Keyring
48 (since version 2.30) and KSecretsService.
50 %description -l pl.UTF-8
51 Ten moduł udostępnia sposób bezpiecznego przechowywania haseł i innych
54 Wykorzystuje API D-Bus Secret Service, obsługiwane przez GNOME Keyring
55 (od wersji 2.30) oraz KSecretsService.
57 %package -n python3-secretstorage
58 Summary: Python 3 bindings to Freedesktop.org Secret Service API
59 Summary(pl.UTF-8): Wiązania Pythona 3 do API Secret Service z Freedesktop.org
60 Group: Libraries/Python
61 Requires: python3-modules >= 1:3.2
63 %description -n python3-secretstorage
64 This module provides a way for securely storing passwords and other
67 It uses D-Bus Secret Service API that is supported by GNOME Keyring
68 (since version 2.30) and KSecretsService.
70 %description -n python3-secretstorage -l pl.UTF-8
71 Ten moduł udostępnia sposób bezpiecznego przechowywania haseł i innych
74 Wykorzystuje API D-Bus Secret Service, obsługiwane przez GNOME Keyring
75 (od wersji 2.30) oraz KSecretsService.
78 Summary: secretstorage API documentation
79 Summary(pl.UTF-8): Dokumentacja API secretstorage
83 API documentation for secretstorage.
85 %description apidocs -l pl.UTF-8
86 Dokumentacja API secretstorage.
89 %setup -q -n SecretStorage-%{version}
93 %py_build %{?with_tests:test}
96 %{__python} -m unittest discover -s tests
101 %py3_build %{?with_tests:test} %{?with_doc:build_sphinx}
104 %{__python3} -m unittest discover -s tests
109 rm -rf $RPM_BUILD_ROOT
122 rm -rf $RPM_BUILD_ROOT
126 %defattr(644,root,root,755)
127 %doc LICENSE README.rst changelog
128 %{py_sitescriptdir}/secretstorage
129 %{py_sitescriptdir}/SecretStorage-%{version}-py*.egg-info
133 %files -n python3-secretstorage
134 %defattr(644,root,root,755)
135 %doc LICENSE README.rst changelog
136 %{py3_sitescriptdir}/secretstorage
137 %{py3_sitescriptdir}/SecretStorage-%{version}-py*.egg-info
142 %defattr(644,root,root,755)
143 %doc build-3/sphinx/html/{_modules,_static,*.html,*.js}