]> git.pld-linux.org Git - packages/python-keyring.git/blame - python-keyring.spec
- updated to 10.3.2, run tests
[packages/python-keyring.git] / python-keyring.spec
CommitLineData
9377d2b6
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
264e352d 4%bcond_without tests # py.test tests
9377d2b6
JB
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
5f9ca321 8%define module keyring
9377d2b6
JB
9Summary: Python 2 library to access the system keyring service
10Summary(pl.UTF-8): Biblioteka Pythona 2 do dostępu do systemowego pęku kluczy
5f9ca321 11Name: python-%{module}
264e352d 12Version: 10.3.2
81bd6d7f 13Release: 1
9377d2b6
JB
14License: MIT, PSF
15Group: Libraries/Python
264e352d
JB
16#Source0Download: https://pypi.python.org/simple/keyring
17Source0: https://files.pythonhosted.org/packages/source/k/keyring/%{module}-%{version}.tar.gz
18# Source0-md5: 20a2b23488b9da0c248b6c21a5d1154f
9377d2b6 19URL: https://pypi.python.org/pypi/keyring
9377d2b6
JB
20%if %{with python2}
21BuildRequires: python-devel >= 1:2.7
22BuildRequires: python-setuptools
81bd6d7f 23BuildRequires: python-setuptools_scm >= 1.15.0
9377d2b6
JB
24%if %{with tests}
25BuildRequires: python-pytest >= 2.8
81bd6d7f 26BuildRequires: python-secretstorage
9377d2b6
JB
27%endif
28%endif
29%if %{with python3}
81bd6d7f 30BuildRequires: python3-devel >= 1:3.3
9377d2b6 31BuildRequires: python3-setuptools
81bd6d7f 32BuildRequires: python3-setuptools_scm >= 1.15.0
9377d2b6
JB
33%if %{with tests}
34BuildRequires: python3-pytest >= 2.8
81bd6d7f 35BuildRequires: python3-secretstorage
9377d2b6
JB
36%endif
37%endif
38%if %{with doc}
39BuildRequires: python3-Sphinx
40BuildRequires: python3-rst.linker
41%endif
81bd6d7f
JB
42BuildRequires: rpm-pythonprov
43BuildRequires: rpmbuild(macros) >= 1.714
9377d2b6
JB
44Requires: python-modules >= 1:2.7
45# kwalletd5 through dbus
46Suggests: python-dbus
5f9ca321
ER
47Obsoletes: python-keyring-gnome < 0.5.1
48Obsoletes: python-keyring-kwallet < 0.5.1
49BuildArch: noarch
50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52%description
9377d2b6
JB
53The Python keyring library provides a easy way to access the system
54keyring service from Python. It can be used in any application that
55needs safe password storage.
56
57%description -l pl.UTF-8
58Biblioteka Pythona keyring udostępnia prosty sposób dostępu do usługi
59systemowego pęku kluczy z poziomu Pythona. Może być używana w dowolnej
60aplikacji wymagającej bezpiecznego przechowywania haseł.
61
62%package -n python3-%{module}
63Summary: Python 3 library to access the system keyring service
64Summary(pl.UTF-8): Biblioteka Pythona 3 do dostępu do systemowego pęku kluczy
65Group: Libraries/Python
66Requires: python3-modules >= 1:3.3
67# kwalletd5 through dbus
68Suggests: python-dbus
9377d2b6
JB
69
70%description -n python3-%{module}
5f9ca321 71The Python keyring lib provides a easy way to access the system
9377d2b6 72keyring service from Python. It can be used in any application that
5f9ca321
ER
73needs safe password storage.
74
9377d2b6
JB
75%description -n python3-%{module} -l pl.UTF-8
76Biblioteka Pythona keyring udostępnia prosty sposób dostępu do usługi
77systemowego pęku kluczy z poziomu Pythona. Może być używana w dowolnej
78aplikacji wymagającej bezpiecznego przechowywania haseł.
79
80%package apidocs
81Summary: API documentation for Python keyring library
82Summary(pl.UTF-8): Dokumentacja API biblioteki Pythona keyring
83Group: Documentation
84
85%description apidocs
86API documentation for Python keyring library.
87
88%description apidocs -l pl.UTF-8
89Dokumentacja API biblioteki Pythona keyring.
5f9ca321
ER
90
91%prep
92%setup -q -n %{module}-%{version}
93
94%build
9377d2b6 95%if %{with python2}
81bd6d7f
JB
96%py_build
97
264e352d 98%{?with_tests:PYTHON_PATH=$(pwd)/build-2/lib %{__python} -m pytest tests keyring/tests}
9377d2b6
JB
99%endif
100
101%if %{with python3}
81bd6d7f
JB
102%py3_build %{?with_doc:build_sphinx}
103
264e352d 104%{?with_tests:PYTHON_PATH=$(pwd)/build-3/lib %{__python3} -m pytest tests keyring/tests}
9377d2b6 105%endif
5f9ca321
ER
106
107%install
108rm -rf $RPM_BUILD_ROOT
5f9ca321 109
9377d2b6
JB
110%if %{with python3}
111%py3_install
5f9ca321 112
9377d2b6
JB
113%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/tests
114# "keyring" name is too generic, add -py[version] suffix
115%{__mv} $RPM_BUILD_ROOT%{_bindir}/keyring{,-py3}
116%endif
117
118%if %{with python2}
119%py_install
5f9ca321
ER
120
121%py_postclean
9377d2b6
JB
122%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/tests
123# "keyring" name is too generic, add -py[version] suffix
124%{__mv} $RPM_BUILD_ROOT%{_bindir}/keyring{,-py2}
125ln -sf keyring-py2 $RPM_BUILD_ROOT%{_bindir}/keyring-py
126%endif
5f9ca321
ER
127
128%clean
129rm -rf $RPM_BUILD_ROOT
130
9377d2b6 131%if %{with python2}
5f9ca321
ER
132%files
133%defattr(644,root,root,755)
9377d2b6
JB
134%doc CHANGES.rst README.rst
135%attr(755,root,root) %{_bindir}/keyring-py
136%attr(755,root,root) %{_bindir}/keyring-py2
137%{py_sitescriptdir}/keyring
138%{py_sitescriptdir}/keyring-%{version}-py*.egg-info
139%endif
140
141%if %{with python3}
142%files -n python3-%{module}
143%defattr(644,root,root,755)
144%doc CHANGES.rst README.rst
145%attr(755,root,root) %{_bindir}/keyring-py3
146%{py3_sitescriptdir}/keyring
147%{py3_sitescriptdir}/keyring-%{version}-py*.egg-info
148%endif
149
150%if %{with python3} && %{with doc}
151%files apidocs
152%defattr(644,root,root,755)
153%doc build-3/sphinx/html/{_static,*.html,*.js}
154%endif
This page took 0.094152 seconds and 4 git commands to generate.