Update py-roman to 2.0.0.

2.0.0 (2013-02-25)
------------------

- Added Python 3.3 and PyPy support.

- Added tests.
This commit is contained in:
obache 2014-08-08 12:48:44 +00:00
parent c792f6270a
commit d253456d83
3 changed files with 7 additions and 39 deletions

View file

@ -1,9 +1,10 @@
# $NetBSD: Makefile,v 1.4 2014/01/25 10:30:13 wiz Exp $
# $NetBSD: Makefile,v 1.5 2014/08/08 12:48:44 obache Exp $
DISTNAME= roman-1.4.0
DISTNAME= roman-2.0.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= math
MASTER_SITES= http://pypi.python.org/packages/source/r/roman/
EXTRACT_SUFX= .zip
MAINTAINER= obache@NetBSD.org
HOMEPAGE= http://pypi.python.org/pypi/roman/

View file

@ -1,6 +1,5 @@
$NetBSD: distinfo,v 1.2 2012/08/15 17:18:14 drochner Exp $
$NetBSD: distinfo,v 1.3 2014/08/08 12:48:44 obache Exp $
SHA1 (roman-1.4.0.tar.gz) = 3d9cf0c46a4e3558785a9f7c90cd96a2d31dc9b0
RMD160 (roman-1.4.0.tar.gz) = 9c9f1d8de8e19f6dcab02a28b2a28a1a7f3dd546
Size (roman-1.4.0.tar.gz) = 3033 bytes
SHA1 (patch-src_roman.py) = 236d6679f2a57214dbf12598ccd3fa22bfda553b
SHA1 (roman-2.0.0.zip) = 7fd136f80cf780bbf802ffe1c4989a64ff469c75
RMD160 (roman-2.0.0.zip) = a8ca66d5fafd340986a45332d861d6bae259fe1e
Size (roman-2.0.0.zip) = 7590 bytes

View file

@ -1,32 +0,0 @@
$NetBSD: patch-src_roman.py,v 1.2 2012/08/15 17:18:15 drochner Exp $
* replace deprecated operator `<>' with `!='
* use 3.x compatible exception syntax
--- src/roman.py.orig 2009-07-23 16:34:18.000000000 +0000
+++ src/roman.py
@@ -40,9 +40,9 @@ romanNumeralMap = (('M', 1000),
def toRoman(n):
"""convert integer to Roman numeral"""
if not (0 < n < 5000):
- raise OutOfRangeError, "number out of range (must be 1..4999)"
- if int(n) <> n:
- raise NotIntegerError, "decimals can not be converted"
+ raise OutOfRangeError("number out of range (must be 1..4999)")
+ if int(n) != n:
+ raise NotIntegerError("decimals can not be converted")
result = ""
for numeral, integer in romanNumeralMap:
@@ -67,9 +67,9 @@ romanNumeralPattern = re.compile("""
def fromRoman(s):
"""convert Roman numeral to integer"""
if not s:
- raise InvalidRomanNumeralError, 'Input can not be blank'
+ raise InvalidRomanNumeralError('Input can not be blank')
if not romanNumeralPattern.search(s):
- raise InvalidRomanNumeralError, 'Invalid Roman numeral: %s' % s
+ raise InvalidRomanNumeralError('Invalid Roman numeral: %s' % s)
result = 0
index = 0