Wed Aug 15 17:18:15 2012 UTC ()
make Python3 ready


(drochner)
diff -r1.1.1.1 -r1.2 pkgsrc/math/py-roman/Makefile
diff -r1.1.1.1 -r1.2 pkgsrc/math/py-roman/distinfo
diff -r1.1.1.1 -r1.2 pkgsrc/math/py-roman/patches/patch-src_roman.py

cvs diff -r1.1.1.1 -r1.2 pkgsrc/math/py-roman/Makefile (expand / switch to unified diff)

--- pkgsrc/math/py-roman/Makefile 2011/10/05 07:43:12 1.1.1.1
+++ pkgsrc/math/py-roman/Makefile 2012/08/15 17:18:14 1.2
@@ -1,21 +1,21 @@ @@ -1,21 +1,21 @@
1# $NetBSD: Makefile,v 1.1.1.1 2011/10/05 07:43:12 obache Exp $ 1# $NetBSD: Makefile,v 1.2 2012/08/15 17:18:14 drochner Exp $
2# 2#
3 3
4DISTNAME= roman-1.4.0 4DISTNAME= roman-1.4.0
5PKGNAME= ${PYPKGPREFIX}-${DISTNAME} 5PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
6CATEGORIES= math 6CATEGORIES= math
7MASTER_SITES= http://pypi.python.org/packages/source/r/roman/ 7MASTER_SITES= http://pypi.python.org/packages/source/r/roman/
8 8
9MAINTAINER= obache@NetBSD.org 9MAINTAINER= obache@NetBSD.org
10HOMEPAGE= http://pypi.python.org/pypi/roman/ 10HOMEPAGE= http://pypi.python.org/pypi/roman/
11COMMENT= Integer to Roman numerals converter for Python 11COMMENT= Integer to Roman numerals converter for Python
12LICENSE= python-software-foundation 12LICENSE= python-software-foundation
13 13
14CONFLICTS+= ${PYPKGPREFIX}-docutils<=0.7 14CONFLICTS+= ${PYPKGPREFIX}-docutils<=0.7
15 15
16PKG_DESTDIR_SUPPORT= user-destdir 16PKG_DESTDIR_SUPPORT= user-destdir
17 
18USE_LANGUAGES= # none 17USE_LANGUAGES= # none
 18PYTHON_VERSIONS_INCLUDE_3X= yes
19 19
20.include "../../lang/python/egg.mk" 20.include "../../lang/python/egg.mk"
21.include "../../mk/bsd.pkg.mk" 21.include "../../mk/bsd.pkg.mk"

cvs diff -r1.1.1.1 -r1.2 pkgsrc/math/py-roman/distinfo (expand / switch to unified diff)

--- pkgsrc/math/py-roman/distinfo 2011/10/05 07:43:12 1.1.1.1
+++ pkgsrc/math/py-roman/distinfo 2012/08/15 17:18:14 1.2
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.1.1.1 2011/10/05 07:43:12 obache Exp $ 1$NetBSD: distinfo,v 1.2 2012/08/15 17:18:14 drochner Exp $
2 2
3SHA1 (roman-1.4.0.tar.gz) = 3d9cf0c46a4e3558785a9f7c90cd96a2d31dc9b0 3SHA1 (roman-1.4.0.tar.gz) = 3d9cf0c46a4e3558785a9f7c90cd96a2d31dc9b0
4RMD160 (roman-1.4.0.tar.gz) = 9c9f1d8de8e19f6dcab02a28b2a28a1a7f3dd546 4RMD160 (roman-1.4.0.tar.gz) = 9c9f1d8de8e19f6dcab02a28b2a28a1a7f3dd546
5Size (roman-1.4.0.tar.gz) = 3033 bytes 5Size (roman-1.4.0.tar.gz) = 3033 bytes
6SHA1 (patch-src_roman.py) = 3cbe70896a19b5d177b329f18dcb37a051f0305a 6SHA1 (patch-src_roman.py) = 236d6679f2a57214dbf12598ccd3fa22bfda553b

cvs diff -r1.1.1.1 -r1.2 pkgsrc/math/py-roman/patches/Attic/patch-src_roman.py (expand / switch to unified diff)

--- pkgsrc/math/py-roman/patches/Attic/patch-src_roman.py 2011/10/05 07:43:12 1.1.1.1
+++ pkgsrc/math/py-roman/patches/Attic/patch-src_roman.py 2012/08/15 17:18:15 1.2
@@ -1,15 +1,32 @@ @@ -1,15 +1,32 @@
1$NetBSD: patch-src_roman.py,v 1.1.1.1 2011/10/05 07:43:12 obache Exp $ 1$NetBSD: patch-src_roman.py,v 1.2 2012/08/15 17:18:15 drochner Exp $
2 2
3* replace deprecated operator `<>' with `!=' 3* replace deprecated operator `<>' with `!='
 4* use 3.x compatible exception syntax
4 5
5--- src/roman.py.orig 2009-07-23 16:34:18.000000000 +0000 6--- src/roman.py.orig 2009-07-23 16:34:18.000000000 +0000
6+++ src/roman.py 7+++ src/roman.py
7@@ -41,7 +41,7 @@ def toRoman(n): 8@@ -40,9 +40,9 @@ romanNumeralMap = (('M', 1000),
 9 def toRoman(n):
8 """convert integer to Roman numeral""" 10 """convert integer to Roman numeral"""
9 if not (0 < n < 5000): 11 if not (0 < n < 5000):
10 raise OutOfRangeError, "number out of range (must be 1..4999)" 12- raise OutOfRangeError, "number out of range (must be 1..4999)"
11- if int(n) <> n: 13- if int(n) <> n:
 14- raise NotIntegerError, "decimals can not be converted"
 15+ raise OutOfRangeError("number out of range (must be 1..4999)")
12+ if int(n) != n: 16+ if int(n) != n:
13 raise NotIntegerError, "decimals can not be converted" 17+ raise NotIntegerError("decimals can not be converted")
14  18
15 result = "" 19 result = ""
 20 for numeral, integer in romanNumeralMap:
 21@@ -67,9 +67,9 @@ romanNumeralPattern = re.compile("""
 22 def fromRoman(s):
 23 """convert Roman numeral to integer"""
 24 if not s:
 25- raise InvalidRomanNumeralError, 'Input can not be blank'
 26+ raise InvalidRomanNumeralError('Input can not be blank')
 27 if not romanNumeralPattern.search(s):
 28- raise InvalidRomanNumeralError, 'Invalid Roman numeral: %s' % s
 29+ raise InvalidRomanNumeralError('Invalid Roman numeral: %s' % s)
 30
 31 result = 0
 32 index = 0