File python-pyblake2.spec of Package python-pyblake2

# spec file for package python-pyblake2
# Copyright (c) 2017 SUSE LINUX 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

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name:           python-pyblake2
Version:        0.9.3
Release:        0
License:        CC0-1.0
Summary:        BLAKE2 hash function extension module
Group:          Development/Languages/Python
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  python-sphinx
BuildRequires:  %{python_module tox}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build


pyblake2 is an extension module for Python implementing BLAKE2 hash function.
BLAKE2 is a cryptographic hash function, which offers highest security while
being as fast as MD5 or SHA-1, and comes in two flavors:

* BLAKE2b, optimized for 64-bit platforms and produces digests of any size
  between 1 and 64 bytes,

* BLAKE2s, optimized for 8- to 32-bit platforms and produces digests of any
  size between 1 and 32 bytes.

BLAKE2 supports keyed mode (a faster and simpler replacement for HMAC),
salted hashing, personalization, and tree hashing.

Hash objects from this module follow the API of standard library's
`hashlib` objects.

%setup -q -n pyblake2-%{version}

export CFLAGS="%{optflags} -fno-strict-aliasing"


%if %{with test}
# test py2.7-docs fails
tox --skip-missing-interpreters --sitepackages || :

%files %{python_files}
%doc README.rst
%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320 
%%license COPYING

openSUSE Build Service is sponsored by