File python-SecretStorage.spec of Package python-SecretStorage

#
# spec file for package python-SecretStorage
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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/


Name:           python-SecretStorage
Version:        2.1.2
Release:        0
License:        BSD
Summary:        Secure storing of passwords and other secrets
Url:            https://github.com/mitya57/secretstorage
Group:          Development/Languages/Python
Source:         https://pypi.python.org/packages/source/S/SecretStorage/SecretStorage-%{version}.tar.gz
BuildRequires:  python-devel
BuildRequires:  python-nose
BuildRequires:  dbus-1-python
Requires:       dbus-1-python
BuildRequires:  python-pycrypto
Requires:       python-pycrypto
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
BuildArch:      noarch
%endif

%description
Module description
==================

This module provides a way for securely storing passwords and other secrets.

It uses D-Bus `Secret Service`_ API that is supported by GNOME Keyring
(since version 2.30) and KSecretsService.

The main classes provided are ``secretstorage.Item``, representing a secret
item (that has a *label*, a *secret* and some *attributes*) and
``secretstorage.Collection``, a place items are stored in.

SecretStorage supports most of the functions provided by Secret Service,
including creating and deleting items and collections, editing items,
locking and unlocking collections (asynchronous unlocking is also supported).

The documentation can be found on `pythonhosted.org`_.

.. _`Secret Service`: http://standards.freedesktop.org/secret-service/
.. _`pythonhosted.org`: https://pythonhosted.org/SecretStorage/

Building the module
===================

.. note::
   SecretStorage supports all versions of Python since 2.6. Here we assume
   that your Python version is 3.x.

SecretStorage requires these packages to work:

* `dbus-python`_;
* PyCrypto_ (also `available on PyPI`_).

To build SecretStorage, use this command::

   python3 setup.py build

If you have Sphinx_ installed, you can also build the documentation::

   python3 setup.py build_sphinx

.. _`dbus-python`: http://www.freedesktop.org/wiki/Software/DBusBindings/#dbus-python
.. _PyCrypto: https://www.dlitz.net/software/pycrypto/
.. _`available on PyPI`: https://pypi.python.org/pypi/pycrypto
.. _Sphinx: http://sphinx-doc.org/

Get the code
============

SecretStorage is available under BSD license. The source code can be found
on GitHub_.

.. _GitHub: https://github.com/mitya57/secretstorage

%prep
%setup -q -n SecretStorage-%{version}

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

#check
#nosetests

%files
%defattr(-,root,root,-)
%doc changelog README.rst LICENSE
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by