From 2e5847d6e2409518410f39ff46a86f1162e47cd9 Mon Sep 17 00:00:00 2001 From: mpeterv Date: Thu, 26 Nov 2015 20:24:08 +0300 Subject: [PATCH] On a second thought, just drop Python 2.6 support --- .travis.yml | 1 - hererocks.py | 16 ++++++++-------- setup.py | 1 - 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6535490..d76e77e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ cache: directories: cache python: - - "2.6" - "2.7" - "3.2" - "3.5" diff --git a/hererocks.py b/hererocks.py index 01780a3..155e1eb 100755 --- a/hererocks.py +++ b/hererocks.py @@ -67,7 +67,7 @@ def exec_command(capture, *args): if not live_output: sys.stdout.write(exception.output) - sys.exit("Error: got exitcode {0} from command {1}".format( + sys.exit("Error: got exitcode {} from command {}".format( exception.returncode, command)) if opts.verbose and capture: @@ -169,7 +169,7 @@ def url_to_name(s): return re.sub("[^\w-]", "_", s) def copy_dir(src, dst): - shutil.copytree(src, dst, ignore=lambda _, __: set([".git"])) + shutil.copytree(src, dst, ignore=lambda _, __: {".git"}) def translate(versions, version): return versions.translations.get(version, version) @@ -185,7 +185,7 @@ def fetch(versions, version, temp_dir, targz=True): archive_name = cached_archive_name(name, version) url = versions.downloads + "/" + name + "-" + version + ( ".tar.gz" if targz else "-win32.zip") - message = "Fetching {0} from {1}".format(capitalize(name), url) + message = "Fetching {} from {}".format(capitalize(name), url) if not os.path.exists(archive_name): print(message) @@ -211,16 +211,16 @@ def fetch(versions, version, temp_dir, targz=True): repo, _, ref = version.partition("@") else: if not os.path.exists(version): - sys.exit("Error: bad {0} version {1}".format(capitalize(name), version)) + sys.exit("Error: bad {} version {}".format(capitalize(name), version)) - print("Using {0} from {1}".format(capitalize(name), version)) + print("Using {} from {}".format(capitalize(name), version)) result_dir = os.path.join(temp_dir, name) copy_dir(version, result_dir) os.chdir(result_dir) return result_dir, None result_dir = os.path.join(temp_dir, name) - print("Cloning {0} from {1} @{2}".format(capitalize(name), repo, ref)) + print("Cloning {} from {} @{}".format(capitalize(name), repo, ref)) clone_command, need_checkout = git_clone_command(repo, ref) run_command(clone_command, quote(repo), quote(result_dir)) os.chdir(result_dir) @@ -252,8 +252,8 @@ def patch_default_paths(lua_path, package_path, package_cpath): defines = os.linesep.join([ "#undef LUA_PATH_DEFAULT", "#undef LUA_CPATH_DEFAULT", - "#define LUA_PATH_DEFAULT \"{0}\"".format(package_path), - "#define LUA_CPATH_DEFAULT \"{0}\"".format(package_cpath), + "#define LUA_PATH_DEFAULT \"{}\"".format(package_path), + "#define LUA_CPATH_DEFAULT \"{}\"".format(package_cpath), "#endif" ]) diff --git a/setup.py b/setup.py index 533827a..9c26a9e 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,6 @@ setuptools.setup( "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0",