forked from pool/python-PyJWT
Accepting request 478463 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/478463 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-PyJWT?expand=0&rev=8
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 2586c2a..dee928c 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -62,7 +62,6 @@
|
||||
],
|
||||
test_suite='tests',
|
||||
setup_requires=['pytest-runner'],
|
||||
- tests_require=tests_require,
|
||||
extras_require=dict(
|
||||
test=tests_require,
|
||||
crypto=['cryptography'],
|
@@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 10 08:52:47 UTC 2017 - alarrosa@suse.com
|
||||
|
||||
- Use update-alternatives so it can be co-installable with python3-PyJWT
|
||||
- Use dos2unix on jwt/__init__.py
|
||||
- updated source url to files.pythonhosted.org
|
||||
- Run the spec file through spec-cleaner
|
||||
- Drop PyJWT-1.1.0.diff which was only used on rhel (?)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 15 13:52:58 UTC 2016 - rjschwei@suse.com
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-PyJWT
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# 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
|
||||
@@ -16,17 +16,20 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
Name: python-PyJWT
|
||||
Version: 1.4.2
|
||||
Release: 0
|
||||
Url: https://github.com/progrium/pyjwt
|
||||
Summary: JSON Web Token implementation in Python
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
Source: https://pypi.io/packages/source/P/PyJWT/PyJWT-%{version}.tar.gz
|
||||
# PATCH-FIX-CENTOS PyJWT-1.1.0.diff -- without this, the centos build %%check will try to download stuff from pypi --seife
|
||||
Patch1: PyJWT-1.1.0.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Url: https://github.com/progrium/pyjwt
|
||||
Source: https://files.pythonhosted.org/packages/source/P/PyJWT/PyJWT-%{version}.tar.gz
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: python-cryptography
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-ecdsa
|
||||
@@ -38,20 +41,17 @@ BuildRequires: python-setuptools
|
||||
Requires: python-cryptography
|
||||
Requires: python-ecdsa
|
||||
Requires: python-pycrypto
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
A Python implementation of JSON Web Token draft 01.
|
||||
|
||||
%prep
|
||||
%setup -q -n PyJWT-%{version}
|
||||
%if 0%{?rhel}
|
||||
%patch1 -p1
|
||||
%endif
|
||||
dos2unix jwt/__main__.py
|
||||
sed -i -e "s/jwt = jwt.__main__:main/jwt-%{py_ver} = jwt.__main__:main/" setup.py
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
@@ -59,6 +59,19 @@ python setup.py build
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/jwt
|
||||
ln -sf %{_sysconfdir}/alternatives/jwt %{buildroot}/%{_bindir}/jwt
|
||||
|
||||
%post
|
||||
update-alternatives \
|
||||
--install %{_bindir}/jwt jwt %{_bindir}/jwt-%{py_ver} 30
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
update-alternatives --remove jwt %{_bindir}/jwt-%{py_ver}
|
||||
fi
|
||||
|
||||
%check
|
||||
PYTHONPATH=%{buildroot}%{python_sitelib} py.test -k "not test_verify_false_deprecated"
|
||||
|
||||
@@ -67,5 +80,7 @@ PYTHONPATH=%{buildroot}%{python_sitelib} py.test -k "not test_verify_false_depre
|
||||
%doc AUTHORS CHANGELOG.md LICENSE README.md
|
||||
%{python_sitelib}/*
|
||||
%{_bindir}/jwt
|
||||
%{_bindir}/jwt-%{py_ver}
|
||||
%ghost %{_sysconfdir}/alternatives/jwt
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user