]> git.pld-linux.org Git - packages/python-keyring.git/blame_incremental - python-keyring.spec
- updated to 10.3; secretservice is now obligatory dependency
[packages/python-keyring.git] / python-keyring.spec
... / ...
CommitLineData
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
8%define module keyring
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
11Name: python-%{module}
12Version: 10.3
13Release: 1
14License: MIT, PSF
15Group: Libraries/Python
16Source0: https://pypi.python.org/packages/d2/2f/b70bf3068b5964e4c45507e03652da0743c72460ff929e70aef201ed5ffb/%{module}-%{version}.tar.gz
17# Source0-md5: 8a6a4617a70c8776da24a02fb63b3ecd
18URL: https://pypi.python.org/pypi/keyring
19%if %{with python2}
20BuildRequires: python-devel >= 1:2.7
21BuildRequires: python-setuptools
22BuildRequires: python-setuptools_scm >= 1.15.0
23%if %{with tests}
24BuildRequires: python-pytest >= 2.8
25BuildRequires: python-secretstorage
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-devel >= 1:3.3
30BuildRequires: python3-setuptools
31BuildRequires: python3-setuptools_scm >= 1.15.0
32%if %{with tests}
33BuildRequires: python3-pytest >= 2.8
34BuildRequires: python3-secretstorage
35%endif
36%endif
37%if %{with doc}
38BuildRequires: python3-Sphinx
39BuildRequires: python3-rst.linker
40%endif
41BuildRequires: rpm-pythonprov
42BuildRequires: rpmbuild(macros) >= 1.714
43Requires: python-modules >= 1:2.7
44# kwalletd5 through dbus
45Suggests: python-dbus
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
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
68
69%description -n python3-%{module}
70The Python keyring lib provides a easy way to access the system
71keyring service from Python. It can be used in any application that
72needs safe password storage.
73
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.
89
90%prep
91%setup -q -n %{module}-%{version}
92
93%build
94%if %{with python2}
95%py_build
96
97%{?with_tests:%{__python} -m pytest}
98%endif
99
100%if %{with python3}
101%py3_build %{?with_doc:build_sphinx}
102
103%{?with_tests:%{__python3} -m pytest}
104%endif
105
106%install
107rm -rf $RPM_BUILD_ROOT
108
109%if %{with python3}
110%py3_install
111
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
119
120%py_postclean
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
126
127%clean
128rm -rf $RPM_BUILD_ROOT
129
130%if %{with python2}
131%files
132%defattr(644,root,root,755)
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.085009 seconds and 4 git commands to generate.