Skip to content

Commit 419a22d

Browse files
committed
add the ability to customize the blacklist in postbuild_*. use it in sqlite3 to remove some part of the blacklist using sed + block strip
1 parent 84bc8ae commit 419a22d

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

distribute.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,9 @@ function run_prepare() {
343343
echo "target=android-$ANDROIDAPI" > $SRC_PATH/default.properties
344344
echo "sdk.dir=$ANDROIDSDK" > $SRC_PATH/local.properties
345345

346+
# copy the initial blacklist in build
347+
try cp -a $SRC_PATH/blacklist.txt $BUILD_PATH
348+
346349
# check arm env
347350
push_arm
348351
debug "PATH is $PATH"
@@ -650,7 +653,7 @@ function run_distribute() {
650653
try cp -a $SRC_PATH/src .
651654
try cp -a $SRC_PATH/templates .
652655
try cp -a $SRC_PATH/res .
653-
try cp -a $SRC_PATH/blacklist.txt .
656+
try cp -a $BUILD_PATH/blacklist.txt .
654657

655658
debug "Copy python distribution"
656659
$BUILD_PATH/python-install/bin/python.host -OO -m compileall $BUILD_PATH/python-install

recipes/sqlite3/recipe.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ function build_sqlite3() {
1818
}
1919

2020
function postbuild_sqlite3() {
21-
true
21+
# ensure the blacklist doesn't contain sqlite3
22+
$SED '/#>sqlite3/,/#<sqlite3/d' $BUILD_PATH/blacklist.txt
2223
}

src/blacklist.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ encodings/hz*
5757
# unused python modules
5858
bsddb/*
5959
wsgiref/*
60-
sqlite3/*
6160
hotshot/*
6261
pydoc_data/*
6362
tty.pyo
@@ -76,7 +75,6 @@ os2emxpath.pyo
7675
multiprocessing/dummy*
7776

7877
# unused binaries python modules
79-
lib-dynload/_sqlite3.so
8078
lib-dynload/termios.so
8179
lib-dynload/_lsprof.so
8280
lib-dynload/*audioop.so
@@ -92,3 +90,10 @@ lib-dynload/pyexpat.so
9290

9391
# odd files
9492
plat-linux3/regen
93+
94+
#>sqlite3
95+
# conditionnal include depending if some recipes are included or not.
96+
sqlite3/*
97+
lib-dynload/_sqlite3.so
98+
#<sqlite3
99+

0 commit comments

Comments
 (0)