]> git.pld-linux.org Git - packages/python-netaddr.git/commitdiff
fix shebang; use python3 in bin by default; rel 3 auto/th/python-netaddr-0.7.19-3
authorJan Palus <atler@pld-linux.org>
Sat, 6 Mar 2021 11:44:36 +0000 (12:44 +0100)
committerJan Palus <atler@pld-linux.org>
Sat, 6 Mar 2021 11:44:36 +0000 (12:44 +0100)
python-netaddr.spec
script-shebang.patch [new file with mode: 0644]

index 022d0d075f93aa76f8511acb2b1cef8b0be0d65a..f4c6d0265ae6cba08cd32120f23c5197361e2355 100644 (file)
@@ -7,11 +7,12 @@
 Summary:       A pure Python network address representation and manipulation library
 Name:          python-netaddr
 Version:       0.7.19
-Release:       2
+Release:       3
 License:       BSD
 Group:         Development/Languages/Python
 Source0:       https://pypi.python.org/packages/source/n/netaddr/%{module}-%{version}.tar.gz
 # Source0-md5: 51019ef59c93f3979bcb37d3b8527e07
+Patch0:                script-shebang.patch
 URL:           https://github.com/drkjam/netaddr/
 BuildRequires: rpmbuild(macros) >= 1.710
 BuildRequires: python-modules
@@ -68,13 +69,21 @@ Included are routines for:
 %package -n netaddr
 Summary:       An interactive shell for the Python netaddr library
 Group:         Development/Languages/Python
+%if %{with python3}
+Requires:      python3-netaddr = %{version}-%{release}
+%else
 Requires:      %{name} = %{version}-%{release}
+%endif
 
 %description -n netaddr
 Interactive shell for the python-netaddr library.
 
 %prep
 %setup -q -n %{module}-%{version}
+%patch0 -p1
+
+%{__sed} -i -e '1s,/usr/bin/env python,%{?with_python3:%{__python3}}%{!?with_python3:%{__python}},' \
+       netaddr/tools/netaddr
 
 %build
 %py_build
diff --git a/script-shebang.patch b/script-shebang.patch
new file mode 100644 (file)
index 0000000..60cf66b
--- /dev/null
@@ -0,0 +1,14 @@
+--- netaddr-0.7.19/setup.py.orig       2017-01-12 00:42:52.000000000 +0100
++++ netaddr-0.7.19/setup.py    2021-03-06 12:37:29.685301598 +0100
+@@ -174,11 +174,6 @@
+         scripts=['netaddr/tools/netaddr'],
+         url='https://github.com/drkjam/netaddr/',
+         version=netaddr.__version__,
+-        options={
+-            'build_scripts': {
+-                'executable': '/usr/bin/env python',
+-            },
+-        },
+     )
+     setup(**setup_options)
This page took 0.692201 seconds and 4 git commands to generate.