diff options
author | Erik Rose <erik@mozilla.com> | 2011-11-20 21:14:09 -0800 |
---|---|---|
committer | Erik Rose <erik@mozilla.com> | 2011-11-20 21:21:03 -0800 |
commit | d8fcd032acf53ee39076b59ab5fff79a8f8ca187 (patch) | |
tree | d7f72ee988c0833d3faa479e493c03eefbaa0b7e | |
parent | d03d43c4c9722b91056283fba44a4945efc41943 (diff) | |
download | blessings-d8fcd032acf53ee39076b59ab5fff79a8f8ca187.tar.gz |
Make some hopeful metadata changes and dodge a scoping change in Python 3.
-rw-r--r-- | blessings/__init__.py | 14 | ||||
-rw-r--r-- | fabfile.py | 2 | ||||
-rw-r--r-- | setup.py | 8 | ||||
-rw-r--r-- | tox.ini | 4 |
4 files changed, 21 insertions, 7 deletions
diff --git a/blessings/__init__.py b/blessings/__init__.py index dae686f..be71d0b 100644 --- a/blessings/__init__.py +++ b/blessings/__init__.py @@ -80,7 +80,7 @@ class Terminal(object): # Cache capability codes, because IIRC tigetstr requires a # conversation with the terminal. [Now I can't find any evidence of - # that.] + # that.] At any rate, save redoing the work of _resolve_formatter(). self._codes = {} else: self._codes = NullDict(lambda: NullCallableString('')) @@ -218,11 +218,15 @@ class Terminal(object): self) +def derivative_colors(colors): + """Return the names of valid color variants, given the base colors.""" + return set([('on_' + c) for c in colors] + + [('bright_' + c) for c in colors] + + [('on_bright_' + c) for c in colors]) + + COLORS = set(['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white']) -COLORS.update(set([('on_' + c) for c in COLORS] + - [('bright_' + c) for c in COLORS] + - [('on_bright_' + c) for c in COLORS])) -del c +COLORS.update(derivative_colors(COLORS)) COMPOUNDABLES = (COLORS | set(['bold', 'underline', 'reverse', 'blink', 'dim', 'italic', 'shadow', 'standout', 'subscript', 'superscript'])) @@ -27,10 +27,12 @@ def doc(kind='html'): with cd('docs'): local('make clean %s' % kind) + def test(): # Just calling nosetests results in SUPPORTS_TRANSACTIONS KeyErrors. local('nosetests') + def updoc(): """Build Sphinx docs and upload them to packages.python.org. @@ -25,7 +25,15 @@ setup( 'Intended Audience :: Developers', 'Natural Language :: English', 'Environment :: Console', + 'Environment :: Console :: Curses', 'Operating System :: POSIX', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.5', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.1', + 'Programming Language :: Python :: 3.2', 'Topic :: Software Development :: Libraries', 'Topic :: Software Development :: User Interfaces', 'Topic :: Terminals' @@ -1,6 +1,6 @@ [tox] -envlist = py25, py26, py27 +envlist = py25, py26, py27, py32 [testenv] commands = nosetests -deps=nose
\ No newline at end of file +deps=nose |