2015-02-24 13:00:40 +00:00
|
|
|
%if 0%{?fedora}
|
|
|
|
%global with_python3 1
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Use the same directory of the main package for subpackage licence and docs
|
|
|
|
%global _docdir_fmt %{name}
|
|
|
|
|
|
|
|
%{!?_licensedir: %global license %%doc}
|
|
|
|
|
|
|
|
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
|
|
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
|
|
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%global modname jwt
|
|
|
|
|
|
|
|
Name: python-jwt
|
2015-09-16 17:10:33 +00:00
|
|
|
Version: 1.4.0
|
2015-11-10 16:13:34 +00:00
|
|
|
Release: 2%{?dist}
|
2015-02-24 13:00:40 +00:00
|
|
|
Summary: JSON Web Token implementation in Python
|
|
|
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
License: MIT
|
|
|
|
URL: http://pypi.python.org/pypi/pyjwt
|
|
|
|
Source0: https://pypi.python.org/packages/source/P/PyJWT/PyJWT-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
BuildRequires: python-setuptools
|
|
|
|
BuildRequires: python-cryptography
|
|
|
|
Requires: python-cryptography
|
|
|
|
|
2015-06-17 21:24:18 +00:00
|
|
|
BuildRequires: pytest
|
|
|
|
BuildRequires: python-pytest-cov
|
|
|
|
|
2015-02-24 13:00:40 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
BuildRequires: python3-cryptography
|
2015-06-17 21:24:18 +00:00
|
|
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
BuildRequires: python3-pytest-cov
|
2015-02-24 13:00:40 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
A Python implementation of JSON Web Token draft 01. This library provides a
|
|
|
|
means of representing signed content using JSON data structures, including
|
|
|
|
claims to be transferred between two parties encoded as digitally signed and
|
|
|
|
encrypted JSON objects.
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
%package -n python3-jwt
|
|
|
|
Summary: JSON Web Token implementation in Python
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: python3-cryptography
|
|
|
|
|
|
|
|
%description -n python3-jwt
|
|
|
|
A Python3 implementation of JSON Web Token draft 01. This library provides a
|
|
|
|
means of representing signed content using JSON data structures, including
|
|
|
|
claims to be transferred between two parties encoded as digitally signed and
|
|
|
|
encrypted JSON objects.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n PyJWT-%{version}
|
|
|
|
|
2015-06-17 21:24:18 +00:00
|
|
|
rm -rf setup.cfg
|
|
|
|
|
|
|
|
sed -i '/pytest-runner/d' setup.py
|
|
|
|
|
2015-02-24 13:00:40 +00:00
|
|
|
# Remove bundled egg-info in case it exists
|
|
|
|
rm -rf %{modname}.egg-info
|
2015-06-17 21:24:18 +00:00
|
|
|
find . -name "*.pyc" -exec rm -rf {} \; || echo;
|
|
|
|
find . -name "__pycache__" -exec rm -rf {} \; || echo;
|
|
|
|
|
2015-02-24 13:00:40 +00:00
|
|
|
%if 0%{?with_python3}
|
|
|
|
rm -rf %{py3dir}
|
|
|
|
cp -a . %{py3dir}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%build
|
|
|
|
%{__python2} setup.py build
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
pushd %{py3dir}
|
|
|
|
%{__python3} setup.py build
|
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
pushd %{py3dir}
|
|
|
|
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
|
|
|
|
mv %{buildroot}%{_bindir}/jwt %{buildroot}%{_bindir}/python3-jwt
|
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
|
|
|
|
|
2015-06-17 21:24:18 +00:00
|
|
|
%check
|
|
|
|
py.test .
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
pushd %{py3dir}
|
|
|
|
py.test-%{python3_version} .
|
|
|
|
popd
|
|
|
|
%endif
|
2015-02-24 13:00:40 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md AUTHORS
|
|
|
|
%license LICENSE
|
|
|
|
%{python2_sitelib}/%{modname}/
|
|
|
|
%{python2_sitelib}/PyJWT-%{version}*
|
|
|
|
%{_bindir}/jwt
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
%files -n python3-jwt
|
|
|
|
%doc README.md AUTHORS
|
|
|
|
%license LICENSE
|
|
|
|
%{python3_sitelib}/%{modname}/
|
|
|
|
%{python3_sitelib}/PyJWT-%{version}*
|
|
|
|
%{_bindir}/python3-jwt
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|
2015-11-10 16:13:34 +00:00
|
|
|
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
|
|
2015-09-16 17:10:33 +00:00
|
|
|
* Wed Sep 16 2015 Ralph Bean <rbean@redhat.com> - 1.4.0-1
|
|
|
|
- new version
|
|
|
|
|
2015-06-17 21:24:18 +00:00
|
|
|
* Wed Jun 17 2015 Ralph Bean <rbean@redhat.com> - 1.3.0-1
|
|
|
|
- new version
|
|
|
|
- start running the test suite.
|
|
|
|
|
2015-03-27 19:18:18 +00:00
|
|
|
* Fri Mar 27 2015 Ralph Bean <rbean@redhat.com> - 1.0.1-1
|
|
|
|
- new version
|
|
|
|
|
2015-03-19 01:30:21 +00:00
|
|
|
* Thu Mar 19 2015 Ralph Bean <rbean@redhat.com> - 1.0.0-1
|
|
|
|
- new version
|
|
|
|
|
2015-02-24 13:00:40 +00:00
|
|
|
* Fri Feb 20 2015 Ralph Bean <rbean@redhat.com> - 0.4.3-1
|
|
|
|
- Latest upstream.
|
|
|
|
- Expand the description as per review feedback.
|
|
|
|
- Add a comment about the test suite.
|
|
|
|
- Declare noarch.
|
|
|
|
- Declare _docdir_fmt
|
|
|
|
|
|
|
|
* Wed Feb 18 2015 Ralph Bean <rbean@redhat.com> - 0.4.2-1
|
|
|
|
- initial package for Fedora.
|