FreeBSD Bugzilla – Attachment 165085 Details for
Bug 205907
devel/py-ipaddr: Update to 2.1.11, fix build failure with Python 3, cleanup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Update to 2.1.11, fix build issues with python 3, cleanup
devel_py-ipaddr.patch (text/plain), 5.90 KB, created by
VK
on 2016-01-05 00:51:29 UTC
(
hide
)
Description:
Update to 2.1.11, fix build issues with python 3, cleanup
Filename:
MIME Type:
Creator:
VK
Created:
2016-01-05 00:51:29 UTC
Size:
5.90 KB
patch
obsolete
>Index: devel/py-ipaddr/Makefile >=================================================================== >--- devel/py-ipaddr/Makefile (revision 405266) >+++ devel/py-ipaddr/Makefile (working copy) >@@ -2,15 +2,16 @@ > # $FreeBSD$ > > PORTNAME= ipaddr >-PORTVERSION= 2.1.10 >-PORTREVISION= 1 >+PORTVERSION= 2.1.11 > CATEGORIES= devel python >-MASTER_SITES= GOOGLE_CODE >+MASTER_SITES= CHEESESHOP > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} > > MAINTAINER= mopsfelder@gmail.com > COMMENT= Google open source IPv4/IPv6 manipulation library in Python > >+LICENSE= APACHE20 >+ > PROJECTHOST= ipaddr-py > USES= python > USE_PYTHON= distutils autoplist >Index: devel/py-ipaddr/distinfo >=================================================================== >--- devel/py-ipaddr/distinfo (revision 405266) >+++ devel/py-ipaddr/distinfo (working copy) >@@ -1,2 +1,2 @@ >-SHA256 (ipaddr-2.1.10.tar.gz) = d2c3bfd45147e5773108d2c8d3c65102ff234f06e2f1049a0febfa31dde4cca3 >-SIZE (ipaddr-2.1.10.tar.gz) = 29004 >+SHA256 (ipaddr-2.1.11.tar.gz) = 1b555b8a8800134fdafe32b7d0cb52f5bdbfdd093707c3dd484c5ea59f1d98b7 >+SIZE (ipaddr-2.1.11.tar.gz) = 29046 >Index: devel/py-ipaddr/files/patch-ipaddr.py >=================================================================== >--- devel/py-ipaddr/files/patch-ipaddr.py (nonexistent) >+++ devel/py-ipaddr/files/patch-ipaddr.py (working copy) >@@ -0,0 +1,23 @@ >+--- ipaddr.py.orig 2014-01-31 21:22:32 UTC >++++ ipaddr.py >+@@ -25,6 +25,11 @@ and networks. >+ __version__ = '2.1.11' >+ >+ import struct >++import sys >++ >++if sys.version_info > (3,): >++ long = int >++ xrange = range >+ >+ IPV4LENGTH = 32 >+ IPV6LENGTH = 128 >+@@ -1447,7 +1452,7 @@ class _BaseV6(object): >+ >+ try: >+ # Now, parse the hextets into a 128-bit integer. >+- ip_int = 0L >++ ip_int = (2**128) & 0 >+ for i in xrange(parts_hi): >+ ip_int <<= 16 >+ ip_int |= self._parse_hextet(parts[i]) >Index: devel/py-ipaddr/files/patch-ipaddr__test.py >=================================================================== >--- devel/py-ipaddr/files/patch-ipaddr__test.py (nonexistent) >+++ devel/py-ipaddr/files/patch-ipaddr__test.py (working copy) >@@ -0,0 +1,78 @@ >+--- ipaddr_test.py.orig 2016-01-05 00:38:35 UTC >++++ ipaddr_test.py >+@@ -21,6 +21,10 @@ >+ import unittest >+ import time >+ import ipaddr >++import sys >++ >++if sys.version_info > (3,): >++ long = int >+ >+ # Compatibility function to cast str to bytes objects >+ if issubclass(ipaddr.Bytes, str): >+@@ -266,7 +270,7 @@ class IpaddrUnitTest(unittest.TestCase): >+ '2001:658:22a:cafe:200::1') >+ >+ def testGetNetmask(self): >+- self.assertEqual(int(self.ipv4.netmask), 4294967040L) >++ self.assertEqual(int(self.ipv4.netmask), 4294967040) >+ self.assertEqual(str(self.ipv4.netmask), '255.255.255.0') >+ self.assertEqual(str(self.ipv4_hostmask.netmask), '255.0.0.0') >+ self.assertEqual(int(self.ipv6.netmask), >+@@ -283,7 +287,7 @@ class IpaddrUnitTest(unittest.TestCase): >+ self.assertEqual(ipv6_zero_netmask._prefix_from_prefix_string('0'), 0) >+ >+ def testGetBroadcast(self): >+- self.assertEqual(int(self.ipv4.broadcast), 16909311L) >++ self.assertEqual(int(self.ipv4.broadcast), 16909311) >+ self.assertEqual(str(self.ipv4.broadcast), '1.2.3.255') >+ >+ self.assertEqual(int(self.ipv6.broadcast), >+@@ -1100,9 +1104,9 @@ class IpaddrUnitTest(unittest.TestCase): >+ >+ def testNetworkElementCaching(self): >+ # V4 - make sure we're empty >+- self.assertFalse(self.ipv4._cache.has_key('network')) >+- self.assertFalse(self.ipv4._cache.has_key('broadcast')) >+- self.assertFalse(self.ipv4._cache.has_key('hostmask')) >++ self.assertFalse('network' in self.ipv4._cache) >++ self.assertFalse('broadcast' in self.ipv4._cache) >++ self.assertFalse('hostmask' in self.ipv4._cache) >+ >+ # V4 - populate and test >+ self.assertEqual(self.ipv4.network, ipaddr.IPv4Address('1.2.3.0')) >+@@ -1110,14 +1114,14 @@ class IpaddrUnitTest(unittest.TestCase): >+ self.assertEqual(self.ipv4.hostmask, ipaddr.IPv4Address('0.0.0.255')) >+ >+ # V4 - check we're cached >+- self.assertTrue(self.ipv4._cache.has_key('network')) >+- self.assertTrue(self.ipv4._cache.has_key('broadcast')) >+- self.assertTrue(self.ipv4._cache.has_key('hostmask')) >++ self.assertTrue('network' in self.ipv4._cache) >++ self.assertTrue('broadcast' in self.ipv4._cache) >++ self.assertTrue('hostmask' in self.ipv4._cache) >+ >+ # V6 - make sure we're empty >+- self.assertFalse(self.ipv6._cache.has_key('network')) >+- self.assertFalse(self.ipv6._cache.has_key('broadcast')) >+- self.assertFalse(self.ipv6._cache.has_key('hostmask')) >++ self.assertFalse('network' in self.ipv6._cache) >++ self.assertFalse('broadcast' in self.ipv6._cache) >++ self.assertFalse('hostmask' in self.ipv6._cache) >+ >+ # V6 - populate and test >+ self.assertEqual(self.ipv6.network, >+@@ -1128,9 +1132,9 @@ class IpaddrUnitTest(unittest.TestCase): >+ ipaddr.IPv6Address('::ffff:ffff:ffff:ffff')) >+ >+ # V6 - check we're cached >+- self.assertTrue(self.ipv6._cache.has_key('network')) >+- self.assertTrue(self.ipv6._cache.has_key('broadcast')) >+- self.assertTrue(self.ipv6._cache.has_key('hostmask')) >++ self.assertTrue('network' in self.ipv6._cache) >++ self.assertTrue('broadcast' in self.ipv6._cache) >++ self.assertTrue('hostmask' in self.ipv6._cache) >+ >+ def testTeredo(self): >+ # stolen from wikipedia >Index: devel/py-ipaddr/pkg-descr >=================================================================== >--- devel/py-ipaddr/pkg-descr (revision 405266) >+++ devel/py-ipaddr/pkg-descr (working copy) >@@ -4,4 +4,4 @@ > Development mailing list: > http://groups.google.com/group/ipaddr-py-dev > >-WWW: http://code.google.com/p/ipaddr-py/ >+WWW: http://code.google.com/p/ipaddr-py/
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 205907
:
165085
|
165096