Hello community,

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

Package is "python-ipaddr"

Tue Sep  5 15:15:16 2017 rev:16 rq:519990 version:2.1.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ipaddr/python-ipaddr.changes      
2016-02-09 13:32:16.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-ipaddr.new/python-ipaddr.changes 
2017-09-05 15:15:17.596620769 +0200
@@ -1,0 +2,12 @@
+Thu Aug 31 16:53:09 UTC 2017 - [email protected]
+
+- Add use_2to3.patch
+  * Allows setup.py to automatically convert code with 2to3 instead
+    of having to do it manually.
+
+-------------------------------------------------------------------
+Thu Aug 24 13:41:27 UTC 2017 - [email protected]
+
+- singlespec auto-conversion
+
+-------------------------------------------------------------------
@@ -44,0 +57 @@
+

New:
----
  use_2to3.patch

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

Other differences:
------------------
++++++ python-ipaddr.spec ++++++
--- /var/tmp/diff_new_pack.2e755g/_old  2017-09-05 15:15:20.548205883 +0200
+++ /var/tmp/diff_new_pack.2e755g/_new  2017-09-05 15:15:20.552205321 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-ipaddr
 #
-# Copyright (c) 2015 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,25 +16,25 @@
 #
 
 
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-ipaddr
 Version:        2.1.11
 Release:        0
-Url:            http://code.google.com/p/ipaddr-py/
 Summary:        Google's IP address manipulation library
 License:        Apache-2.0
 Group:          Development/Languages/Python
-Source:         ipaddr-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  python-devel
-BuildRequires:  python-nose
-BuildRequires:  python-setuptools
-%if 0%{?suse_version}
-%py_requires
-%if 0%{?suse_version} > 1110
+Url:            http://code.google.com/p/ipaddr-py/
+Source:         
https://files.pythonhosted.org/packages/source/i/ipaddr/ipaddr-%{version}.tar.gz
+# PATCH-FIX-OPENSUSE - use_2to3.patch -  use 2to3 to build python3 packages
+Patch0:         use_2to3.patch
+BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module pkginfo}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  python3-2to3
+BuildRequires:  python-rpm-macros
 BuildArch:      noarch
-%endif
-%endif
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
+
+%python_subpackages
 
 %description
 Google's IP address manipulation library. An IPv4/IPv6 manipulation library
@@ -43,18 +43,30 @@
 
 %prep
 %setup -q -n ipaddr-%{version}
+%patch0 -p1
 sed -i "1d" ipaddr.py # Fix non-executable script
 
 %build
-python setup.py build
+%python_build
 
 %install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
 
 %check
-nosetests
+mkdir tester
+pushd tester
+%python_expand cp ../ipaddr_test.py ipaddr_test-%{$python_bin_suffix}.py
+
+if [ -e ipaddr_test-%{python3_bin_suffix}.py ] ; then
+    2to3 -wn ipaddr_test-%{python3_bin_suffix}.py
+fi
+
+%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
+$python -B ipaddr_test-%{$python_bin_suffix}.py
+}
+popd
 
-%files
+%files %{python_files}
 %defattr(-,root,root,-)
 %doc COPYING README  RELEASENOTES
 %{python_sitelib}/*

++++++ use_2to3.patch ++++++
--- a/setup.py  2014-01-31
+++ b/setup.py  2017-08-31
@@ -14,17 +14,17 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from distutils.core import setup
-
-import ipaddr
+from setuptools import setup
+from pkginfo import UnpackedSDist
 
 
 setup(name='ipaddr',
       maintainer='Google',
       maintainer_email='[email protected]',
-      version=ipaddr.__version__,
       url='http://code.google.com/p/ipaddr-py/',
       license='Apache License, Version 2.0',
+      version=UnpackedSDist('.').version,
+      use_2to3=True,
       classifiers=[
           'Development Status :: 5 - Production/Stable',
           'Intended Audience :: Developers',

Reply via email to