File python-argon2_cffi.spec of Package python-argon2_cffi

#
# spec file for package python-argon2_cffi
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 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/

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define         modname argon2_cffi
Name:           python-%{modname}
Version:        16.3.0
Release:        0
License:        MIT
Summary:        The secure Argon2 password hashing algorithm
Url:            https://%{modname}.readthedocs.io/
Group:          Development/Languages/Python
Source:         https://pypi.io/packages/source/a/%{modname}/%{modname}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module cffi >= 1.0.0}
BuildRequires:  %{python_module six}
BuildRequires:  python-enum34
BuildRequires:  python-rpm-macros
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       python-six
%ifpython2 
Requires:       python-enum34
%endif
# test requirements
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module hypothesis}

%python_subpackages

%description
Argon2 is the winner of the Password Hashing Competition and argon2_cffi
is the simplest way to use it in Python.

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

%build
export CFLAGS="%{optflags}"
%python_build

%install
%python_install
%fdupes %{buildroot}%{_prefix}

%check
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} py.test-%$python_bin_suffix

%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS.rst CHANGELOG.rst README.rst LICENSE
%{python_sitearch}/argon2/
%{python_sitearch}/%{modname}-*.egg-info

%changelog
openSUSE Build Service is sponsored by