language: python
python:
- "2.7"
- - "2.6"
- "pypy"
before_install:
- sh -c set
--------------
Check if you already have an adequate version of Python installed by running
-``python -V``. Python v2.6 (v2.6.6 or greater recommended) or Python v2.7
-will work. Python v3 does not work. On Windows, we recommend the use of
-native Python v2.7, not Cygwin Python. If you don't have one of these
-versions of Python installed, `download`_ and install the latest version of
-Python v2.7. Make sure that the path to the installation directory has no
-spaces in it (e.g. on Windows, do not install Python in the "Program Files"
-directory).
+``python -V``. The latest version of Python v2.7 is recommended. Python v2.6.x
+is no longer officially supported, but might still work. Python v3 does not
+work. On Windows, we recommend the use of native Python v2.7, not Cygwin
+Python. If you don't have one of these versions of Python installed,
+`download`_ and install the latest version of Python v2.7. Make sure that the
+path to the installation directory has no spaces in it (e.g. on Windows, do not
+install Python in the "Program Files" directory).
.. _download: https://www.python.org/downloads/
#! /usr/bin/env python
# -*- coding: utf-8 -*-
-import sys; assert sys.version_info < (3,), ur"Tahoe-LAFS does not run under Python 3. Please use a version of Python between 2.6 and 2.7.x inclusive."
+import sys; assert sys.version_info < (3,), ur"Tahoe-LAFS does not run under Python 3. Please use Python 2.7.x."
# Tahoe-LAFS -- secure, distributed storage grid
#
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
- "Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: Utilities",
"Topic :: System :: Systems Administration",
use_shell = sys.platform == "win32"
try:
p = subprocess.Popen(args, stdout=subprocess.PIPE, cwd=cwd, shell=use_shell)
- except EnvironmentError as e: # if this gives a SyntaxError, note that Tahoe-LAFS requires Python 2.6+
+ except EnvironmentError as e: # if this gives a SyntaxError, note that Tahoe-LAFS requires Python 2.7+
print("Warning: unable to run %r." % (" ".join(args),))
print(e)
return None
from allmydata.scripts.common import BasedirOptions, NoDefaultBasedirOptions
from allmydata.scripts.default_nodedir import _default_nodedir
from allmydata.util.assertutil import precondition
-from allmydata.util.encodingutil import listdir_unicode, argv_to_unicode, quote_output, quote_local_unicode_path
+from allmydata.util.encodingutil import listdir_unicode, argv_to_unicode, quote_local_unicode_path
import allmydata
class _CreateBaseOptions(BasedirOptions):
if os.path.exists(basedir):
if listdir_unicode(basedir):
- print >>err, "The base directory %s is not empty." % quote_output(basedir)
+ print >>err, "The base directory %s is not empty." % quote_local_unicode_path(basedir)
print >>err, "To avoid clobbering anything, I am going to quit now."
print >>err, "Please use a different directory, or empty this one."
return -1
from allmydata.util import fileutil
fileutil.make_dirs(os.path.join(basedir, "private"), 0700)
- print >>out, "Node created in %s" % quote_output(basedir)
+ print >>out, "Node created in %s" % quote_local_unicode_path(basedir)
if not config.get("introducer", ""):
print >>out, " Please set [client]introducer.furl= in tahoe.cfg!"
print >>out, " The node cannot connect to a grid without it."
if os.path.exists(basedir):
if listdir_unicode(basedir):
- print >>err, "The base directory %s is not empty." % quote_output(basedir)
+ print >>err, "The base directory %s is not empty." % quote_local_unicode_path(basedir)
print >>err, "To avoid clobbering anything, I am going to quit now."
print >>err, "Please use a different directory, or empty this one."
return -1
write_node_config(c, config)
c.close()
- print >>out, "Introducer created in %s" % quote_output(basedir)
+ print >>out, "Introducer created in %s" % quote_local_unicode_path(basedir)
return 0
self.failUnless(os.path.exists(n3))
self.failUnless(os.path.exists(os.path.join(n3, tac)))
+ if kind in ("client", "node", "introducer"):
+ # test that the output (without --quiet) includes the base directory
+ n4 = os.path.join(basedir, command + "-n4")
+ argv = [command, n4]
+ rc, out, err = self.run_tahoe(argv)
+ self.failUnlessEqual(err, "")
+ self.failUnlessIn(" created in ", out)
+ self.failUnlessIn(n4, out)
+ self.failIfIn("\\\\?\\", out)
+ self.failUnlessEqual(rc, 0)
+ self.failUnless(os.path.exists(n4))
+ self.failUnless(os.path.exists(os.path.join(n4, tac)))
+
# make sure it rejects too many arguments
argv = [command, "basedir", "extraarg"]
self.failUnlessRaises(usage.UsageError,