From 095d5c8cd79adeb936b68cb1836a522dbf2b1028 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Thu, 27 Sep 2018 16:28:26 +0800 Subject: [PATCH] lxbuildenv: enforce '.py' ending, use forward slashes for git For git repos, use forward slashes. They're more cross-platform. Also, ensure the destination program ends in '.py'. Signed-off-by: Sean Cross --- lxbuildenv.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lxbuildenv.py b/lxbuildenv.py index 6a1e2fc..478b599 100644 --- a/lxbuildenv.py +++ b/lxbuildenv.py @@ -280,8 +280,8 @@ def lx_main(args): main_name = new_main_name else: main_name = args.main - if not main_name.endswith('.py'): - main_name = main_name + '.py' + if not main_name.endswith('.py'): + main_name = main_name + '.py' if args.no_git: print("skipping git initialization") @@ -297,7 +297,7 @@ def lx_main(args): lx_git('add', str(__file__)) for dep_name, dep_url in DEFAULT_DEPS.items(): - dest_path = '{}{}{}'.format(DEPS_DIR, os.path.sep, dep_name) + dest_path = '{}{}{}'.format(DEPS_DIR, '/', dep_name) if not os.path.exists(dest_path): lx_git('submodule', 'add', dep_url, dest_path) lx_git('add', dest_path)