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