Hello community,

here is the log from the commit of package python-PyJWT for openSUSE:Factory 
checked in at 2017-05-09 18:02:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyJWT (Old)
 and      /work/SRC/openSUSE:Factory/.python-PyJWT.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-PyJWT"

Tue May  9 18:02:46 2017 rev:10 rq:491844 version:1.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyJWT/python-PyJWT.changes        
2017-04-07 13:54:07.428553154 +0200
+++ /work/SRC/openSUSE:Factory/.python-PyJWT.new/python-PyJWT.changes   
2017-05-09 18:02:50.183551199 +0200
@@ -1,0 +2,12 @@
+Fri Apr 28 12:25:53 UTC 2017 - [email protected]
+
+- Restore runtime dependency python-ecdsa
+
+-------------------------------------------------------------------
+Wed Apr 26 18:03:53 UTC 2017 - [email protected]
+
+- Convert to singlespec
+- Remove unneeded dependency python-ecdsa
+- Use "download_files" in _service file to automate source fetching
+
+-------------------------------------------------------------------

New:
----
  _service

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

Other differences:
------------------
++++++ python-PyJWT.spec ++++++
--- /var/tmp/diff_new_pack.qTDZEa/_old  2017-05-09 18:02:51.015433645 +0200
+++ /var/tmp/diff_new_pack.qTDZEa/_new  2017-05-09 18:02:51.019433080 +0200
@@ -16,11 +16,7 @@
 #
 
 
-%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
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-PyJWT
 Version:        1.4.2
 Release:        0
@@ -29,19 +25,28 @@
 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:  python-cryptography
-BuildRequires:  python-devel
-BuildRequires:  python-ecdsa
-BuildRequires:  python-pytest
-BuildRequires:  python-pytest-cov >= 1.7
-BuildRequires:  python-pytest-runner
-BuildRequires:  python-setuptools
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
+
 Requires:       python-cryptography
 Requires:       python-ecdsa
+Requires:       python-setuptools
+
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+
+BuildArch:      noarch
+
+%python_subpackages
 
 %description
 A Python implementation of JSON Web Token draft 01.
@@ -49,36 +54,32 @@
 %prep
 %setup -q -n PyJWT-%{version}
 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
+%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 setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
+%python_clone -a %{buildroot}%{_bindir}/jwt
 
-mkdir -p %{buildroot}%{_sysconfdir}/alternatives
-touch %{buildroot}%{_sysconfdir}/alternatives/jwt
-ln -sf %{_sysconfdir}/alternatives/jwt %{buildroot}/%{_bindir}/jwt
+#hardlink duplicated files
+%fdupes %{buildroot}
 
 %post
-update-alternatives \
-    --install %{_bindir}/jwt jwt %{_bindir}/jwt-%{py_ver} 30
+%python_install_alternative jwt
 
 %postun
-if [ $1 -eq 0 ] ; then
-    update-alternatives --remove jwt %{_bindir}/jwt-%{py_ver}
-fi
+%python_uninstall_alternative jwt
 
 %check
-PYTHONPATH=%{buildroot}%{python_sitelib} py.test -k "not 
test_verify_false_deprecated"
+%{python_expand PYTHONPATH=%{buildroot}%{python_sitelib} py.test-%{py_ver} -k 
"not test_verify_false_deprecated" }
 
-%files
+%files %python_files
 %defattr(-,root,root,-)
 %doc AUTHORS CHANGELOG.md LICENSE README.md
 %{python_sitelib}/*
-%{_bindir}/jwt
-%{_bindir}/jwt-%{py_ver}
-%ghost %{_sysconfdir}/alternatives/jwt
+%python_alternative %{_bindir}/jwt
 
 %changelog

++++++ _service ++++++
<services>
 <service name="download_files" mode="localonly">
    <param name="enforceupstream">yes</param>
    <param name="changesgenerate">enable</param>
 </service>
 <service name="set_version" mode="localonly"/>
</services>

Reply via email to