Accepting request 519990 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/519990 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-ipaddr?expand=0&rev=16
This commit is contained in:
commit
7ff0431d2c
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 31 16:53:09 UTC 2017 - toddrme2178@gmail.com
|
||||
|
||||
- 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 - jmatejek@suse.com
|
||||
|
||||
- singlespec auto-conversion
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 25 16:32:23 UTC 2015 - klaussfreire@gmail.com
|
||||
|
||||
@ -43,3 +55,4 @@ Fri Jul 8 09:47:53 UTC 2011 - klaussfreire@users.sourceforge.net
|
||||
|
||||
- Initial package, upstream ipaddr 2.1.9
|
||||
|
||||
|
||||
|
@ -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,20 +43,32 @@ addresses and prefixes.
|
||||
|
||||
%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
|
||||
|
||||
%files
|
||||
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 %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING README RELEASENOTES
|
||||
%doc COPYING README RELEASENOTES
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
||||
|
24
use_2to3.patch
Normal file
24
use_2to3.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- 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='ipaddr-py-dev@googlegroups.com',
|
||||
- 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',
|
Loading…
Reference in New Issue
Block a user