[Python-modules-commits] r21597 - in packages/python-roman/trunk/python-roman/trunk (14 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Sat May 5 21:09:38 UTC 2012


    Date: Saturday, May 5, 2012 @ 21:09:37
  Author: jwilk
Revision: 21597

[svn-inject] Applying Debian modifications (1.4.0-1) to trunk

Added:
  packages/python-roman/trunk/python-roman/trunk/debian/
  packages/python-roman/trunk/python-roman/trunk/debian/changelog
  packages/python-roman/trunk/python-roman/trunk/debian/compat
  packages/python-roman/trunk/python-roman/trunk/debian/control
  packages/python-roman/trunk/python-roman/trunk/debian/copyright
  packages/python-roman/trunk/python-roman/trunk/debian/patches/
  packages/python-roman/trunk/python-roman/trunk/debian/patches/2to3.diff
  packages/python-roman/trunk/python-roman/trunk/debian/patches/no-setuptools.diff
  packages/python-roman/trunk/python-roman/trunk/debian/patches/series
  packages/python-roman/trunk/python-roman/trunk/debian/patches/tests.diff
  packages/python-roman/trunk/python-roman/trunk/debian/rules
  packages/python-roman/trunk/python-roman/trunk/debian/source/
  packages/python-roman/trunk/python-roman/trunk/debian/source/format
  packages/python-roman/trunk/python-roman/trunk/debian/watch


Property changes on: packages/python-roman/trunk/python-roman/trunk/debian
___________________________________________________________________
Added: mergeWithUpstream
   + 1

Added: packages/python-roman/trunk/python-roman/trunk/debian/changelog
===================================================================
--- packages/python-roman/trunk/python-roman/trunk/debian/changelog	                        (rev 0)
+++ packages/python-roman/trunk/python-roman/trunk/debian/changelog	2012-05-05 21:09:37 UTC (rev 21597)
@@ -0,0 +1,5 @@
+python-roman (1.4.0-1) UNRELEASED; urgency=low
+
+  * Initial release (closes: #671634).
+
+ -- Jakub Wilk <jwilk at debian.org>  Sat, 05 May 2012 18:41:29 +0200

Added: packages/python-roman/trunk/python-roman/trunk/debian/compat
===================================================================
--- packages/python-roman/trunk/python-roman/trunk/debian/compat	                        (rev 0)
+++ packages/python-roman/trunk/python-roman/trunk/debian/compat	2012-05-05 21:09:37 UTC (rev 21597)
@@ -0,0 +1 @@
+7

Added: packages/python-roman/trunk/python-roman/trunk/debian/control
===================================================================
--- packages/python-roman/trunk/python-roman/trunk/debian/control	                        (rev 0)
+++ packages/python-roman/trunk/python-roman/trunk/debian/control	2012-05-05 21:09:37 UTC (rev 21597)
@@ -0,0 +1,36 @@
+Source: python-roman
+Section: python
+Priority: optional
+Maintainer: Jakub Wilk <jwilk at debian.org>
+Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
+Build-Depends: debhelper (>= 7)
+Build-Depends-Indep:
+ python-all (>= 2.3), python-support,
+ python3-all (>= 3.1.2-7~)
+Standards-Version: 3.9.3
+XS-Python-Version: >= 2.3
+X-Python3-Version: >= 3.0
+Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-roman/trunk/
+Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-roman/trunk/
+Homepage: http://pypi.python.org/pypi/roman/
+
+Package: python-roman
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends}
+Description: module for generating/analyzing Roman numerals for Python 2
+ This module converts from and to Roman numerals. It can convert numbers
+ from 1 to 4999 and understands the common shortcuts (IX == 9), but not
+ illegal ones (MIM == 1999).
+ .
+ This package includes Python 2 modules.
+
+Package: python3-roman
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}
+Description: module for generating/analyzing Roman numerals for Python 3
+ This module converts from and to Roman numerals. It can convert numbers
+ from 1 to 4999 and understands the common shortcuts (IX == 9), but not
+ illegal ones (MIM == 1999).
+ .
+ This package includes Python 3 modules.
+

