On a second thought, just drop Python 2.6 support
This commit is contained in:
parent
22a6460f89
commit
2e5847d6e2
@ -5,7 +5,6 @@ cache:
|
|||||||
directories: cache
|
directories: cache
|
||||||
|
|
||||||
python:
|
python:
|
||||||
- "2.6"
|
|
||||||
- "2.7"
|
- "2.7"
|
||||||
- "3.2"
|
- "3.2"
|
||||||
- "3.5"
|
- "3.5"
|
||||||
|
|||||||
16
hererocks.py
16
hererocks.py
@ -67,7 +67,7 @@ def exec_command(capture, *args):
|
|||||||
if not live_output:
|
if not live_output:
|
||||||
sys.stdout.write(exception.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))
|
exception.returncode, command))
|
||||||
|
|
||||||
if opts.verbose and capture:
|
if opts.verbose and capture:
|
||||||
@ -169,7 +169,7 @@ def url_to_name(s):
|
|||||||
return re.sub("[^\w-]", "_", s)
|
return re.sub("[^\w-]", "_", s)
|
||||||
|
|
||||||
def copy_dir(src, dst):
|
def copy_dir(src, dst):
|
||||||
shutil.copytree(src, dst, ignore=lambda _, __: set([".git"]))
|
shutil.copytree(src, dst, ignore=lambda _, __: {".git"})
|
||||||
|
|
||||||
def translate(versions, version):
|
def translate(versions, version):
|
||||||
return versions.translations.get(version, 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)
|
archive_name = cached_archive_name(name, version)
|
||||||
url = versions.downloads + "/" + name + "-" + version + (
|
url = versions.downloads + "/" + name + "-" + version + (
|
||||||
".tar.gz" if targz else "-win32.zip")
|
".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):
|
if not os.path.exists(archive_name):
|
||||||
print(message)
|
print(message)
|
||||||
@ -211,16 +211,16 @@ def fetch(versions, version, temp_dir, targz=True):
|
|||||||
repo, _, ref = version.partition("@")
|
repo, _, ref = version.partition("@")
|
||||||
else:
|
else:
|
||||||
if not os.path.exists(version):
|
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)
|
result_dir = os.path.join(temp_dir, name)
|
||||||
copy_dir(version, result_dir)
|
copy_dir(version, result_dir)
|
||||||
os.chdir(result_dir)
|
os.chdir(result_dir)
|
||||||
return result_dir, None
|
return result_dir, None
|
||||||
|
|
||||||
result_dir = os.path.join(temp_dir, name)
|
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)
|
clone_command, need_checkout = git_clone_command(repo, ref)
|
||||||
run_command(clone_command, quote(repo), quote(result_dir))
|
run_command(clone_command, quote(repo), quote(result_dir))
|
||||||
os.chdir(result_dir)
|
os.chdir(result_dir)
|
||||||
@ -252,8 +252,8 @@ def patch_default_paths(lua_path, package_path, package_cpath):
|
|||||||
defines = os.linesep.join([
|
defines = os.linesep.join([
|
||||||
"#undef LUA_PATH_DEFAULT",
|
"#undef LUA_PATH_DEFAULT",
|
||||||
"#undef LUA_CPATH_DEFAULT",
|
"#undef LUA_CPATH_DEFAULT",
|
||||||
"#define LUA_PATH_DEFAULT \"{0}\"".format(package_path),
|
"#define LUA_PATH_DEFAULT \"{}\"".format(package_path),
|
||||||
"#define LUA_CPATH_DEFAULT \"{0}\"".format(package_cpath),
|
"#define LUA_CPATH_DEFAULT \"{}\"".format(package_cpath),
|
||||||
"#endif"
|
"#endif"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
1
setup.py
1
setup.py
@ -21,7 +21,6 @@ setuptools.setup(
|
|||||||
"Development Status :: 3 - Alpha",
|
"Development Status :: 3 - Alpha",
|
||||||
"License :: OSI Approved :: MIT License",
|
"License :: OSI Approved :: MIT License",
|
||||||
"Programming Language :: Python :: 2",
|
"Programming Language :: Python :: 2",
|
||||||
"Programming Language :: Python :: 2.6",
|
|
||||||
"Programming Language :: Python :: 2.7",
|
"Programming Language :: Python :: 2.7",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3.0",
|
"Programming Language :: Python :: 3.0",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user