File python-cryptacular.spec of Package python-cryptacular

#
# spec file for package python-cryptacular
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 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-cryptacular
Version:        1.4.1
Release:        0
Url:            http://pypi.python.org/pypi/cryptacular
Summary:        A password hashing framework with bcrypt and pbkdf2
License:        MIT
Group:          Development/Languages/Python
Source:         https://pypi.python.org/packages/source/z/cryptacular/cryptacular-%{version}.tar.gz
Patch:		cryptacular-fix-test-exc.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-devel
BuildRequires:  python-pbkdf2
BuildRequires:  python-setuptools
Requires:       python-pbkdf2
# Testing requirements:
BuildRequires:  python-coverage
BuildRequires:  python-nose

%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif

%description
cryptacular is a collection of strong password hashing functions that share a
common interface, and a nice way to use bcrypt as a password hash. It's
designed to make it easy for you to migrate away from your half-assed custom
password scheme. Compared with popular choices like plain text or single rounds
of md5 or sha, strong password hashes greatly increase the computational cost
of obtaining users' passwords from a leaked password database.

%prep
%setup -q -n cryptacular-%{version}
%patch -p1

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
rm -f %{buildroot}%{python_sitearch}/cryptacular/bcrypt/_bcrypt.c

%check
python setup.py test

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

%changelog
openSUSE Build Service is sponsored by