Added: packages/python-roman/trunk/python-roman/trunk/debian/copyright
===================================================================
--- packages/python-roman/trunk/python-roman/trunk/debian/copyright	                        (rev 0)
+++ packages/python-roman/trunk/python-roman/trunk/debian/copyright	2012-05-05 21:09:37 UTC (rev 21597)
@@ -0,0 +1,254 @@
+The software was downloaded from:
+http://pypi.python.org/pypi/roman/
+
+Copyright © 2001 Mark Pilgrim
+
+This program is part of “Dive Into Python”, a free Python tutorial for
+experienced programmers.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the Python 2.1.1 license, available at:
+http://www.python.org/2.1.1/license.html
+
+Debian packaging is © 2012 Jakub Wilk and is licensed under the same license as
+upstream code.
+
+The license is reproduced below:
+
+  Python 2.1.1 license
+  ~~~~~~~~~~~~~~~~~~~~
+  
+  This is the official license for the Python 2.1.1 release:
+  
+  A. HISTORY OF THE SOFTWARE
+  ==========================
+  
+  Python was created in the early 1990s by Guido van Rossum at Stichting
+  Mathematisch Centrum (CWI) in the Netherlands as a successor of a
+  language called ABC.  Guido is Python's principal author, although it
+  includes many contributions from others.  The last version released
+  from CWI was Python 1.2.  In 1995, Guido continued his work on Python
+  at the Corporation for National Research Initiatives (CNRI) in Reston,
+  Virginia where he released several versions of the software.  Python
+  1.6 was the last of the versions released by CNRI.  In 2000, Guido and
+  the Python core development team moved to BeOpen.com to form the
+  BeOpen PythonLabs team.  Python 2.0 was the first and only release
+  from BeOpen.com.
+  
+  Following the release of Python 1.6, and after Guido van Rossum left
+  CNRI to work with commercial software developers, it became clear that
+  the ability to use Python with software available under the GNU Public
+  License (GPL) was very desirable.  CNRI and the Free Software
+  Foundation (FSF) interacted to develop enabling wording changes to the
+  Python license.  Python 1.6.1 is essentially the same as Python 1.6,
+  with a few minor bug fixes, and with a different license that enables
+  later versions to be GPL-compatible.  Python 2.1 is a derivative work
+  of Python 1.6.1, as well as of Python 2.0.
+  
+  After Python 2.0 was released by BeOpen.com, Guido van Rossum and the
+  other PythonLabs developers joined Digital Creations.  All
+  intellectual property added from this point on, starting with Python
+  2.1 and its alpha and beta releases, is owned by the Python Software
+  Foundation (PSF), a non-profit modeled after the Apache Software
+  Foundation.  See http://www.python.org/psf/ for more information about
+  the PSF.
+  
+  Thanks to the many outside volunteers who have worked under Guido's
+  direction to make these releases possible.
+  
+  
+  B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
+  ===============================================================
+  
+  PSF LICENSE AGREEMENT
+  ---------------------
+  
+  1. This LICENSE AGREEMENT is between the Python Software Foundation
+  ("PSF"), and the Individual or Organization ("Licensee") accessing and
+  otherwise using Python 2.1.1 software in source or binary form and its
+  associated documentation.
+  
+  2. Subject to the terms and conditions of this License Agreement, PSF
+  hereby grants Licensee a nonexclusive, royalty-free, world-wide
+  license to reproduce, analyze, test, perform and/or display publicly,
+  prepare derivative works, distribute, and otherwise use Python 2.1.1
+  alone or in any derivative version, provided, however, that PSF's
+  License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
+  2001 Python Software Foundation; All Rights Reserved" are retained in
+  Python 2.1.1 alone or in any derivative version prepared by Licensee.
+  
+  3. In the event Licensee prepares a derivative work that is based on
+  or incorporates Python 2.1.1 or any part thereof, and wants to make
+  the derivative work available to others as provided herein, then
+  Licensee hereby agrees to include in any such work a brief summary of
+  the changes made to Python 2.1.1.
+  
+  4. PSF is making Python 2.1.1 available to Licensee on an "AS IS"
+  basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+  IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
+  DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+  FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.1.1 WILL NOT
+  INFRINGE ANY THIRD PARTY RIGHTS.
+  
+  5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+  2.1.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+  A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.1.1,
+  OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+  
+  6. This License Agreement will automatically terminate upon a material
+  breach of its terms and conditions.
+  
+  7. Nothing in this License Agreement shall be deemed to create any
+  relationship of agency, partnership, or joint venture between PSF and
+  Licensee.  This License Agreement does not grant permission to use PSF
+  trademarks or trade name in a trademark sense to endorse or promote
+  products or services of Licensee, or any third party.
+  
+  8. By copying, installing or otherwise using Python 2.1.1, Licensee
+  agrees to be bound by the terms and conditions of this License
+  Agreement.
+  
+  
+  BEOPEN.COM TERMS AND CONDITIONS FOR PYTHON 2.0
+  ----------------------------------------------
+  
+  BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
+  
+  1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
+  office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
+  Individual or Organization ("Licensee") accessing and otherwise using
+  this software in source or binary form and its associated
+  documentation ("the Software").
+  
+  2. Subject to the terms and conditions of this BeOpen Python License
+  Agreement, BeOpen hereby grants Licensee a non-exclusive,
+  royalty-free, world-wide license to reproduce, analyze, test, perform
+  and/or display publicly, prepare derivative works, distribute, and
+  otherwise use the Software alone or in any derivative version,
+  provided, however, that the BeOpen Python License is retained in the
+  Software, alone or in any derivative version prepared by Licensee.
+  
+  3. BeOpen is making the Software available to Licensee on an "AS IS"
+  basis.  BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+  IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
+  DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+  FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
+  INFRINGE ANY THIRD PARTY RIGHTS.
+  
+  4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
+  SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
+  AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
+  DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+  
+  5. This License Agreement will automatically terminate upon a material
+  breach of its terms and conditions.
+  
+  6. This License Agreement shall be governed by and interpreted in all
+  respects by the law of the State of California, excluding conflict of
+  law provisions.  Nothing in this License Agreement shall be deemed to
+  create any relationship of agency, partnership, or joint venture
+  between BeOpen and Licensee.  This License Agreement does not grant
+  permission to use BeOpen trademarks or trade names in a trademark
+  sense to endorse or promote products or services of Licensee, or any
+  third party.  As an exception, the "BeOpen Python" logos available at
+  http://www.pythonlabs.com/logos.html may be used according to the
+  permissions granted on that web page.
+  
+  7. By copying, installing or otherwise using the software, Licensee
+  agrees to be bound by the terms and conditions of this License
+  Agreement.
+  
+  
+  CNRI OPEN SOURCE GPL-COMPATIBLE LICENSE AGREEMENT
+  -------------------------------------------------
+  
+  1. This LICENSE AGREEMENT is between the Corporation for National
+  Research Initiatives, having an office at 1895 Preston White Drive,
+  Reston, VA 20191 ("CNRI"), and the Individual or Organization
+  ("Licensee") accessing and otherwise using Python 1.6.1 software in
+  source or binary form and its associated documentation.
+  
+  2. Subject to the terms and conditions of this License Agreement, CNRI
+  hereby grants Licensee a nonexclusive, royalty-free, world-wide
+  license to reproduce, analyze, test, perform and/or display publicly,
+  prepare derivative works, distribute, and otherwise use Python 1.6.1
+  alone or in any derivative version, provided, however, that CNRI's
+  License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
+  1995-2001 Corporation for National Research Initiatives; All Rights
+  Reserved" are retained in Python 1.6.1 alone or in any derivative
+  version prepared by Licensee.  Alternately, in lieu of CNRI's License
+  Agreement, Licensee may substitute the following text (omitting the
+  quotes): "Python 1.6.1 is made available subject to the terms and
+  conditions in CNRI's License Agreement.  This Agreement together with
+  Python 1.6.1 may be located on the Internet using the following
+  unique, persistent identifier (known as a handle): 1895.22/1013.  This
+  Agreement may also be obtained from a proxy server on the Internet
+  using the following URL: http://hdl.handle.net/1895.22/1013".
+  
+  3. In the event Licensee prepares a derivative work that is based on
+  or incorporates Python 1.6.1 or any part thereof, and wants to make
+  the derivative work available to others as provided herein, then
+  Licensee hereby agrees to include in any such work a brief summary of
+  the changes made to Python 1.6.1.
+  
+  4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
+  basis.  CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+  IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
+  DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+  FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
+  INFRINGE ANY THIRD PARTY RIGHTS.
+  
+  5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+  1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+  A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
+  OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+  
+  6. This License Agreement will automatically terminate upon a material
+  breach of its terms and conditions.
+  
+  7. This License Agreement shall be governed by the federal
+  intellectual property law of the United States, including without
+  limitation the federal copyright law, and, to the extent such
+  U.S. federal law does not apply, by the law of the Commonwealth of
+  Virginia, excluding Virginia's conflict of law provisions.
+  Notwithstanding the foregoing, with regard to derivative works based
+  on Python 1.6.1 that incorporate non-separable material that was
+  previously distributed under the GNU General Public License (GPL), the
+  law of the Commonwealth of Virginia shall govern this License
+  Agreement only as to issues arising under or with respect to
+  Paragraphs 4, 5, and 7 of this License Agreement.  Nothing in this
+  License Agreement shall be deemed to create any relationship of
+  agency, partnership, or joint venture between CNRI and Licensee.  This
+  License Agreement does not grant permission to use CNRI trademarks or
+  trade name in a trademark sense to endorse or promote products or
+  services of Licensee, or any third party.
+  
+  8. By clicking on the "ACCEPT" button where indicated, or by copying,
+  installing or otherwise using Python 1.6.1, Licensee agrees to be
+  bound by the terms and conditions of this License Agreement.
+  
+          ACCEPT
+  
+  
+  CWI PERMISSIONS STATEMENT AND DISCLAIMER
+  ----------------------------------------
+  
+  Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
+  The Netherlands.  All rights reserved.
+  
+  Permission to use, copy, modify, and distribute this software and its
+  documentation for any purpose and without fee is hereby granted,
+  provided that the above copyright notice appear in all copies and that
+  both that copyright notice and this permission notice appear in
+  supporting documentation, and that the name of Stichting Mathematisch
+  Centrum or CWI not be used in advertising or publicity pertaining to
+  distribution of the software without specific, written prior
+  permission.
+  
+  STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
+  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+  FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
+  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+  OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Added: packages/python-roman/trunk/python-roman/trunk/debian/patches/2to3.diff
===================================================================
--- packages/python-roman/trunk/python-roman/trunk/debian/patches/2to3.diff	                        (rev 0)
+++ packages/python-roman/trunk/python-roman/trunk/debian/patches/2to3.diff	2012-05-05 21:09:37 UTC (rev 21597)
@@ -0,0 +1,24 @@
+Description: add support for Python 3
+Author: Jakub Wilk <jwilk at debian.org>
+Forwarded: no
+Last-Update: 2012-05-05
+
+--- a/setup.py
++++ b/setup.py
+@@ -1,5 +1,10 @@
+ from distutils.core import setup
+ 
++try:
++    from distutils.command.build_py import build_py_2to3 as build_py
++except ImportError:
++    from distutils.command.build_py import build_py
++
+ setup (
+     name='roman',
+     version='1.4.0',
+@@ -18,4 +23,5 @@
+     url = 'http://pypi.python.org/pypi/roman',
+     package_dir={"": "src"},
+     py_modules=["roman"],
++    cmdclass=dict(build_py=build_py)
+     )

