Skip to content

Commit

Permalink
Merge pull request #1499 from JonasT/bootstrapminorfix
Browse files Browse the repository at this point in the history
Minor fixes to basic common bootstrap handling code
  • Loading branch information
AndreMiras authored Dec 2, 2018
2 parents c06cf52 + fdd29fd commit 46cde41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pythonforandroid/bootstrap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from os.path import (join, dirname, isdir, splitext, basename)
from os.path import (join, dirname, isdir, normpath, splitext, basename)
from os import listdir, walk, sep
import sh
import glob
Expand All @@ -16,8 +16,8 @@
def copy_files(src_root, dest_root, override=True):
for root, dirnames, filenames in walk(src_root):
for filename in filenames:
subdir = root.replace(src_root, "")
if subdir.startswith(sep):
subdir = normpath(root.replace(src_root, ""))
if subdir.startswith(sep): # ensure it is relative
subdir = subdir[1:]
dest_dir = join(dest_root, subdir)
if not os.path.exists(dest_dir):
Expand Down
3 changes: 0 additions & 3 deletions pythonforandroid/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ def wrapper_func(self, args):
user_ndk_ver=self.ndk_version,
user_ndk_api=self.ndk_api)
dist = self._dist
bs = Bootstrap.get_bootstrap(args.bootstrap, ctx)
# recipes rarely change, but during dev, bootstraps can change from
# build to build, so run prepare_bootstrap even if needs_build is false
if dist.needs_build:
if dist.folder_exists(): # possible if the dist is being replaced
dist.delete()
Expand Down

0 comments on commit 46cde41

Please sign in to comment.