Source codes taken from:

https://www.python.org/downloads/release/python-374/
https://github.com/libffi/libffi/releases

No changes to the original source code were done. 

Homepage of the PYTHON project:

https://www.python.org/

Homepage of the LIBFFI project:

https://sourceware.org/libffi/

License (Python): please see the files LICENSE-PYTHON.txt and LICENSING_TERMS-PYTHON.txt
License (libffi): please see the file LICENSE-PYTHON-LIBFFI.txt

Compilation:

(0) prepare the standalone Android-NDK toolchain (android-ndk-r20) inside of
    Cygwin with preinstalled packages gcc, gfortran, make, clang, autoconf, python3.7;
    export the appropriate paths to PATH
    e.g. D:\Android\android-ndk-r20\toolchains\llvm\prebuilt\windows-x86_64\bin
(1) extract the libffi sources, run Cygwin, type:
./configure --build=i686-pc-cygwin --target=arm-linux --host=arm-linux CC=armv7a-linux-androideabi21-clang CXX=armv7a-linux-androideabi21-clang++ AR=arm-linux-androideabi-ar RANLIB=arm-linux-androideabi-ranlib
make
    the resulting library libffi.a is created inside of the .libs directory
(2) extract the Python sources, modify the file Modules/Setup.dist, check if all the necessary
    modules are (un)marked (#), add _ctypes to Modules/Setup.local (see the attached changed files)
(3) create folder libffi inside of the Python source directory, save there the previously compiled
    library libffi.a for the required architecture
    (or change the path in Modules/Setup.local)
(4) create file named config.site and add other settings there
(5) run Cygwin, open the working folder with Python sources, type:
export ARCH="arm"   
export CC="armv7a-linux-androideabi21-clang"  
export CXX="armv7a-linux-androideabi21-clang++"  
export AR="arm-linux-androideabi-ar.exe"  
export RANLIB="arm-linux-androideabi-ranlib.exe"  
export STRIP="arm-linux-androideabi-strip.exe --strip-unneeded"  
export READELF="arm-linux-androideabi-readelf.exe"  
export MAKE="make -j4 CROSS_COMPILE_TARGET=yes"  
export CONFIG_SITE="config.site"  
./configure --host=arm-linux-androideabi --build=i686-pc-cygwin --prefix="/home/HP/install/python374.arm" --disable-ipv6 --with-system-ffi
make
make install

Note: you can think up another installation directory, however, it is necessary to formulate
it in Cygwin-compatible form, i.e. --prefix="/home/..." but not --prefix="/cygdrive/c/cygwin/home/..."

The resulting binaries are designed to be run in terminal environment under Android 5 or newer. 