Added: packages/python-roman/trunk/python-roman/trunk/debian/patches/no-setuptools.diff
===================================================================
--- packages/python-roman/trunk/python-roman/trunk/debian/patches/no-setuptools.diff	                        (rev 0)
+++ packages/python-roman/trunk/python-roman/trunk/debian/patches/no-setuptools.diff	2012-05-05 21:09:37 UTC (rev 21597)
@@ -0,0 +1,20 @@
+Description: don't use setuptools
+Author: Jakub Wilk <jwilk at debian.org>
+Forwarded: not-needed
+Last-Update: 2012-05-05
+
+--- a/setup.py
++++ b/setup.py
+@@ -1,4 +1,4 @@
+-from setuptools import setup
++from distutils.core import setup
+ 
+ setup (
+     name='roman',
+@@ -18,6 +18,4 @@
+     url = 'http://pypi.python.org/pypi/roman',
+     package_dir={"": "src"},
+     py_modules=["roman"],
+-    include_package_data = True,
+-    zip_safe = True,
+     )

Added: packages/python-roman/trunk/python-roman/trunk/debian/patches/series
===================================================================
--- packages/python-roman/trunk/python-roman/trunk/debian/patches/series	                        (rev 0)
+++ packages/python-roman/trunk/python-roman/trunk/debian/patches/series	2012-05-05 21:09:37 UTC (rev 21597)
@@ -0,0 +1,3 @@
+no-setuptools.diff
+2to3.diff
+tests.diff

