Compare commits
No commits in common. "c9" and "c8" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/netaddr-0.8.0.tar.gz
|
SOURCES/netaddr-0.7.19.tar.gz
|
||||||
|
@ -1 +1 @@
|
|||||||
16f10a1bfaf95052f368b3786188f9fbdda108c3 SOURCES/netaddr-0.8.0.tar.gz
|
00e0ce7d7ebc1d6e7943e884aa51ccb7becdc9ea SOURCES/netaddr-0.7.19.tar.gz
|
||||||
|
29
SOURCES/0001-Do-not-override-executable-path.patch
Normal file
29
SOURCES/0001-Do-not-override-executable-path.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 8b08c463a49bdcca455cdfbefa971c89bd309ddf Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Eckersberg <jeckersb@redhat.com>
|
||||||
|
Date: Mon, 19 Feb 2018 15:20:54 -0500
|
||||||
|
Subject: [PATCH] Do not override executable path
|
||||||
|
|
||||||
|
Resolves: RHBZ#1546800
|
||||||
|
---
|
||||||
|
setup.py | 5 -----
|
||||||
|
1 file changed, 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index 2bd2a08..4cd2780 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -177,11 +177,6 @@ def main():
|
||||||
|
scripts=['netaddr/tools/netaddr'],
|
||||||
|
url='https://github.com/drkjam/netaddr/',
|
||||||
|
version=netaddr.__version__,
|
||||||
|
- options={
|
||||||
|
- 'build_scripts': {
|
||||||
|
- 'executable': '/usr/bin/env python',
|
||||||
|
- },
|
||||||
|
- },
|
||||||
|
)
|
||||||
|
|
||||||
|
setup(**setup_options)
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
@ -0,0 +1,53 @@
|
|||||||
|
From 2ab73f10be7069c9412e853d2d0caf29bd624012 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Moss <drkjam@gmail.com>
|
||||||
|
Date: Mon, 16 Jan 2017 22:17:16 +0000
|
||||||
|
Subject: [PATCH] - fixed broken tests in issue #149 (python 3 regression in
|
||||||
|
0.7.19) - only affects test suite
|
||||||
|
|
||||||
|
---
|
||||||
|
netaddr/tests/eui/test_ieee_parsers.py | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/netaddr/tests/eui/test_ieee_parsers.py b/netaddr/tests/eui/test_ieee_parsers.py
|
||||||
|
index 7877f09..81f1faa 100644
|
||||||
|
--- a/netaddr/tests/eui/test_ieee_parsers.py
|
||||||
|
+++ b/netaddr/tests/eui/test_ieee_parsers.py
|
||||||
|
@@ -12,7 +12,7 @@ SAMPLE_DIR = os.path.dirname(__file__)
|
||||||
|
def test_oui_parser_py2():
|
||||||
|
from cStringIO import StringIO
|
||||||
|
outfile = StringIO()
|
||||||
|
- with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile:
|
||||||
|
+ with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile:
|
||||||
|
iab_parser = OUIIndexParser(infile)
|
||||||
|
iab_parser.attach(FileIndexer(outfile))
|
||||||
|
iab_parser.parse()
|
||||||
|
@@ -23,7 +23,7 @@ def test_oui_parser_py2():
|
||||||
|
def test_iab_parser_py2():
|
||||||
|
from cStringIO import StringIO
|
||||||
|
outfile = StringIO()
|
||||||
|
- with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile:
|
||||||
|
+ with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile:
|
||||||
|
iab_parser = IABIndexParser(infile)
|
||||||
|
iab_parser.attach(FileIndexer(outfile))
|
||||||
|
iab_parser.parse()
|
||||||
|
@@ -34,7 +34,7 @@ def test_iab_parser_py2():
|
||||||
|
def test_oui_parser_py3():
|
||||||
|
from io import StringIO
|
||||||
|
outfile = StringIO()
|
||||||
|
- with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile:
|
||||||
|
+ with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile:
|
||||||
|
iab_parser = OUIIndexParser(infile)
|
||||||
|
iab_parser.attach(FileIndexer(outfile))
|
||||||
|
iab_parser.parse()
|
||||||
|
@@ -45,7 +45,7 @@ def test_oui_parser_py3():
|
||||||
|
def test_iab_parser_py3():
|
||||||
|
from io import StringIO
|
||||||
|
outfile = StringIO()
|
||||||
|
- with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile:
|
||||||
|
+ with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile:
|
||||||
|
iab_parser = IABIndexParser(infile)
|
||||||
|
iab_parser.attach(FileIndexer(outfile))
|
||||||
|
iab_parser.parse()
|
||||||
|
--
|
||||||
|
2.9.3
|
||||||
|
|
@ -2,13 +2,15 @@
|
|||||||
%global with_python3 1
|
%global with_python3 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} < 32 && 0%{?rhel} < 9
|
%if 0%{?rhel} > 7
|
||||||
%global with_python2 1
|
%bcond_with python2
|
||||||
|
%else
|
||||||
|
%bcond_without python2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: python-netaddr
|
Name: python-netaddr
|
||||||
Version: 0.8.0
|
Version: 0.7.19
|
||||||
Release: 5%{?dist}
|
Release: 8%{?dist}
|
||||||
Summary: A pure Python network address representation and manipulation library
|
Summary: A pure Python network address representation and manipulation library
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -16,14 +18,9 @@ URL: http://github.com/drkjam/netaddr
|
|||||||
Source0: https://pypi.python.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
|
Source0: https://pypi.python.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# sphinx is python3-only f31 onward
|
|
||||||
# https://fedoraproject.org/wiki/Changes/Sphinx2
|
Patch0: 0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch
|
||||||
BuildRequires: python3-sphinx
|
Patch1: 0001-Do-not-override-executable-path.patch
|
||||||
%if 0%{?with_python2}
|
|
||||||
BuildRequires: python2-pytest
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python2-setuptools
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global desc A network address manipulation library for Python\
|
%global desc A network address manipulation library for Python\
|
||||||
\
|
\
|
||||||
@ -34,8 +31,7 @@ Layer 3 addresses\
|
|||||||
* IPv4 and IPv6 addresses, subnets, masks, prefixes\
|
* IPv4 and IPv6 addresses, subnets, masks, prefixes\
|
||||||
* iterating, slicing, sorting, summarizing and classifying IP networks\
|
* iterating, slicing, sorting, summarizing and classifying IP networks\
|
||||||
* dealing with various ranges formats (CIDR, arbitrary ranges and globs, nmap)\
|
* dealing with various ranges formats (CIDR, arbitrary ranges and globs, nmap)\
|
||||||
* set based operations (unions, intersections etc) over IP addresses and\
|
* set based operations (unions, intersections etc) over IP addresses and subnets\
|
||||||
subnets\
|
|
||||||
* parsing a large variety of different formats and notations\
|
* parsing a large variety of different formats and notations\
|
||||||
* looking up IANA IP block information\
|
* looking up IANA IP block information\
|
||||||
* generating DNS reverse lookups\
|
* generating DNS reverse lookups\
|
||||||
@ -53,13 +49,17 @@ Layer 2 addresses\
|
|||||||
|
|
||||||
%description %_description
|
%description %_description
|
||||||
|
|
||||||
%if 0%{?with_python2}
|
%if %{with python2}
|
||||||
%package -n python2-netaddr
|
%package -n python2-netaddr
|
||||||
Summary: %summary
|
Summary: %summary
|
||||||
%{?python_provide:%python_provide python2-netaddr}
|
%{?python_provide:%python_provide python2-netaddr}
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
|
BuildRequires: python2-sphinx
|
||||||
|
BuildRequires: python2-pytest
|
||||||
|
|
||||||
%description -n python2-netaddr %_description
|
%description -n python2-netaddr %_description
|
||||||
%endif
|
%endif #{with python2}
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%package -n python3-netaddr
|
%package -n python3-netaddr
|
||||||
@ -68,7 +68,6 @@ BuildRequires: python3-devel
|
|||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
%{?python_provide:%python_provide python3-netaddr}
|
|
||||||
|
|
||||||
%description -n python3-netaddr
|
%description -n python3-netaddr
|
||||||
%{desc}
|
%{desc}
|
||||||
@ -76,19 +75,30 @@ BuildRequires: python3-pytest
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n netaddr-%{version}
|
%setup -q -n netaddr-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
|
# Make rpmlint happy, get rid of DOS line endings
|
||||||
|
sed -i 's/\r//' netaddr/*.py netaddr/ip/*.py netaddr/eui/*.idx
|
||||||
|
|
||||||
# Make rpmlint happy, rip out python shebang lines from most python
|
# Make rpmlint happy, rip out python shebang lines from most python
|
||||||
# modules
|
# modules
|
||||||
find netaddr -name "*.py" | \
|
find netaddr -name "*.py" | \
|
||||||
xargs sed -i -e '1 {/^#!\//d}'
|
xargs sed -i -e '1 {/^#!\//d}'
|
||||||
|
# Fix python executable
|
||||||
|
%if %{with python2}
|
||||||
|
sed -i -e '1s,/usr/bin/env python,%{__python2} %{?py_shbang_opts},' netaddr/tools/netaddr
|
||||||
|
%else
|
||||||
|
sed -i -e '1s,/usr/bin/env python,%{__python3} %{?py_shbang_opts},' netaddr/tools/netaddr
|
||||||
|
%endif #{with python2}
|
||||||
|
|
||||||
# Make rpmlint happy, fix permissions on documentation files
|
# Make rpmlint happy, fix permissions on documentation files
|
||||||
chmod 0644 README.rst AUTHORS CHANGELOG COPYRIGHT LICENSE PKG-INFO
|
chmod 0644 README.md AUTHORS CHANGELOG COPYRIGHT LICENSE PKG-INFO
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?with_python2}
|
%if %{with python2}
|
||||||
%py2_build
|
%py2_build
|
||||||
%endif
|
%endif #{with python2}
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%py3_build
|
%py3_build
|
||||||
@ -96,119 +106,56 @@ chmod 0644 README.rst AUTHORS CHANGELOG COPYRIGHT LICENSE PKG-INFO
|
|||||||
|
|
||||||
#docs
|
#docs
|
||||||
pushd docs
|
pushd docs
|
||||||
PYTHONPATH='../' sphinx-build-%{python3_version} -b html -d build/doctrees source html
|
%if %{with python2}
|
||||||
rm -f html/.buildinfo
|
PYTHONPATH='../' sphinx-build -b html -d build/doctrees source html
|
||||||
|
%endif #{with python2}
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
PYTHONPATH='../' sphinx-build-%{python3_version} -b html -d build/doctrees source python3/html
|
PYTHONPATH='../' sphinx-build-%{python3_version} -b html -d build/doctrees source python3/html
|
||||||
rm -f python3/html/.buildinfo
|
|
||||||
%endif
|
%endif
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if 0%{?with_python2}
|
|
||||||
%py2_install
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%py3_install
|
%py3_install
|
||||||
|
mv %{buildroot}%{_bindir}/netaddr %{buildroot}%{_bindir}/netaddr3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
|
%py2_install
|
||||||
|
%endif #{with python2}
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if 0%{?with_python2}
|
%if %{with python2}
|
||||||
py.test-%{python2_version}
|
py.test-%{python2_version}
|
||||||
%endif
|
%endif #{with python2}
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
py.test-%{python3_version}
|
LANG=en_US.UTF-8 py.test-%{python3_version}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?with_python2}
|
%if %{with python2}
|
||||||
%files -n python2-netaddr
|
%files -n python2-netaddr
|
||||||
%license COPYRIGHT LICENSE
|
%license COPYRIGHT LICENSE
|
||||||
%doc AUTHORS CHANGELOG
|
%doc AUTHORS CHANGELOG
|
||||||
%doc README.rst docs/html
|
%doc README.md docs/html
|
||||||
%{python2_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
%endif
|
%{_bindir}/netaddr
|
||||||
|
%endif #{with python2}
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n python3-netaddr
|
%files -n python3-netaddr
|
||||||
%license COPYRIGHT
|
%license COPYRIGHT
|
||||||
%doc AUTHORS CHANGELOG
|
%doc AUTHORS CHANGELOG
|
||||||
%doc README.rst docs/python3/html
|
%doc README.md docs/python3/html
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%{_bindir}/netaddr
|
%{_bindir}/netaddr3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.8.0-5
|
* Mon Jul 09 2018 Petr Viktorin <pviktori@redhat.com> - 0.7.19-8
|
||||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
- Don't build python2 subpackage on rhel>7
|
||||||
Related: rhbz#1991688
|
https://bugzilla.redhat.com/show_bug.cgi?id=1567153
|
||||||
|
|
||||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.8.0-4
|
|
||||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 3 2020 John Eckersberg <jeckersb@redhat.com> - 0.8.0-1
|
|
||||||
- New upstream release 0.8.0 (rhbz#1853684)
|
|
||||||
|
|
||||||
* Fri Jun 19 2020 John Eckersberg <jeckersb@redhat.com> - 0.7.20-1
|
|
||||||
- New upstream release 0.7.20 (rhbz#1848782)
|
|
||||||
- Minor spec and rpmlint cleanups
|
|
||||||
|
|
||||||
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.19-22
|
|
||||||
- Rebuilt for Python 3.9
|
|
||||||
|
|
||||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.19-21
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Nov 7 2019 John Eckersberg <eck@redhat.com> - 0.7.19-20
|
|
||||||
- Remove python2 subpackage from Fedora 32+ (rhbz#1769871)
|
|
||||||
|
|
||||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.19-19
|
|
||||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
||||||
|
|
||||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.19-18
|
|
||||||
- Rebuilt for Python 3.8
|
|
||||||
|
|
||||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.19-17
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jul 22 2019 John Eckersberg <eck@redhat.com> - 0.7.19-16
|
|
||||||
- Move /usr/bin/netaddr to python3 and remove python2 version
|
|
||||||
See https://fedoraproject.org/wiki/Changes/Python_means_Python3
|
|
||||||
|
|
||||||
* Mon Mar 11 2019 John Eckersberg <eck@redhat.com> - 0.7.19-15
|
|
||||||
- Remove BuildRequires on python2-sphinx
|
|
||||||
See https://fedoraproject.org/wiki/Changes/Sphinx2
|
|
||||||
|
|
||||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.19-14
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Nov 28 2018 John Eckersberg <eck@redhat.com> - 0.7.19-13
|
|
||||||
- Add python_provide for python3 subpackage per packaging guidelines (RHBZ#1654198)
|
|
||||||
|
|
||||||
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.7.19-12
|
|
||||||
- Drop explicit locale setting
|
|
||||||
See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
|
|
||||||
|
|
||||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.19-11
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.7.19-10
|
|
||||||
- Rebuilt for Python 3.7
|
|
||||||
|
|
||||||
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.7.19-9
|
|
||||||
- Rebuilt for Python 3.7
|
|
||||||
|
|
||||||
* Thu Feb 22 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.7.19-8
|
|
||||||
- Update Python 2 dependency declarations to new packaging standards
|
|
||||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
|
||||||
|
|
||||||
* Mon Feb 19 2018 John Eckersberg <eck@redhat.com> - 0.7.19-7
|
* Mon Feb 19 2018 John Eckersberg <eck@redhat.com> - 0.7.19-7
|
||||||
- Fix shebang mangling for python3 (RHBZ#1546800)
|
- Fix shebang mangling for python3 (RHBZ#1546800)
|
||||||
|
Loading…
Reference in New Issue
Block a user