Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
touilleMan committed May 1, 2018
1 parent dde69eb commit 1b24549
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ if env["gdnative_include_dir"]:
if env["gdnative_wrapper_lib"]:
env["gdnative_wrapper_lib"] = File(env["gdnative_wrapper_lib"])

env["build_name"] = '%s-%s' % (env['platform'], env["backend"])
env["build_name"] = "%s-%s" % (env["platform"], env["backend"])
env["build_dir"] = Dir("#build/%s" % env["build_name"])


Expand Down Expand Up @@ -240,9 +240,13 @@ def extract_version():

def generate_build_dir_hook(path):
with open("misc/single_build_pythonscript.gdnlib") as fd:
gdnlib = fd.read().replace(env['build_name'], '')
gdnlib = fd.read().replace(env["build_name"], "")
# Single platform vs multi-platform one have not the same layout
gdnlib = re.sub(r'(res://pythonscript/)(x11|windows|osx)-(64|32)-(cpython|pypy)/', r'\1', gdnlib)
gdnlib = re.sub(
r"(res://pythonscript/)(x11|windows|osx)-(64|32)-(cpython|pypy)/",
r"\1",
gdnlib,
)
with open(os.path.join(path, "pythonscript.gdnlib"), "w") as fd:
fd.write(gdnlib)

Expand Down Expand Up @@ -346,9 +350,7 @@ env.AlwaysBuild("example")

def generate_release(target, source, env):
base_name, format = target[0].abspath.rsplit(".", 1)
shutil.make_archive(
base_name, format, root_dir=source[0].abspath
)
shutil.make_archive(base_name, format, root_dir=source[0].abspath)


release = env.Command(
Expand Down
2 changes: 1 addition & 1 deletion tools/multi_platform_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def orchestrator(targets, version, src, dst, buildzip):
readme = fd.read().format(
version=version, date=datetime.utcnow().strftime("%Y-%m-%d")
)
with open("%s/README.txt" % dst, 'w') as fd:
with open("%s/README.txt" % dst, "w") as fd:
fd.write(readme)

if buildzip:
Expand Down

0 comments on commit 1b24549

Please sign in to comment.