Added: packages/python-roman/trunk/python-roman/trunk/debian/patches/tests.diff
===================================================================
--- packages/python-roman/trunk/python-roman/trunk/debian/patches/tests.diff	                        (rev 0)
+++ packages/python-roman/trunk/python-roman/trunk/debian/patches/tests.diff	2012-05-05 21:09:37 UTC (rev 21597)
@@ -0,0 +1,161 @@
+Description: add test suite
+Author: Mark Pilgrim <mark at diveintopython.org>
+Origin: upstream
+Last-Update: 2012-05-05
+
+--- /dev/null
++++ b/tests/romantest.py
+@@ -0,0 +1,153 @@
++"""Unit test for roman.py
++
++This program is part of "Dive Into Python", a free Python book for
++experienced programmers.  Visit http://diveintopython.org/ for the
++latest version.
++"""
++
++__author__ = "Mark Pilgrim (mark at diveintopython.org)"
++__version__ = "$Revision: 1.2 $"
++__date__ = "$Date: 2004/05/05 21:57:19 $"
++__copyright__ = "Copyright (c) 2001 Mark Pilgrim"
++__license__ = "Python"
++
++import roman
++import unittest
++
++class KnownValues(unittest.TestCase):
++	knownValues = ( (1, 'I'),
++					(2, 'II'),
++					(3, 'III'),
++					(4, 'IV'),
++					(5, 'V'),
++					(6, 'VI'),
++					(7, 'VII'),
++					(8, 'VIII'),
++					(9, 'IX'),
++					(10, 'X'),
++					(50, 'L'),
++					(100, 'C'),
++					(500, 'D'),
++					(1000, 'M'),
++					(31, 'XXXI'),
++					(148, 'CXLVIII'),
++					(294, 'CCXCIV'),
++					(312, 'CCCXII'),
++					(421, 'CDXXI'),
++					(528, 'DXXVIII'),
++					(621, 'DCXXI'),
++					(782, 'DCCLXXXII'),
++					(870, 'DCCCLXX'),
++					(941, 'CMXLI'),
++					(1043, 'MXLIII'),
++					(1110, 'MCX'),
++					(1226, 'MCCXXVI'),
++					(1301, 'MCCCI'),
++					(1485, 'MCDLXXXV'),
++					(1509, 'MDIX'),
++					(1607, 'MDCVII'),
++					(1754, 'MDCCLIV'),
++					(1832, 'MDCCCXXXII'),
++					(1993, 'MCMXCIII'),
++					(2074, 'MMLXXIV'),
++					(2152, 'MMCLII'),
++					(2212, 'MMCCXII'),
++					(2343, 'MMCCCXLIII'),
++					(2499, 'MMCDXCIX'),
++					(2574, 'MMDLXXIV'),
++					(2646, 'MMDCXLVI'),
++					(2723, 'MMDCCXXIII'),
++					(2892, 'MMDCCCXCII'),
++					(2975, 'MMCMLXXV'),
++					(3051, 'MMMLI'),
++					(3185, 'MMMCLXXXV'),
++					(3250, 'MMMCCL'),
++					(3313, 'MMMCCCXIII'),
++					(3408, 'MMMCDVIII'),
++					(3501, 'MMMDI'),
++					(3610, 'MMMDCX'),
++					(3743, 'MMMDCCXLIII'),
++					(3844, 'MMMDCCCXLIV'),
++					(3888, 'MMMDCCCLXXXVIII'),
++					(3940, 'MMMCMXL'),
++					(3999, 'MMMCMXCIX'),
++					(4000, 'MMMM'),
++					(4500, 'MMMMD'),
++					(4888, 'MMMMDCCCLXXXVIII'),
++					(4999, 'MMMMCMXCIX'))
++
++	def testToRomanKnownValues(self):
++		"""toRoman should give known result with known input"""
++		for integer, numeral in self.knownValues:
++			result = roman.toRoman(integer)
++			self.assertEqual(numeral, result)
++
++	def testFromRomanKnownValues(self):
++		"""fromRoman should give known result with known input"""
++		for integer, numeral in self.knownValues:
++			result = roman.fromRoman(numeral)
++			self.assertEqual(integer, result)
++
++class ToRomanBadInput(unittest.TestCase):
++	def testTooLarge(self):
++		"""toRoman should fail with large input"""
++		self.assertRaises(roman.OutOfRangeError, roman.toRoman, 5000)
++
++	def testZero(self):
++		"""toRoman should fail with 0 input"""
++		self.assertRaises(roman.OutOfRangeError, roman.toRoman, 0)
++
++	def testNegative(self):
++		"""toRoman should fail with negative input"""
++		self.assertRaises(roman.OutOfRangeError, roman.toRoman, -1)
++
++	def testDecimal(self):
++		"""toRoman should fail with non-integer input"""
++		self.assertRaises(roman.NotIntegerError, roman.toRoman, 0.5)
++
++class FromRomanBadInput(unittest.TestCase):
++	def testTooManyRepeatedNumerals(self):
++		"""fromRoman should fail with too many repeated numerals"""
++		for s in ('MMMMM', 'DD', 'CCCC', 'LL', 'XXXX', 'VV', 'IIII'):
++			self.assertRaises(roman.InvalidRomanNumeralError, roman.fromRoman, s)
++
++	def testRepeatedPairs(self):
++		"""fromRoman should fail with repeated pairs of numerals"""
++		for s in ('CMCM', 'CDCD', 'XCXC', 'XLXL', 'IXIX', 'IVIV'):
++			self.assertRaises(roman.InvalidRomanNumeralError, roman.fromRoman, s)
++
++	def testMalformedAntecedent(self):
++		"""fromRoman should fail with malformed antecedents"""
++		for s in ('IIMXCC', 'VX', 'DCM', 'CMM', 'IXIV',
++				  'MCMC', 'XCX', 'IVI', 'LM', 'LD', 'LC'):
++			self.assertRaises(roman.InvalidRomanNumeralError, roman.fromRoman, s)
++
++	def testBlank(self):
++		"""fromRoman should fail with blank string"""
++		self.assertRaises(roman.InvalidRomanNumeralError, roman.fromRoman, "")
++
++class SanityCheck(unittest.TestCase):
++	def testSanity(self):
++		"""fromRoman(toRoman(n))==n for all n"""
++		for integer in range(1, 5000):
++			numeral = roman.toRoman(integer)
++			result = roman.fromRoman(numeral)
++			self.assertEqual(integer, result)
++
++class CaseCheck(unittest.TestCase):
++	def testToRomanCase(self):
++		"""toRoman should always return uppercase"""
++		for integer in range(1, 5000):
++			numeral = roman.toRoman(integer)
++			self.assertEqual(numeral, numeral.upper())
++
++	def testFromRomanCase(self):
++		"""fromRoman should only accept uppercase input"""
++		for integer in range(1, 5000):
++			numeral = roman.toRoman(integer)
++			roman.fromRoman(numeral.upper())
++			self.assertRaises(roman.InvalidRomanNumeralError,
++							  roman.fromRoman, numeral.lower())
++
++if __name__ == "__main__":
++	unittest.main()

