Hello community,

here is the log from the commit of package python-PyJWT for openSUSE:Factory 
checked in at 2017-03-17 15:06:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyJWT (Old)
 and      /work/SRC/openSUSE:Factory/.python-PyJWT.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-PyJWT"

Fri Mar 17 15:06:24 2017 rev:8 rq:478463 version:1.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyJWT/python-PyJWT.changes        
2016-09-28 11:30:58.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-PyJWT.new/python-PyJWT.changes   
2017-03-17 15:06:25.286905991 +0100
@@ -1,0 +2,9 @@
+Fri Mar 10 08:52:47 UTC 2017 - [email protected]
+
+- 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 (?)
+
+-------------------------------------------------------------------

Old:
----
  PyJWT-1.1.0.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-PyJWT.spec ++++++
--- /var/tmp/diff_new_pack.H1SqMO/_old  2017-03-17 15:06:25.942813424 +0100
+++ /var/tmp/diff_new_pack.H1SqMO/_new  2017-03-17 15:06:25.946812860 +0100
@@ -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 @@
 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 @@
 %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 @@
 %doc AUTHORS CHANGELOG.md LICENSE README.md
 %{python_sitelib}/*
 %{_bindir}/jwt
+%{_bindir}/jwt-%{py_ver}
+%ghost %{_sysconfdir}/alternatives/jwt
 
 %changelog


Reply via email to