]>
Commit | Line | Data |
---|---|---|
9377d2b6 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Sphinx documentation | |
264e352d | 4 | %bcond_without tests # py.test tests |
9377d2b6 | 5 | |
5f9ca321 | 6 | %define module keyring |
171cb65f JP |
7 | Summary: Python 3 library to access the system keyring service |
8 | Summary(pl.UTF-8): Biblioteka Pythona 3 do dostępu do systemowego pęku kluczy | |
9 | Name: python3-%{module} | |
10 | Version: 23.5.0 | |
11 | Release: 1 | |
9377d2b6 JB |
12 | License: MIT, PSF |
13 | Group: Libraries/Python | |
264e352d JB |
14 | #Source0Download: https://pypi.python.org/simple/keyring |
15 | Source0: https://files.pythonhosted.org/packages/source/k/keyring/%{module}-%{version}.tar.gz | |
171cb65f | 16 | # Source0-md5: 4cdb787d6b2f4549b8ad63ec46674ea3 |
9377d2b6 | 17 | URL: https://pypi.python.org/pypi/keyring |
171cb65f | 18 | BuildRequires: python3-devel >= 1:3.7 |
9377d2b6 | 19 | BuildRequires: python3-setuptools |
81bd6d7f | 20 | BuildRequires: python3-setuptools_scm >= 1.15.0 |
9377d2b6 | 21 | %if %{with tests} |
bc84d0b6 | 22 | BuildRequires: python3-entrypoints |
9377d2b6 | 23 | BuildRequires: python3-pytest >= 2.8 |
bc84d0b6 | 24 | BuildRequires: python3-pytest-flake8 |
81bd6d7f | 25 | BuildRequires: python3-secretstorage |
9377d2b6 | 26 | %endif |
9377d2b6 | 27 | %if %{with doc} |
171cb65f JP |
28 | BuildRequires: python3-Sphinx |
29 | BuildRequires: python3-jaraco.packaging >= 3.2 | |
30 | BuildRequires: python3-rst.linker >= 1.9 | |
9377d2b6 | 31 | %endif |
81bd6d7f JB |
32 | BuildRequires: rpm-pythonprov |
33 | BuildRequires: rpmbuild(macros) >= 1.714 | |
171cb65f | 34 | Requires: python3-modules >= 1:3.7 |
9377d2b6 | 35 | # kwalletd5 through dbus |
171cb65f | 36 | Suggests: python3-dbus |
5f9ca321 ER |
37 | BuildArch: noarch |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %description | |
9377d2b6 JB |
41 | The Python keyring library provides a easy way to access the system |
42 | keyring service from Python. It can be used in any application that | |
43 | needs safe password storage. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Biblioteka Pythona keyring udostępnia prosty sposób dostępu do usługi | |
47 | systemowego pęku kluczy z poziomu Pythona. Może być używana w dowolnej | |
48 | aplikacji wymagającej bezpiecznego przechowywania haseł. | |
49 | ||
9377d2b6 JB |
50 | %package apidocs |
51 | Summary: API documentation for Python keyring library | |
52 | Summary(pl.UTF-8): Dokumentacja API biblioteki Pythona keyring | |
53 | Group: Documentation | |
54 | ||
55 | %description apidocs | |
56 | API documentation for Python keyring library. | |
57 | ||
58 | %description apidocs -l pl.UTF-8 | |
59 | Dokumentacja API biblioteki Pythona keyring. | |
5f9ca321 ER |
60 | |
61 | %prep | |
62 | %setup -q -n %{module}-%{version} | |
63 | ||
64 | %build | |
171cb65f | 65 | %py3_build %{?with_doc:build_sphinx} |
81bd6d7f | 66 | |
bc84d0b6 JB |
67 | %if %{with tests} |
68 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
69 | PYTEST_PLUGINS="pytest_flake8" \ | |
70 | PYTHONPATH=$(pwd)/build-3/lib \ | |
71 | %{__python3} -m pytest tests keyring/tests | |
72 | %endif | |
5f9ca321 ER |
73 | |
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
5f9ca321 | 76 | |
9377d2b6 | 77 | %py3_install |
5f9ca321 | 78 | |
9377d2b6 JB |
79 | # "keyring" name is too generic, add -py[version] suffix |
80 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/keyring{,-py3} | |
5f9ca321 ER |
81 | |
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
9377d2b6 JB |
85 | %files -n python3-%{module} |
86 | %defattr(644,root,root,755) | |
87 | %doc CHANGES.rst README.rst | |
88 | %attr(755,root,root) %{_bindir}/keyring-py3 | |
89 | %{py3_sitescriptdir}/keyring | |
90 | %{py3_sitescriptdir}/keyring-%{version}-py*.egg-info | |
9377d2b6 | 91 | |
171cb65f | 92 | %if %{with doc} |
9377d2b6 JB |
93 | %files apidocs |
94 | %defattr(644,root,root,755) | |
bc84d0b6 | 95 | %doc build-2/sphinx/html/{_static,*.html,*.js} |
9377d2b6 | 96 | %endif |