Added: packages/python-roman/trunk/python-roman/trunk/debian/rules
===================================================================
--- packages/python-roman/trunk/python-roman/trunk/debian/rules	                        (rev 0)
+++ packages/python-roman/trunk/python-roman/trunk/debian/rules	2012-05-05 21:09:37 UTC (rev 21597)
@@ -0,0 +1,49 @@
+#!/usr/bin/make -f
+
+include /usr/share/python3/python.mk
+
+python2_all = pyversions -r | tr ' ' '\n' | xargs -t -I {} env {}
+python3_all = $(patsubst py%,py3%,$(python2_all))
+build2 = python setup.py build --build-lib build/2/
+build3 = python3 setup.py build --build-lib build/3/
+install = install $(py_setup_install_args)
+
+.PHONY: clean
+clean:
+	dh_testdir
+	dh_clean
+	rm -rf build
+
+.PHONY: build build-arch build-indep
+build build-indep: build/stamp
+
+build/stamp:
+	dh_testdir
+	$(build2)
+	$(build3)
+ifeq "$(filter nocheck,$(DEB_BUILD_OPTIONS))" ""
+	export PYTHONPATH=build/2/ && $(python2_all) tests/romantest.py --verbose
+	export PYTHONPATH=build/3/ && $(python3_all) tests/romantest.py --verbose
+endif
+	touch $(@)
+
+.PHONY: binary binary-arch binary-indep
+binary binary-indep: build/stamp
+	dh_testdir
+	dh_testroot
+	dh_prep
+	$(build2) $(install) --root=debian/python-roman/
+	$(build3) $(install) --root=debian/python3-roman/
+	sed -i 's/^\(Metadata-Version\): 1\.0$$/\1: 1\.1/' debian/*/usr/lib/python*/*-packages/*.egg-info
+	dh_pysupport
+	dh_python3
+	dh_installdocs
+	dh_installchangelogs
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# vim:ts=4 sw=4 noet


Property changes on: packages/python-roman/trunk/python-roman/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
   + *

Added: packages/python-roman/trunk/python-roman/trunk/debian/source/format
===================================================================
--- packages/python-roman/trunk/python-roman/trunk/debian/source/format	                        (rev 0)
+++ packages/python-roman/trunk/python-roman/trunk/debian/source/format	2012-05-05 21:09:37 UTC (rev 21597)
@@ -0,0 +1 @@
+3.0 (quilt)

Added: packages/python-roman/trunk/python-roman/trunk/debian/watch
===================================================================
--- packages/python-roman/trunk/python-roman/trunk/debian/watch	                        (rev 0)
+++ packages/python-roman/trunk/python-roman/trunk/debian/watch	2012-05-05 21:09:37 UTC (rev 21597)
@@ -0,0 +1,2 @@
+version=3
+http://pypi.python.org/packages/source/r/roman/roman-([0-9.]+).tar.gz




More information about the Python-modules-commits mailing list