A new user interface for you!

File python-pyramid_jwt.spec of Package python-pyramid_jwt

# spec file for package python-pyramid_jwt
# Copyright (c) 2018 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.3
Release:        0
Summary:        JWT authentication policy for Pyramid
License:        BSD-2-Clause
Group:          Development/Languages/Python
URL:            https://github.com/wichert/pyramid_jwt
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
BuildRequires:  %{python_module PyJWT}
BuildRequires:  %{python_module WebTest}
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module hupper}
BuildRequires:  %{python_module plaster-pastedeploy}
BuildRequires:  %{python_module plaster}
BuildRequires:  %{python_module pyramid} >= 1.4
BuildRequires:  %{python_module pytest-cov}
BuildRequires:  %{python_module pytest-runner}
# Testing requirements:
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-PyJWT
Requires:       python-pyramid
BuildArch:      noarch

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.

%setup -q -n pyramid_jwt-%{version}
# Patch bad ascii encoding
sed -i 's/√Čric Araujo/Eric Araujo/g' changes.rst
# Create a dummy file so setup.py don't fail 
# Upstream didn't test its pypi package and github is missing the release
mkdir docs
touch docs/example.rst


%python_expand %fdupes -s %{buildroot}%{$python_sitelib}

%python_exec setup.py test

%files %python_files
%license LICENSE
%doc changes.rst README.rst