From e7db8c7e377f3ec5844a43ca1faa383dd4f3e855 Mon Sep 17 00:00:00 2001 From: barberj Date: Wed, 1 Aug 2012 08:42:34 -0400 Subject: [PATCH 1/4] Updated to use arguments module. Removed py25 support and tox testing since try/except statements were >=2.5. Try setup import from setuptools so python setup.py develop is available. --- clint/__init__.py | 12 ++++++++---- setup.py | 6 ++++-- tox.ini | 3 ++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/clint/__init__.py b/clint/__init__.py index 609b948..1f9b02d 100644 --- a/clint/__init__.py +++ b/clint/__init__.py @@ -11,7 +11,14 @@ This module sets up the main interface for all of clint. from __future__ import absolute_import -from . import arguments +try: + from collections import OrderedDict +except ImportError: + from .packages.ordereddict import OrderedDict + import collections + collections.OrderedDict = OrderedDict + +from args import * from . import textui from . import utils from .pipes import piped_in @@ -25,6 +32,3 @@ __author__ = 'Kenneth Reitz' __license__ = 'ISC' __copyright__ = 'Copyright 2012 Kenneth Reitz' __docformat__ = 'restructuredtext' - - -args = arguments.Args() diff --git a/setup.py b/setup.py index 78d9904..ddc0753 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,10 @@ import os import sys -from distutils.core import setup +try: + from setuptools import setup +except ImportError: + from distutils.core import setup import clint @@ -48,7 +51,6 @@ setup( 'License :: OSI Approved :: ISC License (ISCL)', 'Programming Language :: Python', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', diff --git a/tox.ini b/tox.ini index 82becb5..24c96a5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,10 @@ [tox] -envlist = py25,py26,py27,py3 +envlist = py26,py27,py3 [testenv] commands=py.test --junitxml=junit-{envname}.xml deps = pytest + args [testenv:pypy] basepython=/usr/bin/pypy-c From 70c0680b8c2e8c335765814cd2e3abb85c70f9e6 Mon Sep 17 00:00:00 2001 From: barberj Date: Wed, 1 Aug 2012 08:47:29 -0400 Subject: [PATCH 2/4] credit --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 04c6286..df01ef3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,3 +22,4 @@ Patches and Suggestions - Jason Piper - Gianluca Brindisi - Don Spaulding +- Justin Barber From b591c3edc2185c5223f390c9a955e40890e0b6b7 Mon Sep 17 00:00:00 2001 From: barberj Date: Wed, 1 Aug 2012 08:49:48 -0400 Subject: [PATCH 3/4] forgot to include args dependency --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ddc0753..5cd00a4 100755 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ if sys.argv[-1] == "publish": publish() sys.exit() -required = [] +required = ['args'] setup( name='clint', From fc841b0a61656804f0eb80f48ae9e3441168c1b0 Mon Sep 17 00:00:00 2001 From: barberj Date: Wed, 1 Aug 2012 09:15:58 -0400 Subject: [PATCH 4/4] consistency is key --- AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index df01ef3..b25d7e1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,4 +22,4 @@ Patches and Suggestions - Jason Piper - Gianluca Brindisi - Don Spaulding -- Justin Barber +- Justin Barber