Rebased our branches on latest p4a develop HEAD and buildozer master HEAD.
Re `android.allow_backup = False` in buildozer.spec, now that this setting
has been exposed to buildozer.spec (see https://github.com/kivy/buildozer/pull/1206),
we could finally drop a commit from our branch that did the same:
7a7d415d90
Re commenting out `android.arch` in buildozer.spec, we are setting this
via the ENV VAR in make_apk.
fixes#7198
We recently bumped the bundled version of PyQt (5.14.2->5.15.4).
It seems the new version has a lot more dynamic dependencies.
From https://doc.qt.io/qt-5/linux-requirements.html :
> From Qt 5.15 onwards, Qt does require libxcb 1.11. Also, the -qt-xcb
> configure option got removed that was bundling some of the libs below.
We are using the prebuilt wheels for PyQt5 from PyPI. Presumably those
had previously been built using the -qt-xcb option.
In some places in the script if some directory name had spaces it could cause issues.
I also added quotes around a few other directory names that currently are hardcoded with names without spaces as a way to prevent any future mishap
Ubuntu 20.04 needs `libxcb-xinerama.so.0`
and Debian 10 needs `libxcb-util.so.1` for the Qt `xcb` plugin.
-----
ported from 380f04a805
see https://github.com/Electron-Cash/Electron-Cash/issues/2196
-----
In particular, see this comment:
>> I confirmed that both Ubuntu 20.04 and Debian 10.8 clean install have an issue with the 4.2.4 AppImage.
>
> Any idea what broke it? I assume it used to work.
Yes, it did work in 4.2.3 which used PyQt5 5.13.2. I just had a look at the xcb plugin and it definitely has less dependencies:
```
ago@ubuntu2004vm:~/src/Electron-Cash/dist$ ldd squashfs-root/usr/lib/python3.6/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so|grep xcb
libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f0ec9d07000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f0ec9cdd000)
libxcb-xkb.so.1 => /lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007f0ec6ead000)
```
compared to PyQt5 5.15.2 in 4.2.4:
```
ago@ubuntu2004vm:~/src/Electron-Cash/dist$ ldd squashfs-root/usr/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so|grep xcb
libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fcb5715f000)
libxcb-icccm.so.4 => /lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007fcb57158000)
libxcb-image.so.0 => /lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007fcb56f51000)
libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fcb56f4c000)
libxcb-util.so.1 => /lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007fcb56d46000)
libxcb-keysyms.so.1 => /lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007fcb56d41000)
libxcb-randr.so.0 => /lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007fcb56d2e000)
libxcb-render-util.so.0 => /lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007fcb56d27000)
libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fcb56d16000)
libxcb-shape.so.0 => /lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007fcb56d11000)
libxcb-sync.so.1 => /lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007fcb56d07000)
libxcb-xfixes.so.0 => /lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007fcb56cfd000)
libxcb-xinerama.so.0 => /lib/x86_64-linux-gnu/libxcb-xinerama.so.0 (0x00007fcb56cf8000)
libxcb-xkb.so.1 => /lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007fcb56cda000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fcb56cae000)
```
The `git clean --dry-run` became redundant with "fresh clone" builds.
The new exclude in MANIFEST.in should not affect production builds (also due to fresh clone),
but they are nice when building from dirty local dir.
Note that newer aiorpcx started requiring python 3.8, so we cannot use
the latest versions, until we too bump the min python version to 3.8.
We should not do that until debian stable ships python 3.8.
Also, new aiorpcx introduced some API changes which we will need to
adopt, so even if the user locally has recent enough python, we need
old aiorpcx atm.
related: https://github.com/spesmilo/electrum/issues/7118
We've already been pinning pip/setuptools/wheel; it is `pip freeze --all`
(the "--all" arg) that does that. This change just tries to ensure that
we pin the latest version when possible.
Previously if e.g. "pip" was not pulled in by any package in "requirements${i}.txt",
we would just pin whatever is installed locally.
Had to also bump ubuntu version 18.04->20.04,
as was getting errors running the self-compiled pyinstaller otherwise (weird...):
```
from .utils.git import get_repo_revision
ModuleNotFoundError: No module named 'PyInstaller.utils'
```
(similar to https://github.com/pyinstaller/pyinstaller/issues/4403 )
-----
Note re appimage: when trying to compile python 3.8.x on ubuntu 16.04, I am getting:
./Modules/posixmodule.c: In function ‘os_copy_file_range_impl’:
./Modules/posixmodule.c:10351:15: error: implicit declaration of function ‘copy_file_range’ [-Werror=implicit-function-declaration]
ret = copy_file_range(src, p_offset_src, dst, p_offset_dst, count, flags);
This is because ubuntu 16.04 has too old glibc.
and poetry has a gazillion dependencies...
Collecting dnspython==2.1.0
Downloading dnspython-2.1.0.zip (389 kB)
|████████████████████████████████| 389 kB 2.1 MB/s
Installing build dependencies ... |
error
ERROR: Command errored out with exit status 1:
command: /opt/electrum/contrib/build-linux/appimage/../../../contrib/build-linux/appimage/build/appimage/electrum.AppDir/usr/bin/python3.7 /opt/electrum/contrib/build-linux/appimage/build/appimage/electrum.AppDir/usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-5z1gx14i/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'poetry>=0.12'
cwd: None
Complete output (195 lines):
Collecting poetry>=0.12
Downloading poetry-1.1.4.tar.gz (132 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting pkginfo<2.0,>=1.4
Downloading pkginfo-1.6.1.tar.gz (37 kB)
Collecting tomlkit<1.0.0,>=0.7.0
Downloading tomlkit-0.7.0.tar.gz (163 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting keyring<22.0.0,>=21.2.0; python_version >= "3.6" and python_version < "4.0"
Downloading keyring-21.8.0.tar.gz (58 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting cleo<0.9.0,>=0.8.1
Downloading cleo-0.8.1.tar.gz (19 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting pexpect<5.0.0,>=4.7.0
Downloading pexpect-4.8.0.tar.gz (157 kB)
Collecting poetry-core<2.0.0,>=1.0.0
Using cached poetry-core-1.0.0.tar.gz (333 kB)
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting importlib-metadata<2.0.0,>=1.6.0; python_version < "3.8"
Using cached importlib_metadata-1.7.0.tar.gz (29 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting crashtest<0.4.0,>=0.3.0; python_version >= "3.6" and python_version < "4.0"
Downloading crashtest-0.3.1.tar.gz (4.3 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting shellingham<2.0,>=1.1
Downloading shellingham-1.3.2.tar.gz (9.7 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting virtualenv<21.0.0,>=20.0.26
Downloading virtualenv-20.2.2.tar.gz (9.1 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting requests-toolbelt<0.10.0,>=0.9.1
Downloading requests-toolbelt-0.9.1.tar.gz (207 kB)
Collecting html5lib<2.0,>=1.0
Downloading html5lib-1.1.tar.gz (272 kB)
Collecting cachecontrol[filecache]<0.13.0,>=0.12.4
Downloading CacheControl-0.12.6.tar.gz (14 kB)
Collecting clikit<0.7.0,>=0.6.2
Downloading clikit-0.6.2.tar.gz (56 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting requests<3.0,>=2.18
Downloading requests-2.25.1.tar.gz (102 kB)
Collecting cachy<0.4.0,>=0.3.0
Downloading cachy-0.3.0.tar.gz (15 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting packaging<21.0,>=20.4
Downloading packaging-20.8.tar.gz (79 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting jeepney>=0.4.2; sys_platform == "linux"
Downloading jeepney-0.6.0.tar.gz (49 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting SecretStorage>=3.2; sys_platform == "linux"
Downloading SecretStorage-3.3.0.tar.gz (19 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting ptyprocess>=0.5
Downloading ptyprocess-0.7.0.tar.gz (70 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting zipp>=0.5
Using cached zipp-3.4.0.tar.gz (15 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting appdirs<2,>=1.4.3
Downloading appdirs-1.4.4.tar.gz (13 kB)
Collecting distlib<1,>=0.3.1
Downloading distlib-0.3.1.zip (578 kB)
Collecting six<2,>=1.9.0
Downloading six-1.15.0.tar.gz (33 kB)
Collecting filelock<4,>=3.0.0
Downloading filelock-3.0.12.tar.gz (8.5 kB)
Collecting webencodings
Downloading webencodings-0.5.1.tar.gz (9.7 kB)
Collecting msgpack>=0.5.2
Downloading msgpack-1.0.2.tar.gz (123 kB)
Collecting lockfile>=0.9
Downloading lockfile-0.12.2.tar.gz (20 kB)
ERROR: Command errored out with exit status 1: