summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2011-04-29 20:58:03 +0200
committerholger krekel <holger@merlinux.eu>2011-04-29 20:58:03 +0200
commit807fdfe2e3fe0a56148458d80d0e72cd2b2df7f0 (patch)
tree683d96cb0d804b3d7299b9ea90efae5fadf990d6
parent88f402406786799c45349e1b180105dfd364c759 (diff)
downloadtox-807fdfe2e3fe0a56148458d80d0e72cd2b2df7f0.tar.gz
remove usage of inipkg for now
-rw-r--r--CHANGELOG.txt2
-rw-r--r--tox/__init__.py32
-rw-r--r--tox/_config.py3
3 files changed, 21 insertions, 16 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 5f93692..544e2c0 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -13,6 +13,8 @@
- change the positional argument specifier to use {posargs:} syntax
- Fix issues #15 and #10 with changes to the argument parsing method
(many thanks to Chris Rose)
+- remove use inipkg lazy importing logic -
+ the namespace/imports are anyway very small with tox.
0.9
-----------------
diff --git a/tox/__init__.py b/tox/__init__.py
index 2cb1461..ccdae2d 100644
--- a/tox/__init__.py
+++ b/tox/__init__.py
@@ -1,17 +1,23 @@
#
__version__ = '1.0.dev1'
-from py.apipkg import initpkg
+class exception:
+ class Error(Exception):
+ def __str__(self):
+ return "%s: %s" %(self.__class__.__name__, self.args[0])
+ class ConfigError(Error):
+ """ error in tox configuration. """
+ class UnsupportedInterpreter(Error):
+ "signals an unsupported Interpreter"
+ class InterpreterNotFound(Error):
+ "signals that an interpreter could not be found"
+ class InvocationError(Error):
+ """ an error while invoking a script. """
+ class MissingFile(Error):
+ """ an error while invoking a script. """
+ class MissingDirectory(Error):
+ """ a directory did not exist. """
+ class MissingDependency(Error):
+ """ a dependency could not be found or determined. """
-initpkg(__name__, dict(
- cmdline = '._cmdline:main',
- exception = dict(
- ConfigError = '._config:ConfigError',
- InvocationError = '._exception:InvocationError',
- MissingDependency= '._exception:MissingDependency',
- UnsupportedInterpreter = '._exception:UnsupportedInterpreter',
- InterpreterNotFound = '._exception:InterpreterNotFound',
- MissingFile = '._exception:MissingFile',
- MissingDirectory = '._exception:MissingDirectory',
- )
-))
+from tox._cmdline import main as cmdline
diff --git a/tox/_config.py b/tox/_config.py
index 5d79ee9..d76fed4 100644
--- a/tox/_config.py
+++ b/tox/_config.py
@@ -78,9 +78,6 @@ class Config:
self.envconfigs = {}
self.invocationcwd = py.path.local()
-class ConfigError(Exception):
- """ error in tox configuration. """
-
class VenvConfig:
def __init__(self, **kw):
self.__dict__.update(kw)