Skip to content

Release 2020.04.29 #2174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 57 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
34a9837
Fix debug build missing symbols and other related issues
Jun 16, 2019
2b33eae
:fire: Drop Python 2 support (#2105)
opacam Mar 30, 2020
e02541f
:fire: Move to python3 `super` calls (#2106)
opacam Mar 30, 2020
d59b910
[recipes] Update freetype & add zlib support (#2068)
opacam Mar 30, 2020
9279048
[recipes] Update harfbuzz to v2.6.4 (#2069)
opacam Mar 30, 2020
acbf02a
Merge branch 'develop' into make_debug_release_debuggable
inclement Mar 30, 2020
7c11148
fix for the problem with decorator run_on_ui_thread and the local ref…
oukiar Mar 30, 2020
0af0ffa
:package: Refactor python module into hostpython3/python3 recipes (#2…
opacam Mar 30, 2020
2e16e67
Fixes linting errors in runnable.py
AndreMiras Mar 30, 2020
a548330
Merge pull request #2114 from AndreMiras/feature/fixes_linting
AndreMiras Mar 30, 2020
22b7dfe
Minor fixes and cleanup
AndreMiras Mar 30, 2020
f2b621e
Merge pull request #2115 from AndreMiras/feature/minor_fixes
AndreMiras Mar 31, 2020
16155c0
Unify most of the test apps into `on device unit test app` (#2046)
opacam Mar 31, 2020
f5dbf21
Update recommended NDK version to 19c (#2116)
inclement Mar 31, 2020
6fae684
Merge master into develop (#2123)
inclement Apr 1, 2020
266cfc3
Auto deploys to PyPI using Travis on tags
AndreMiras Apr 1, 2020
7706cbf
Merge branch 'master' into develop
inclement Apr 1, 2020
24fefcf
Merge pull request #2125 from kivy/develop-merge-master-2
inclement Apr 1, 2020
a69a2c4
Fixes code block directives
AndreMiras Apr 2, 2020
50358c9
Merge pull request #1867 from etc0de/make_debug_release_debuggable
AndreMiras Apr 2, 2020
cf4a2f0
fixes #2056, fixes #2045, actually fixes #2051 and #1142
Apr 3, 2020
7a983f4
Merge pull request #2127 from pygame/bug-fix-install-built-libs
AndreMiras Apr 3, 2020
a2420ec
bump zeroconf version to 0.24.5, fix depends
mikevlz Apr 3, 2020
b874e98
Merge pull request #2128 from mikevlz/develop
AndreMiras Apr 3, 2020
b0e6310
Fix coveralls error on GitHub Actions
AndreMiras Apr 3, 2020
94d1a7d
Merge pull request #2129 from AndreMiras/feature/fixes_coveralls_not_…
AndreMiras Apr 4, 2020
10cf158
Bumps cffi==1.13.2 fixes under Python 3.8
AndreMiras Apr 4, 2020
d56181c
Merge pull request #2131 from AndreMiras/feature/cffi_version_bump
inclement Apr 4, 2020
187f859
recipe: update 'cryptography' and rm unnecessary dependencies
SomberNight Apr 3, 2020
caf9f4b
Merge pull request #2130 from SomberNight/202004_recipe_cryptography
AndreMiras Apr 4, 2020
6ea0750
Merge branch 'release-2020.03.30' into develop
AndreMiras Apr 5, 2020
cfabe37
Merge pull request #2126 from AndreMiras/feature/rst_documentation_fixes
AndreMiras Apr 6, 2020
7a4ecf2
Merge pull request #2134 from AndreMiras/develop
inclement Apr 6, 2020
8670de6
Merge pull request #2122 from kivy/feature/auto_release_pypi
AndreMiras Apr 7, 2020
47c9c33
:lock: Bump twisted version to `20.3.0` (#2135)
opacam Apr 8, 2020
0b81c78
p4a support for creating aar libraries
zworkb Apr 1, 2020
cea61f5
repairted test on number of bootstraps
zworkb Apr 5, 2020
15590da
fixed rebase armageddon
zworkb Apr 15, 2020
00719ae
Fix some code quality and bug-risk issues
pnijhara Apr 16, 2020
ca9c467
Merge pull request #2141 from pnijhara/pnijhara-patch-1
AndreMiras Apr 17, 2020
36bc8a4
Merge pull request #2092 from zworkb/android-library
inclement Apr 17, 2020
265fe7f
Update bootstrap.py (#2137)
yingshaoxo Apr 18, 2020
b5dfdaf
Simplifies Dockerfile and fix GitHub runner space
AndreMiras Apr 18, 2020
71f8fb5
Merge pull request #2142 from AndreMiras/feature/python2_drop_follow_up
AndreMiras Apr 18, 2020
5d329bf
Update AndroidManifest.tmpl.xml to support HTTP
yingshaoxo Apr 19, 2020
710c3d5
Merge pull request #2143 from yingshaoxo/patch-1
AndreMiras Apr 19, 2020
af8e1b7
Better recipe for Twisted: removed the unit tests.
pavelsof Apr 20, 2020
3aa2aec
Merge pull request #2147 from pavelsof/twisted
AndreMiras Apr 21, 2020
83f35ab
Update setup.py: add classifiers & python_requires (#2151)
opacam Apr 25, 2020
253dc28
When bootstraps were unified, sources moved from src to src/main/java…
kollivier Apr 17, 2020
088077f
Merge pull request #2154 from kollivier/jnius_fix
AndreMiras Apr 25, 2020
6781179
Use python3's venv instead of virtualenv (#2152)
opacam Apr 25, 2020
41b363c
Show loading screen while unpacking for webview bootstrap (#2153)
kollivier Apr 25, 2020
60c624f
:rotating light: Fix linting for setup.py (#2158)
opacam Apr 26, 2020
e2b9cfe
Fixes sh `_env` should be a dictionary
AndreMiras Apr 28, 2020
50affc8
Merge pull request #2160 from AndreMiras/feature/fixes_sh_module_expe…
AndreMiras Apr 29, 2020
1ffdb76
Updates version number to 2020.04.29
AndreMiras May 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version = 1

test_patterns = ["tests/**"]

exclude_patterns = ["testapps/**"]

[[analyzers]]
name = "python"
enabled = true

[analyzers.meta]
runtime_version = "3.x.x"
31 changes: 25 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit tests & Build Testapp
name: Unit tests & build apps

on: ['push', 'pull_request']

Expand Down Expand Up @@ -42,25 +42,35 @@ jobs:
make test

build:
name: Build testapp
name: Unit test apk
needs: [flake8]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build-arch: ['arm64-v8a', 'armeabi-v7a']
build-arch: ['arm64-v8a', 'armeabi-v7a', 'x86_64', 'x86']
steps:
- name: Checkout python-for-android
uses: actions/checkout@v2
# helps with GitHub runner getting out of space
- name: Free disk space
run: |
df -h
sudo swapoff -a
sudo rm -f /swapfile
sudo apt -y clean
docker rmi $(docker image ls -aq)
df -h
- name: Pull docker image
run: |
make docker/pull
- name: Build apk for Python 3 ${{ matrix.build-arch }}
- name: Build apk Python 3 ${{ matrix.build-arch }}
run: |
mkdir -p apks
make docker/run/make/with-artifact/testapps/python3/${{ matrix.build-arch }}
make docker/run/make/with-artifact/testapps-with-numpy/${{ matrix.build-arch }}
- uses: actions/upload-artifact@v1
with:
name: bdisttest_python3_sqlite_openssl_googlendk__${{ matrix.build-arch }}-debug-1.1.apk
name: bdist_test_app_unittests__${{ matrix.build-arch }}-debug-1.1.apk
path: apks

rebuild_updated_recipes:
Expand All @@ -74,6 +84,15 @@ jobs:
uses: actions/checkout@v2
with:
ref: 'develop'
# helps with GitHub runner getting out of space
- name: Free disk space
run: |
df -h
sudo swapoff -a
sudo rm -f /swapfile
sudo apt -y clean
docker rmi $(docker image ls -aq)
df -h
- name: Pull docker image
run: |
make docker/pull
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ python_for_android.egg-info
/build/
doc/build
__pycache__/
venv/

#idea/pycharm
.idea/
Expand Down
26 changes: 15 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ jobs:
# See also: https://github.com/travis-ci/travis-ci/issues/8589
- type -t deactivate && deactivate || true
- export PATH=/opt/python/3.7/bin:$PATH
# Install tox & virtualenv
# Note: venv/virtualenv are both used by tests/test_pythonpackage.py
- pip3.7 install -U virtualenv
# Install tox
- pip3.7 install tox>=2.0
# Install coveralls & dependencies
# Note: pyOpenSSL needed to send the coveralls reports
Expand All @@ -36,9 +34,6 @@ jobs:
- tox -- tests/ --ignore tests/test_pythonpackage.py
name: "Tox Pep8"
env: TOXENV=pep8
- <<: *unittests
name: "Tox Python 2"
env: TOXENV=py27
- <<: *unittests
name: "Tox Python 3 & Coverage"
env: TOXENV=py3
Expand All @@ -48,7 +43,7 @@ jobs:
name: Python 3 arm64-v8a (with numpy)
stage: build testapps
before_script: make docker/pull
script: make docker/run/make/testapps/python3/arm64-v8a
script: make docker/run/make/testapps-with-numpy/arm64-v8a
- <<: *testapps
name: Python 3 armeabi-v7a
os: osx
Expand All @@ -57,10 +52,19 @@ jobs:
# installs java 1.8, android's SDK/NDK and p4a
- make -f ci/makefiles/osx.mk
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
script: make testapps/python3/armeabi-v7a PYTHON_WITH_VERSION=python3
- <<: *testapps
name: Python 2 armeabi-v7a
script: make docker/run/make/testapps/python2/armeabi-v7a
script: make testapps-no-venv/armeabi-v7a
- <<: *testapps
name: Rebuild updated recipes
script: travis_wait 30 make docker/run/make/rebuild_updated_recipes

# Deploy to PyPI using token set in `PYPI_PASSWORD` environment variable
# https://pypi.org/manage/account/token/
# https://travis-ci.org/github/kivy/python-for-android/settings
deploy:
provider: pypi
distributions: sdist bdist_wheel
user: "__token__"
on:
tags: true
repo: kivy/python-for-android
python: 3.7
10 changes: 2 additions & 8 deletions Dockerfile.py3 → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# - python-for-android dependencies
#
# Build with:
# docker build --tag=p4a --file Dockerfile.py3 .
# docker build --tag=p4a --file Dockerfile .
#
# Run with:
# docker run -it --rm p4a /bin/sh -c '. venv/bin/activate && p4a apk --help'
Expand Down Expand Up @@ -66,20 +66,18 @@ RUN dpkg --add-architecture i386 \
libncurses5:i386 \
libpangox-1.0-0:i386 \
libpangoxft-1.0-0:i386 \
libssl-dev \
libstdc++6:i386 \
libtool \
openjdk-8-jdk \
patch \
pkg-config \
python \
python-pip \
python3 \
python3-dev \
python3-pip \
python3-venv \
sudo \
unzip \
virtualenv \
wget \
zip \
zlib1g-dev \
Expand All @@ -95,10 +93,6 @@ RUN useradd --create-home --shell /bin/bash ${USER}
RUN usermod -append --groups sudo ${USER}
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

# install cython for python 2 (for python 3 it's inside the venv)
RUN pip2 install --upgrade Cython==0.28.6 \
&& rm -rf ~/.cache/

WORKDIR ${WORK_DIR}
RUN mkdir ${ANDROID_HOME} && chown --recursive ${USER} ${HOME_DIR} ${ANDROID_HOME}
USER ${USER}
Expand Down
94 changes: 0 additions & 94 deletions Dockerfile.py2

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

include LICENSE README.md
include *.toml

recursive-include doc *
prune doc/build
Expand Down
43 changes: 21 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ANDROID_NDK_HOME ?= $(HOME)/.android/android-ndk
all: virtualenv

$(VIRTUAL_ENV):
virtualenv --python=$(PYTHON_WITH_VERSION) $(VIRTUAL_ENV)
python3 -m venv $(VIRTUAL_ENV)
$(PIP) install Cython==0.28.6
$(PIP) install -e .

Expand All @@ -28,28 +28,32 @@ virtualenv: $(VIRTUAL_ENV)
# ignores test_pythonpackage.py since it runs for too long
test:
$(TOX) -- tests/ --ignore tests/test_pythonpackage.py
@if test -n "$$CI"; then .tox/py$(PYTHON_MAJOR_MINOR)/bin/coveralls; fi; \

rebuild_updated_recipes: virtualenv
. $(ACTIVATE) && \
ANDROID_SDK_HOME=$(ANDROID_SDK_HOME) ANDROID_NDK_HOME=$(ANDROID_NDK_HOME) \
$(PYTHON) ci/rebuild_updated_recipes.py

testapps/python2/armeabi-v7a: virtualenv
. $(ACTIVATE) && cd testapps/ && \
python setup_testapp_python2_sqlite_openssl.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
--requirements sdl2,pyjnius,kivy,python2,openssl,requests,sqlite3,setuptools

testapps/python3/arm64-v8a: virtualenv
. $(ACTIVATE) && cd testapps/ && \
python setup_testapp_python3_sqlite_openssl.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
testapps-with-numpy/%: virtualenv
$(eval $@_APP_ARCH := $(shell basename $*))
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
python setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
--requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools,numpy \
--arch=arm64-v8a
--arch=$($@_APP_ARCH)

testapps/python3/armeabi-v7a: virtualenv
. $(ACTIVATE) && cd testapps/ && \
python setup_testapp_python3_sqlite_openssl.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
--arch=armeabi-v7a
testapps/%: virtualenv
$(eval $@_APP_ARCH := $(shell basename $*))
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
python setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
--arch=$($@_APP_ARCH)

testapps-no-venv/%:
pip3 install Cython==0.28.6
pip3 install -e .
$(eval $@_APP_ARCH := $(shell basename $*))
cd testapps/on_device_unit_tests/ && \
python3 setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
--arch=$($@_APP_ARCH)

clean:
find . -type d -name "__pycache__" -exec rm -r {} +
Expand All @@ -62,7 +66,7 @@ docker/pull:
docker pull $(DOCKER_IMAGE):latest || true

docker/build:
docker build --cache-from=$(DOCKER_IMAGE) --tag=$(DOCKER_IMAGE) --file=Dockerfile.py3 .
docker build --cache-from=$(DOCKER_IMAGE) --tag=$(DOCKER_IMAGE) .

docker/push:
docker push $(DOCKER_IMAGE)
Expand All @@ -77,14 +81,9 @@ docker/run/make/%: docker/build
docker run --rm --env-file=.env $(DOCKER_IMAGE) make $*

docker/run/make/with-artifact/%: docker/build
ifeq (,$(findstring python3,$($*)))
$(eval $@_APP_NAME := bdisttest_python3_sqlite_openssl_googlendk)
else
$(eval $@_APP_NAME := bdisttest_python2_sqlite_openssl)
endif
$(eval $@_APP_ARCH := $(shell basename $*))
docker run --name p4a-latest --env-file=.env $(DOCKER_IMAGE) make $*
docker cp p4a-latest:/home/user/app/testapps/$($@_APP_NAME)__$($@_APP_ARCH)-debug-1.1-.apk ./apks
docker cp p4a-latest:/home/user/app/testapps/on_device_unit_tests/bdist_unit_tests_app__$($@_APP_ARCH)-debug-1.1-.apk ./apks
docker rm -fv p4a-latest

docker/run/shell: docker/build
Expand Down
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ python-for-android
==================

[![Build Status](https://travis-ci.org/kivy/python-for-android.svg?branch=develop)](https://travis-ci.org/kivy/python-for-android)
[![Unit tests & build apps](https://github.com/kivy/python-for-android/workflows/Unit%20tests%20&%20build%20apps/badge.svg?branch=develop)](https://github.com/kivy/python-for-android/actions?query=workflow%3A%22Unit+tests+%26+build+apps%22)
[![Coverage Status](https://coveralls.io/repos/github/kivy/python-for-android/badge.svg?branch=develop&kill_cache=1)](https://coveralls.io/github/kivy/python-for-android?branch=develop)
[![Backers on Open Collective](https://opencollective.com/kivy/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/kivy/sponsors/badge.svg)](#sponsors)
Expand Down Expand Up @@ -102,23 +103,13 @@ new recipe for python3 (3.7.1) had a new build system which was
applied to the ancient python recipe, allowing us to bump the python2
version number to 2.7.15. This change unified the build process for
both python recipes, and probably solved various issues detected over the
years. It should also be mentioned that these **unified python recipes**
require a **minimum target api level of 21**,
*Android 5.0 - Lollipop*, so in the case that you need to build targeting an
years. These **unified python recipes** require a **minimum target api level of 21**,
*Android 5.0 - Lollipop*. If you need to build targeting an
api level below 21, you should use an older version of python-for-android
(<=0.7.1).

Be aware that this project is in constant development so, as per time of writing,
you should use a minimum on Android's NDK r19, and ``we recommend using NDK r19b``.
This is because the toolchains installed by
default with the NDK can be used *in-place* and the python-for-android project
has been adapted for that feature. Also be aware that more recent versions of the
Android's NDK may not work.

Those mentioned changes has been done this way to make easier the transition
between python3 and python2. We will slowly phase out python2 support
towards 2020...so...if you are using python2 in your projects you should
consider migrating it into python3.
On March of 2020 we dropped support for creating apps that use Python 2. The latest
python-for-android release that supported building Python 2 was version 2019.10.6.

## Contributors

Expand Down
Loading