File python-pyramid_jwt.spec of Package python-pyramid_jwt
#
# spec file for package python-pyramid_jwt
#
# 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 http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pyramid_jwt
Version: 1.2
Release: 0
Url: https://github.com/wichert/pyramid_jwt
Summary: JWT authentication policy for Pyramid
License: BSD-2-Clause
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/p/pyramid_jwt/pyramid_jwt-%{version}.tar.gz
# Missing in tar.gz
Source1: https://raw.githubusercontent.com/wichert/pyramid_jwt/master/LICENSE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pyramid} >= 1.4
BuildRequires: %{python_module PyJWT}
# Testing requirements:
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module WebTest}
BuildRequires: %{python_module hupper}
BuildRequires: %{python_module plaster-pastedeploy}
BuildRequires: %{python_module plaster}
Requires: python-pyramid
Requires: python-PyJWT
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
This package implements an authentication policy for Pyramid
that using JSON Web Tokens. This standard (RFC 7519) is often
used to secure backens APIs. The excellent PyJWT library is
used for the JWT encoding / decoding logic.
%prep
%setup -q -n pyramid_jwt-%{version}
cp %{S:1} LICENSE
# Patch bad ascii encoding
sed -i 's/Éric Araujo/Eric Araujo/g' changes.rst
%build
%python_build
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%check
%python_exec setup.py test
%files %python_files
%defattr(-,root,root,-)
%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320
%license LICENSE
%else
%doc LICENSE
%endif
%doc changes.rst README.rst
%{python_sitelib}/*
%changelog