File python-simple-crypt.spec of Package python-simple-crypt

#
# spec file for package python-simple-crypt
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 LISA GmbH, Bingen, 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-simple-crypt
Version:        4.0.0
Release:        0
License:        SUSE-Public-Domain
Summary:        Simple, secure encryption and decryption for Python 27 and 3
Url:            https://github.com/andrewcooke/simple-crypt
Group:          Development/Languages/Python
Source:         https://pypi.python.org/packages/source/s/simple-crypt/simple-crypt-%{version}.tar.gz
BuildRequires:  python-devel
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
Simple Crypt encrypts and decrypts data.  It has two functions, ``encrypt``
and ``decrypt``::

    from simplecrypt import encrypt, decrypt
    ciphertext = encrypt('password', plaintext)
    plaintext = decrypt('password', ciphertext)

%prep
%setup -q -n simple-crypt-%{version}
mv README.md README.txt

%build
python setup.py build

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

%check
PYTHONPATH=src python src/simplecrypt/tests.py

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

%changelog
openSUSE Build Service is sponsored by