p4a-build-spaces
allows you to launch an interactive
shell with a reproducible build and test environment with
python-for-android.
Still in development / unstable.
-
Install docker, e.g.
docker.io
package on Ubuntu, ordocker
on Fedora Linux -
Install p4a build spaces:
pip install -U https://github.com/JonasT/p4a-build-spaces/archive/master.zip
If you have both
pip2
/pip3
, usepip3
! (Python 2 won't run p4aspaces properly)
Before you launch, make sure docker is running! (sudo service docker start
)
- List environments:
p4aspaces list-envs
- Launch shell with your choice:
p4aspaces shell p4a-py3-api28ndk21
The first launch may take a longer amount of time!
Important: All file changes are temporary and will be lost once
the environment terminates, unless you added a --workspace
.
(p4a build spaces always launches a new container,
and attempts to delete it after your shell terminates to give you
a clean environment next time)
You can run directly out of the p4a-build-spaces
extracted tarball /
development folder without installing system-wide. Just use:
chmod +x ./p4aspaces
,./p4aspaces ...
(instead ofp4sapaces
).
Please note the docker images will be left around, one per environment you used. Also, the containers will be terminated, but also left around. This will use up disk space.
To remove the used disk space, use: sudo docker system prune
(warning: if you use docker for something else, stopped containers and unused volumes of that may be removed as well!!)