2014-07-23 20:19:21 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-PyJWT
|
|
|
|
#
|
2017-03-10 10:37:51 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-07-23 20:19:21 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-04-28 10:52:39 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2014-07-23 20:19:21 +00:00
|
|
|
Name: python-PyJWT
|
2017-11-03 14:32:11 +00:00
|
|
|
Version: 1.5.3
|
2014-07-23 20:19:21 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: JSON Web Token implementation in Python
|
|
|
|
License: MIT
|
|
|
|
Group: Development/Languages/Python
|
2017-03-10 10:37:51 +00:00
|
|
|
Url: https://github.com/progrium/pyjwt
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/P/PyJWT/PyJWT-%{version}.tar.gz
|
2017-04-28 10:52:39 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
BuildRequires: %{python_module cryptography}
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module pytest-cov >= 1.7}
|
|
|
|
BuildRequires: %{python_module pytest-runner}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-03-10 10:37:51 +00:00
|
|
|
BuildRequires: dos2unix
|
2017-04-28 10:52:39 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
2015-04-22 11:28:20 +00:00
|
|
|
Requires: python-cryptography
|
2017-04-28 12:57:59 +00:00
|
|
|
Requires: python-ecdsa
|
2017-04-28 10:52:39 +00:00
|
|
|
Requires: python-setuptools
|
|
|
|
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%python_subpackages
|
2014-07-23 20:19:21 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
A Python implementation of JSON Web Token draft 01.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n PyJWT-%{version}
|
2017-03-10 10:37:51 +00:00
|
|
|
dos2unix jwt/__main__.py
|
2014-07-23 20:19:21 +00:00
|
|
|
|
|
|
|
%build
|
2017-04-28 10:52:39 +00:00
|
|
|
%python_build
|
|
|
|
#remove shebang from all non executable files
|
|
|
|
find ./ -type f -name "*.py" -perm 644 -exec sed -i -e '1{\@^#!/usr/bin/env python@d}' {} \;
|
2014-07-23 20:19:21 +00:00
|
|
|
|
|
|
|
%install
|
2017-04-28 10:52:39 +00:00
|
|
|
%python_install
|
2017-08-21 15:57:22 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyjwt
|
2014-07-23 20:19:21 +00:00
|
|
|
|
2017-04-28 10:52:39 +00:00
|
|
|
#hardlink duplicated files
|
|
|
|
%fdupes %{buildroot}
|
2017-03-10 10:37:51 +00:00
|
|
|
|
|
|
|
%post
|
2017-08-21 15:57:22 +00:00
|
|
|
%python_install_alternative pyjwt
|
2017-03-10 10:37:51 +00:00
|
|
|
|
|
|
|
%postun
|
2017-08-21 15:57:22 +00:00
|
|
|
%python_uninstall_alternative pyjwt
|
2017-03-10 10:37:51 +00:00
|
|
|
|
2015-04-20 13:28:09 +00:00
|
|
|
%check
|
2017-04-28 10:52:39 +00:00
|
|
|
%{python_expand PYTHONPATH=%{buildroot}%{python_sitelib} py.test-%{py_ver} -k "not test_verify_false_deprecated" }
|
2015-04-20 13:28:09 +00:00
|
|
|
|
2017-04-28 10:52:39 +00:00
|
|
|
%files %python_files
|
2014-07-23 20:19:21 +00:00
|
|
|
%defattr(-,root,root,-)
|
2017-08-21 15:57:22 +00:00
|
|
|
%doc AUTHORS CHANGELOG.md LICENSE README.rst
|
2014-07-23 20:19:21 +00:00
|
|
|
%{python_sitelib}/*
|
2017-08-21 15:57:22 +00:00
|
|
|
%python_alternative %{_bindir}/pyjwt
|
2014-07-23 20:19:21 +00:00
|
|
|
|
|
|
|
%changelog
|