Skip to content

Commit 46cde41

Browse files
authored
Merge pull request #1499 from JonasT/bootstrapminorfix
Minor fixes to basic common bootstrap handling code
2 parents c06cf52 + fdd29fd commit 46cde41

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

pythonforandroid/bootstrap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from os.path import (join, dirname, isdir, splitext, basename)
1+
from os.path import (join, dirname, isdir, normpath, splitext, basename)
22
from os import listdir, walk, sep
33
import sh
44
import glob
@@ -16,8 +16,8 @@
1616
def copy_files(src_root, dest_root, override=True):
1717
for root, dirnames, filenames in walk(src_root):
1818
for filename in filenames:
19-
subdir = root.replace(src_root, "")
20-
if subdir.startswith(sep):
19+
subdir = normpath(root.replace(src_root, ""))
20+
if subdir.startswith(sep): # ensure it is relative
2121
subdir = subdir[1:]
2222
dest_dir = join(dest_root, subdir)
2323
if not os.path.exists(dest_dir):

pythonforandroid/toolchain.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ def wrapper_func(self, args):
141141
user_ndk_ver=self.ndk_version,
142142
user_ndk_api=self.ndk_api)
143143
dist = self._dist
144-
bs = Bootstrap.get_bootstrap(args.bootstrap, ctx)
145-
# recipes rarely change, but during dev, bootstraps can change from
146-
# build to build, so run prepare_bootstrap even if needs_build is false
147144
if dist.needs_build:
148145
if dist.folder_exists(): # possible if the dist is being replaced
149146
dist.delete()

0 commit comments

Comments
 (0)