diff options
| author | holger krekel <holger@merlinux.eu> | 2010-10-23 16:40:05 +0200 |
|---|---|---|
| committer | holger krekel <holger@merlinux.eu> | 2010-10-23 16:40:05 +0200 |
| commit | 0733294e174afc1dd72769a6fe8a020b8bc8282f (patch) | |
| tree | f88da17292b88c7f935af9a958b0ae9cd638b89a | |
| parent | cb0483406bc9e8da01002680b0e4e68409f17d7e (diff) | |
| download | tox-0733294e174afc1dd72769a6fe8a020b8bc8282f.tar.gz | |
streamline tmpdir creation
| -rw-r--r-- | setup.py | 3 | ||||
| -rw-r--r-- | tox/__init__.py | 4 | ||||
| -rw-r--r-- | toxbootstrap.py | 11 |
3 files changed, 10 insertions, 8 deletions
@@ -35,7 +35,7 @@ def main(): description='virtualenv-based automation of test activities', long_description=long_description, url='http://codespeak.net/tox', - version='0.9.dev1', + version='0.9.dev4', license='GPLv2 or later', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', @@ -60,4 +60,3 @@ def main(): if __name__ == '__main__': main() - diff --git a/tox/__init__.py b/tox/__init__.py index b29a0a1..3726b09 100644 --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = "0.9.dev1" +__version__ = "0.9.dev3" from py.apipkg import initpkg @@ -14,4 +14,4 @@ initpkg(__name__, dict( MissingFile = '._exception:MissingFile', MissingDirectory = '._exception:MissingDirectory', ) -)) +))
\ No newline at end of file diff --git a/toxbootstrap.py b/toxbootstrap.py index 29fff45..e20c92f 100644 --- a/toxbootstrap.py +++ b/toxbootstrap.py @@ -61,7 +61,7 @@ ToDo """ -__version__ = "0.3" +__version__ = "0.4" import sys import os @@ -164,11 +164,13 @@ def pypi_get_latest_version(pkgname): versions.sort(key=parse_simple_version, reverse=True) return versions[0] +def ensuredir(p): + if not path.isdir(p): + os.makedirs(p) def cmdline(argv=None): os.chdir(path.abspath(path.dirname(__file__))) - if not path.isdir('.tox'): - os.mkdir('.tox') + ensuredir('.tox') os.chdir('.tox') # create virtual environment @@ -196,12 +198,13 @@ def cmdline(argv=None): cache = "" else: cache = "--download-cache=_download" + ensuredir('_download') run('%s install -q -i http://pypi.testrun.org ' '--upgrade %s tox' % (pip, cache)) elif any([ not has_script(TENV, 'tox'), get_tox_version(TENV) != pypi_get_latest_version('tox')]): - run('%s install --upgrade --download-cache=pip-cache tox' % (pip,)) + run('%s install --upgrade --download-cache=_download tox' % (pip,)) assert has_script(TENV, 'tox') tox_script = path.abspath(get_script_path(TENV, 'tox')) |
