14
0
forked from pool/python-PyJWT
Files
python-PyJWT/python-PyJWT.spec
Thomas Bechtold 609318985d Accepting request 517964 from home:tbechtold:branches:devel:languages:python
- update to 1.5.2:
  - Ensure correct arguments order in decode super call [7c1e61d][7c1e61d]
  - Change optparse for argparse. [#238][238]
  - Guard against PKCS1 PEM encododed public keys [#277][277]
  - Add deprecation warning when decoding without specifying `algorithms` [#277][277]
  - Improve deprecation messages [#270][270]
  - PyJWT.decode: move verify param into options [#271][271]
  - Support for Python 3.6 [#262][262]
  - Expose jwt.InvalidAlgorithmError [#264][264]
  - Add support for ECDSA public keys in RFC 4253 (OpenSSH) format [#244][244]
  - Renamed commandline script `jwt` to `jwt-cli` to avoid issues with the script clobbering the `jwt` module in some circumstances. [#187][187]
  - Better error messages when using an algorithm that requires the cryptography package, but it isn't available [#230][230]
  - Tokens with future 'iat' values are no longer rejected [#190][190]
  - Non-numeric 'iat' values now raise InvalidIssuedAtError instead of DecodeError
  - Remove rejection of future 'iat' claims [#252][252]
  - Add back 'ES512' for backward compatibility (for now) [#225][225]
  - Fix incorrectly named ECDSA algorithm [#219][219]
  - Fix rpm build [#196][196]
  - Add JWK support for HMAC and RSA keys [#202][202]

OBS-URL: https://build.opensuse.org/request/show/517964
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyJWT?expand=0&rev=26
2017-08-21 15:57:22 +00:00

86 lines
2.5 KiB
RPMSpec

#
# spec file for package python-PyJWT
#
# 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-PyJWT
Version: 1.5.2
Release: 0
Summary: JSON Web Token implementation in Python
License: MIT
Group: Development/Languages/Python
Url: https://github.com/progrium/pyjwt
Source: https://files.pythonhosted.org/packages/source/P/PyJWT/PyJWT-%{version}.tar.gz
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}
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-cryptography
Requires: python-ecdsa
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
A Python implementation of JSON Web Token draft 01.
%prep
%setup -q -n PyJWT-%{version}
dos2unix jwt/__main__.py
%build
%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}' {} \;
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/pyjwt
#hardlink duplicated files
%fdupes %{buildroot}
%post
%python_install_alternative pyjwt
%postun
%python_uninstall_alternative pyjwt
%check
%{python_expand PYTHONPATH=%{buildroot}%{python_sitelib} py.test-%{py_ver} -k "not test_verify_false_deprecated" }
%files %python_files
%defattr(-,root,root,-)
%doc AUTHORS CHANGELOG.md LICENSE README.rst
%{python_sitelib}/*
%python_alternative %{_bindir}/pyjwt
%changelog