15
0

use link to devel:languages:python package

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SecretStorage?expand=0&rev=5
This commit is contained in:
Lars Vogdt
2016-09-02 10:44:35 +00:00
committed by Git OBS Bridge
parent 843d7c2eed
commit 9365cee2b9
5 changed files with 174 additions and 26 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-SecretStorage
# spec file
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,31 +12,41 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-SecretStorage
Version: 2.3.1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-SecretStorage%{psuffix}
Version: 3.3.3
Release: 0
Summary: Python bindings to FreeDesktoporg Secret Service API
License: BSD-3-Clause
Group: Development/Languages/Python
Url: https://github.com/mitya57/secretstorage
# NOTE(toabctl): For whatever reason, the pypi.io url is not working...
#Source: https://pypi.io/packages/source/s/SecretStorage/SecretStorage-%{version}.tar.gz
Source: https://pypi.python.org/packages/a5/a5/0830cfe34a4cfd0d1c3c8b614ede1edb2aaf999091ac8548dd19cb352e79/SecretStorage-2.3.1.tar.gz
BuildRequires: python-cryptography
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires: dbus-1-python
URL: https://github.com/mitya57/secretstorage
Source: https://files.pythonhosted.org/packages/source/S/SecretStorage/SecretStorage-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-cryptography
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
Requires: python-jeepney >= 0.6
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module SecretStorage = %{version}}
BuildRequires: %{python_module cryptography}
BuildRequires: %{python_module jeepney >= 0.6}
BuildRequires: dbus-1-daemon
BuildRequires: gnome-keyring
%endif
%python_subpackages
%description
This module provides a way for securely storing passwords and other secrets.
@@ -61,14 +71,26 @@ The documentation can be found on `pythonhosted.org`_.
%setup -q -n SecretStorage-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%files
%defattr(-,root,root,-)
%doc changelog README.rst LICENSE
%if %{with test}
%check
# gnome-keyring "forgets" to create this directory under certain conditions
mkdir -p $HOME/.cache
%python_expand dbus-run-session -- $python -m unittest discover -s tests
%endif
%if !%{with test}
%files %{python_files}
%license LICENSE
%doc changelog README.rst
%{python_sitelib}/*
%endif
%changelog