Skip to content

Commit d50cd28

Browse files
committed
cumulative copy of bootstrap parents
1 parent 29a0075 commit d50cd28

File tree

20 files changed

+28
-1812
lines changed

20 files changed

+28
-1812
lines changed

pythonforandroid/bootstrap.py

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,35 @@ def prepare_build_dir(self):
142142
dir will be used for building all different archs.'''
143143
self.build_dir = self.get_build_dir()
144144
self.common_dir = self.get_common_dir()
145-
copy_files(join(self.bootstrap_dir, 'build'), self.build_dir)
146-
copy_files(join(self.common_dir, 'build'), self.build_dir,
147-
override=False)
145+
146+
# get all bootstrap names along the inheritance path
147+
bootstrap_names = []
148+
klass = self.__class__
149+
150+
while klass.__bases__[0] is not object:
151+
# parents.append(klass)
152+
bootstrap_names.append(klass.name)
153+
klass = klass.__bases__[0]
154+
else:
155+
bootstrap_names.append('common')
156+
157+
bootstrap_dirs = [
158+
join(self.ctx.root_dir, 'bootstraps', bootstrap_name)
159+
for bootstrap_name
160+
in reversed(bootstrap_names)
161+
]
162+
163+
# now do a cumulative copy of all bootstrap dirs
164+
for bootstrap_dir in bootstrap_dirs:
165+
print(f"copying {bootstrap_dir}")
166+
copy_files(join(bootstrap_dir, 'build'), self.build_dir)
167+
168+
# copy_files(join(self.bootstrap_dir, 'build'), self.build_dir)
169+
# copy_files(join(self.common_dir, 'build'), self.build_dir,
170+
# override=False)
171+
148172
if self.ctx.symlink_java_src:
173+
# XXX: has also to be generalized as for the copy stuff above
149174
info('Symlinking java src instead of copying')
150175
shprint(sh.rm, '-r', join(self.build_dir, 'src'))
151176
shprint(sh.mkdir, join(self.build_dir, 'src'))

pythonforandroid/bootstraps/library/build/blacklist.txt

Lines changed: 0 additions & 89 deletions
This file was deleted.

pythonforandroid/bootstraps/library/build/jni/Android.mk

Lines changed: 0 additions & 1 deletion
This file was deleted.

pythonforandroid/bootstraps/library/build/jni/Application.mk

Lines changed: 0 additions & 7 deletions
This file was deleted.

pythonforandroid/bootstraps/library/build/jni/application/src/Android.mk

Lines changed: 0 additions & 18 deletions
This file was deleted.

pythonforandroid/bootstraps/library/build/jni/application/src/Android_static.mk

Lines changed: 0 additions & 10 deletions
This file was deleted.

pythonforandroid/bootstraps/library/build/jni/application/src/pyjniusjni.c

Lines changed: 0 additions & 103 deletions
This file was deleted.

pythonforandroid/bootstraps/library/build/src/main/assets/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)