# Command failed: pip-2.7 install --download-cache=/home/mbp/.buildozer/cache --target=/home/mbp/build/.buildozer/applibs csv
I/python (17874): File "/home/mbp/build/.buildozer/android/app/main.py", line 7, in <module>in logcat
I/python (17874): File "/home/mbp/build/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/csv.py", line 8, in <module>
I/python (17874): ImportError: No module named _csv
I/python (17874): Python for android ended.
I/ActivityManager( 411): Process org.testy.sozluk.sozluk:python (pid 17874) has died.
# Remove any previous buildozer files from the folder
buildozer android clean
git pull
# Create the .buildozer folder and download its subcomponents, including the blacklist.txt file we are about to modify
buildozer android update
# Remove the line containing csv so the csv module is installed, as per the warning on
# http://python-for-android.readthedocs.org/en/latest/usage/#step-2-package-your-application
# grep -v reverses the search, showing all lines except the one matching the pattern
cwd=$(pwd)
# INSTALL CSV module
# This requires removing _csv from the two blacklist files
# According to
# https://groups.google.com/forum/#!msg/kivy-users/mgisdssF39M/28vgOWfM0y0J
# There are 2 locations for blacklist.txt:
# - one is inside .buildozer/android/platform/python-for-android/src/ and
# - the other is in python-for-android/dist/distname
# the first changes the blacklist for every compilation;
# the second for a specific compilation.
cd .buildozer/android/platform/python-for-android/src/
cat blacklist.txt | grep -v "_csv" > blacklist.txt2
rm blacklist.txt
mv blacklist.txt2 blacklist.txt
cd $cwd
cd .buildozer/android/platform/python-for-android/dist/lanki/
cat blacklist.txt | grep -v "_csv" > blacklist.txt2
rm blacklist.txt
mv blacklist.txt2 blacklist.txt
cd $cwd
# Use time to report the time it took to execute the command
time buildozer --verbose android debug
# Make a beep sound over the terminal interface on my local machine to tell me it's done
echo $'\a'