bpo-30386: Add a build infrastructure for Android. by xdegaye · Pull Request #1629 · python/cpython (original) (raw)

I tried to use the recipe but I failed. There many traps:

I tried:

cd Android
../configure-android  PYTHON_FOR_BUILD=/opt/py37/bin/python3.7
make

The compilation fails somewhere in setup.py about Tools/. I commented Tools in setup.py, then the compilation fails on building something about extensions:

vstinner@apu$ make
running build
running build_ext
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/setup.py", line 2310, in <module>
    main()
  File "/home/vstinner/prog/python/master/setup.py", line 2299, in main
    ext_modules=[Extension('_struct', ['_struct.c'])]
  File "/opt/py37/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/opt/py37/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/opt/py37/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/opt/py37/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/opt/py37/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/opt/py37/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/opt/py37/lib/python3.7/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/home/vstinner/prog/python/master/setup.py", line 251, in build_extensions
    for filename in self.distribution.scripts]
TypeError: 'NoneType' object is not iterable