summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Rose <erik@mozilla.com>2011-11-20 21:14:09 -0800
committerErik Rose <erik@mozilla.com>2011-11-20 21:21:03 -0800
commitd8fcd032acf53ee39076b59ab5fff79a8f8ca187 (patch)
treed7f72ee988c0833d3faa479e493c03eefbaa0b7e
parentd03d43c4c9722b91056283fba44a4945efc41943 (diff)
downloadblessings-d8fcd032acf53ee39076b59ab5fff79a8f8ca187.tar.gz
Make some hopeful metadata changes and dodge a scoping change in Python 3.
-rw-r--r--blessings/__init__.py14
-rw-r--r--fabfile.py2
-rw-r--r--setup.py8
-rw-r--r--tox.ini4
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']))
diff --git a/fabfile.py b/fabfile.py
index cc556bc..ebeeb6f 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -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.
diff --git a/setup.py b/setup.py
index bc0d3f4..b4f4c88 100644
--- a/setup.py
+++ b/setup.py
@@ -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'
diff --git a/tox.ini b/tox.ini
index 3204750..66b1c22 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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