FreeBSD Bugzilla – Attachment 147949 Details for
Bug 194125
[patch] devel/py-configobj: allow building for Python 3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Allows devel/py-configobj to be built for Python 3
py-configobj.patch (text/plain), 4.84 KB, created by
Matteo Cypriani
on 2014-10-03 22:24:31 UTC
(
hide
)
Description:
Allows devel/py-configobj to be built for Python 3
Filename:
MIME Type:
Creator:
Matteo Cypriani
Created:
2014-10-03 22:24:31 UTC
Size:
4.84 KB
patch
obsolete
>diff --git a/devel/py-configobj/Makefile b/devel/py-configobj/Makefile >index a4fc644..ddf8d7f 100644 >--- a/devel/py-configobj/Makefile >+++ b/devel/py-configobj/Makefile >@@ -3,19 +3,19 @@ > > PORTNAME= configobj > PORTVERSION= 4.7.2 >+PORTREVISION= 1 > CATEGORIES= devel python > MASTER_SITES= http://www.voidspace.org.uk/downloads/ \ > SF \ > ${MASTER_SITE_GOOGLE_CODE} >- > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} > > MAINTAINER= nivit@FreeBSD.org > COMMENT= Simple but powerful config file reader and writer > >-USES= zip >-USE_PYTHON= yes >-USE_PYDISTUTILS= yes >-PYDISTUTILS_AUTOPLIST= yes >+LICENSE= BSD3CLAUSE >+ >+USES= python zip >+USE_PYTHON= distutils autoplist > > .include <bsd.port.mk> >diff --git a/devel/py-configobj/files/patch-configobj.py b/devel/py-configobj/files/patch-configobj.py >new file mode 100644 >index 0000000..8765fcb >--- /dev/null >+++ b/devel/py-configobj/files/patch-configobj.py >@@ -0,0 +1,43 @@ >+--- configobj.py.orig 2010-02-27 21:36:16 UTC >++++ configobj.py >+@@ -1641,7 +1641,7 @@ >+ comment = '' >+ try: >+ value = unrepr(value) >+- except Exception, e: >++ except Exception as e: >+ if type(e) == UnknownType: >+ msg = 'Unknown name or type in value at line %s.' >+ else: >+@@ -1654,7 +1654,7 @@ >+ comment = '' >+ try: >+ value = unrepr(value) >+- except Exception, e: >++ except Exception as e: >+ if isinstance(e, UnknownType): >+ msg = 'Unknown name or type in value at line %s.' >+ else: >+@@ -1929,11 +1929,11 @@ >+ raise_errors=True, >+ file_error=True, >+ _inspec=True) >+- except ConfigObjError, e: >++ except ConfigObjError as e: >+ # FIXME: Should these errors have a reference >+ # to the already parsed ConfigObj ? >+ raise ConfigspecError('Parsing configspec failed: %s' % e) >+- except IOError, e: >++ except IOError as e: >+ raise IOError('Reading configspec failed: %s' % e) >+ >+ self.configspec = configspec >+@@ -2189,7 +2189,7 @@ >+ val, >+ missing=missing >+ ) >+- except validator.baseErrorClass, e: >++ except validator.baseErrorClass as e: >+ if not preserve_errors or isinstance(e, self._vdtMissingValue): >+ out[entry] = False >+ else: >diff --git a/devel/py-configobj/files/patch-validate.py b/devel/py-configobj/files/patch-validate.py >new file mode 100644 >index 0000000..3f0d92a >--- /dev/null >+++ b/devel/py-configobj/files/patch-validate.py >@@ -0,0 +1,38 @@ >+--- validate.py.orig 2010-03-01 23:04:02 UTC >++++ validate.py >+@@ -284,7 +284,7 @@ >+ except socket.error: >+ # bug in inet_aton, corrected in Python 2.4 >+ if ip.strip() == '255.255.255.255': >+- return 0xFFFFFFFFL >++ return 0xFFFFFFFF >+ else: >+ raise ValueError('Not a good dotted-quad IP: %s' % ip) >+ return >+@@ -316,7 +316,7 @@ >+ import socket, struct >+ >+ # no need to intercept here, 4294967295L is fine >+- if num > 4294967295L or num < 0: >++ if num > 4294967295 or num < 0: >+ raise ValueError('Not a good numeric IP: %s' % num) >+ try: >+ return socket.inet_ntoa( >+@@ -739,7 +739,7 @@ >+ elif isinstance(val, (int, long, float, basestring)): >+ try: >+ out_params.append(fun(val)) >+- except ValueError, e: >++ except ValueError as e: >+ raise VdtParamError(name, val) >+ else: >+ raise VdtParamError(name, val) >+@@ -1292,7 +1292,7 @@ >+ raise VdtValueTooLongError(value) >+ try: >+ return [fun_dict[arg](val) for arg, val in zip(args, value)] >+- except KeyError, e: >++ except KeyError as e: >+ raise VdtParamError('mixed_list', e) >+ >+ >diff --git a/devel/py-configobj/pkg-descr b/devel/py-configobj/pkg-descr >index b95f936..e5b1c4f 100644 >--- a/devel/py-configobj/pkg-descr >+++ b/devel/py-configobj/pkg-descr >@@ -2,4 +2,4 @@ ConfigObj is a simple but powerful config file reader and writer: an ini file > round tripper. Its main feature is that it is very easy to use, with a > straightforward programmer's interface and a simple syntax for config file > >-WWW: http://www.voidspace.org.uk/python/configobj.html >+WWW: http://www.voidspace.org.uk/python/configobj.html
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 194125
: 147949