Hello community,

here is the log from the commit of package python-future for openSUSE:Factory 
checked in at 2017-04-28 09:12:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-future (Old)
 and      /work/SRC/openSUSE:Factory/.python-future.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-future"

Fri Apr 28 09:12:25 2017 rev:4 rq:486204 version:0.16.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-future/python-future.changes      
2016-11-28 15:08:28.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-future.new/python-future.changes 
2017-04-28 09:12:28.401104724 +0200
@@ -1,0 +2,5 @@
+Thu Apr  6 16:24:20 UTC 2017 - [email protected]
+
+- Implement single-spec version
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ python-future.spec ++++++
--- /var/tmp/diff_new_pack.roUpY9/_old  2017-04-28 09:12:29.049013361 +0200
+++ /var/tmp/diff_new_pack.roUpY9/_new  2017-04-28 09:12:29.053012797 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-future
 #
-# 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,6 +16,7 @@
 #
 
 
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-future
 Version:        0.16.0
 Release:        0
@@ -23,59 +24,55 @@
 License:        MIT
 Group:          Development/Languages/Python
 Url:            https://python-future.org
-Source:         
https://pypi.python.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-%{version}.tar.gz
+Source:         
https://files.pythonhosted.org/packages/source/f/future/future-%{version}.tar.gz
 BuildRequires:  fdupes
-BuildRequires:  python-devel
-BuildRequires:  python-setuptools
+BuildRequires:  python-rpm-macros
+BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module setuptools}
 Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(preun): update-alternatives
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 
+%python_subpackages
+
 %description
-future: Easy, safe support for Python 2/3 compatibility
+Easy, safe support for Python 2/3 compatibility
 
-``future`` is the missing compatibility layer between Python 2 and Python
+future is the missing compatibility layer between Python 2 and Python
 3. It allows you to use a single, clean Python 3.x-compatible codebase to
 support both Python 2 and Python 3 with minimal overhead.
 
+
 %prep
 %setup -q -n future-%{version}
 
+
 %build
-python setup.py build
+%python_build
+
 
 %install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
 
-# Prepare for update-alternatives usage
-mkdir -p %{buildroot}%{_sysconfdir}/alternatives
-for p in futurize pasteurize ; do
-    mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
-    ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
-done
+%python_clone -a %{buildroot}%{_bindir}/futurize
+%python_clone -a %{buildroot}%{_bindir}/pasteurize
+
+%{python_expand %fdupes %{buildroot}%{$python_sitearch} }
 
-%fdupes %{buildroot}/%{python_sitelib}/*
 
 %post
-%_sbindir/update-alternatives \
-   --install %{_bindir}/futurize futurize %{_bindir}/futurize-%{py_ver} 30 \
-   --slave %{_bindir}/pasteurize pasteurize %{_bindir}/pasteurize-%{py_ver}
-
-%postun
-if [ "$1" = 0 ] ; then
-   %_sbindir/update-alternatives --remove futurize 
%{_bindir}/futurize-%{py_ver}
-fi
+%{python_install_alternative futurize pasteurize}
+
+%preun
+%python_uninstall_alternative futurize
+
 
-%files
+%files %{python_files}
 %defattr(-,root,root,-)
 %doc LICENSE.txt README.rst
 %{python_sitelib}/*
-%{_bindir}/futurize
-%{_bindir}/pasteurize
-%{_bindir}/futurize-%{py_ver}
-%{_bindir}/pasteurize-%{py_ver}
-%ghost %{_sysconfdir}/alternatives/futurize
-%ghost %{_sysconfdir}/alternatives/pasteurize
+%python_alternative %{_bindir}/futurize
+%python_alternative %{_bindir}/pasteurize
 
 %changelog


Reply via email to