Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
695bed2adf
!42 Update to 0.10.1
From: @wk333 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2024-02-06 08:26:38 +00:00
wk333
9174463919 Update to 0.10.1 2024-02-04 11:28:11 +08:00
openeuler-ci-bot
3d48136839
!21 delete taboo words
From: @zppzhangpan 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-06-21 01:49:40 +00:00
zhangpan
f6bc8d0fec delete taboo words 2023-06-13 07:50:32 +00:00
openeuler-ci-bot
b978c19fcc
!14 Fix for is_loopback behaviour (issue: #222)
From: @cao-fei8 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
2023-01-18 09:34:00 +00:00
cao-fei8
2e6545b8be Fix for is_loopback behaviour (issue: #222)
Reference:
606a44b62e

Signed-off-by: cao-fei8 <caofei@xfusion.com>
2023-01-16 19:03:56 +08:00
openeuler-ci-bot
5bbf776057
!11 License compliance rectification
From: @wu-leilei 
Reviewed-by: @ruebb 
Signed-off-by: @ruebb
2022-06-10 03:47:22 +00:00
wu-leilei
7264d6affe License compliance rectification 2022-05-11 15:30:42 +08:00
openeuler-ci-bot
217341bccd
!8 enable testcase
From: @shirely16 
Reviewed-by: @orange-snn 
Signed-off-by: @orange-snn
2022-03-26 10:18:31 +00:00
shirely16
aa6d73045a enable testcase 2022-03-26 17:03:06 +08:00
5 changed files with 90 additions and 1448 deletions

View File

@ -0,0 +1,64 @@
From 76fe3af427a1316a91c96e01de1f0407893121a9 Mon Sep 17 00:00:00 2001
From: hanhui <hanhui15@h-partners.com>
Date: Sat, 26 Mar 2022 16:23:45 +0800
Subject: [PATCH] disable-test-oui-information
reason:elimate-ROC-in-python-netaddr.patch lead to
oui.registration.org and oui.registration.address
changed,cause the failure of test cases.
Therefore, disable the test code
---
netaddr/tests/eui/test_eui.py | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/netaddr/tests/eui/test_eui.py b/netaddr/tests/eui/test_eui.py
index 645a518..b8dcedd 100644
--- a/netaddr/tests/eui/test_eui.py
+++ b/netaddr/tests/eui/test_eui.py
@@ -146,42 +146,14 @@ def test_eui_oui_information():
oui = mac.oui
assert str(oui) == '00-1B-77'
- assert oui.registration().address == [
- 'Lot 8, Jalan Hi-Tech 2/3',
- 'Kulim Kedah 09000',
- 'MY'
- ]
-
- assert oui.registration().org == 'Intel Corporate'
-
-
def test_oui_constructor():
oui = OUI(524336)
assert str(oui) == '08-00-30'
assert oui == OUI('08-00-30')
- assert oui.registration(0).address == [
- '2380 N. ROSE AVENUE',
- 'OXNARD CA 93010',
- 'US'
- ]
- assert oui.registration(0).org == 'NETWORK RESEARCH CORPORATION'
assert oui.registration(0).oui == '08-00-30'
- assert oui.registration(1).address == [
- 'GPO BOX 2476V',
- 'MELBOURNE VIC 3001',
- 'AU',
- ]
- assert oui.registration(1).org == 'ROYAL MELBOURNE INST OF TECH'
- assert oui.registration(1).oui == '08-00-30'
- assert oui.registration(2).address == [
- 'CH-1211',
- 'GENEVE SUISSE/SWITZ 023',
- 'CH'
- ]
- assert oui.registration(2).org == 'CERN'
assert oui.registration(2).oui == '08-00-30'
assert oui.reg_count == 3
--
2.33.0

File diff suppressed because it is too large Load Diff

BIN
netaddr-0.10.1.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,16 +1,16 @@
Name: python-netaddr
Version: 0.8.0
Release: 2
Version: 0.10.1
Release: 1
Summary: A pure Python network address representation and manipulation library
License: BSD
License: BSD-3-Clause
URL: http://github.com/drkjam/netaddr
Source0: https://pypi.python.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
Patch9000: elimate-ROC-in-python-netaddr.patch
Patch9000: disable-test-oui-information.patch
BuildArch: noarch
BuildRequires: python3-devel python3-setuptools python3-sphinx python3-pytest
BuildRequires: python3-devel python3-setuptools python3-sphinx python3-pytest python3-furo
%description
A network address manipulation library for Python
@ -34,6 +34,10 @@ Based on Python3 network address representation and operation library Package
sed -i 's/\r//' netaddr/*.py netaddr/ip/*.py netaddr/eui/*.idx
find netaddr -name "*.py" | xargs sed -i -e '1 {/^#!\//d}'
# elimate key words in python-netaddr: REPUBLIC OF CHINA, ROC, R.O.C., etc
sed -i "s/, R.O.C//g;s/Peoples Republic of China/People's Republic of China/g" netaddr/eui/iab.txt
sed -i "s/TAIWAN,ROC/TAIWAN/g;s/Taiwan ROC./Taiwan/g;s/TAIWAN R.O.C./TAIWAN/g;s/Hsin-Chu R.O.C./Hsin-Chu Taiwan/g;s/Taiwan, R.O.C./Taiwan/g;s/Taiwan(R.O.C)/Taiwan/g;s/Taiwan R.O.C/Taiwan/g;s/Taiwan (R.O.C.)/Taiwan/g;s/Taiwan, R.O.C/Taiwan/g;s/TAIWAN 30077 R.O.C.//g;s/TAIWAN 231 R.O.C.//g;s/TAIWAN ROC/TAIWAN/g;s/TAIWAN R. O. C./TAIWAN/g;s/Taiwan, R. O. C./TAIWAN/g;s/, REPUBLIC OF CHINA//g;s/TAIWAN 222 R.O.C.//g;s/ R.O.C.//g;s/, R.O.C//g;s/ (R.O.C)//g;s/,R.O.C//g;s/ R.O.C//g;s/ (R.O.C.)//g;s/ ROC/ TAIWAN/g;s/ ,REPUBLIC OF CHINA//g;s/ ,REPUBLIC OF CHINA//g;s/Taiwan ROC//g" netaddr/eui/oui.txt
%build
%py3_build
@ -46,15 +50,31 @@ PYTHONPATH='../' sphinx-build-%{python3_version} -b html -d build/doctrees sourc
%py3_install
%check
%{__python3} setup.py test
py.test-%{python3_version}
%files -n python3-netaddr
%exclude %{python3_sitelib}/netaddr/eui/oui.txt
%license COPYRIGHT
%doc AUTHORS CHANGELOG README.rst docs/python3/html
%{python3_sitelib}/*
%{_bindir}/netaddr
%changelog
* Sun Feb 04 2024 wangkai <13474090681@163.com> - 0.10.1-1
- Update to 0.10.1
* Tue Jun 13 2023 zhangpan <zhangpan103@h-partners.com> - 0.8.0-6
- delete taboo words
* Tue Jan 17 2023 caofei <caofei@xfusion.com> - 0.8.0-5
- Fix for is_loopback behaviour (issue: #222)
* Wed May 11 2022 wulei <wulei80@h-partners.com> - 0.8.0-4
- License compliance rectification
* Sat Mar 26 2022 hanhui <hanhui15@h-partners.com> - 0.8.0-3
- enable testcase
* Mon Jan 17 2022 xingxing <xingxing9@huawei.com> - 0.8.0-2
- delete more sensitive keyword