1
0
Commit Graph

11 Commits

Author SHA1 Message Date
SomberNight
0c2a885c66 mac build: force using source dist for most of our python dependencies
We compile from tar.gz, instead of using pre-built binary wheels from PyPI.
(or if the dep is pure-python, use tar.gz instead of "source-only" wheel)

-----
Some unorganised things below for future reference.

```
$ dsymutil -dump-debug-map dist1/hid.cpython-39-darwin.so
warning: (x86_64) /private/var/folders/1n/zc14m3td0rg4nt0ftklmm7z00000gn/T/pip-install-bm88zvc1/hidapi_cd307bc31ab34252b77d11d6d7212fc5/build/temp.macosx-10.9-x86_64-3.9/hid.o unable to open object file: No such file or directory
warning: (x86_64) /private/var/folders/1n/zc14m3td0rg4nt0ftklmm7z00000gn/T/pip-install-bm88zvc1/hidapi_cd307bc31ab34252b77d11d6d7212fc5/build/temp.macosx-10.9-x86_64-3.9/hidapi/mac/hid.o unable to open object file: No such file or directory
---
triple:          'x86_64-apple-darwin'
binary-path:     'dist1/hid.cpython-39-darwin.so'
...
```

```
$ nm -pa dist1/hid.cpython-39-darwin.so
```

- https://stackoverflow.com/questions/10044697/where-how-does-apples-gcc-store-dwarf-inside-an-executable
- https://github.com/pypa/pip/issues/6505
- https://github.com/pypa/pip/issues/7808#issuecomment-770275723
- https://github.com/NixOS/nixpkgs/pull/91272
- https://github.com/cython/cython/pull/1576
- 9d2ba1611b/Cython/Compiler/ModuleNode.py (L913)
2022-08-06 07:52:03 +02:00
SomberNight
6633ef4c35 build appimage: bump pkg2appimage version
should fix https://github.com/spesmilo/electrum/issues/7784
by including commit 1e3ecde6b9
2022-04-25 21:04:46 +02:00
SomberNight
634611272a build appimage: make binary somewhat smaller by excluding stuff
4.1.5->4.2.1, the appimage grew 54M->66M. This change shrinks it back to 58M.
```
$ ls -lah
total 224M
drwxrwxr-x  5 user user 4.0K Mar 27 18:18 .
drwxrwxr-x 16 user user 4.0K Mar 23 16:02 ..
-rwxrw-r--  1 user user  48M Dec 18  2020 electrum-4.0.9-x86_64.AppImage
-rwxrw-r--  1 user user  54M Jan 19 14:25 electrum-4.1.5-x86_64.AppImage
-rwxr-xr-x  1 user user  58M Mar 27 18:12 electrum-4.2.1-dirty-x86_64.AppImage
-rwxrw-r--  1 user user  66M Mar 27 15:00 electrum-4.2.1-x86_64.AppImage
```
I've used the great `ncdu` tool to investigate file sizes.
```
$ du squashfs-root-415/usr/lib/python3.7/ --max-depth=1 | sort -nr | head -n8
154608	squashfs-root-415/usr/lib/python3.7/
138864	squashfs-root-415/usr/lib/python3.7/site-packages
4720	squashfs-root-415/usr/lib/python3.7/lib-dynload
1744	squashfs-root-415/usr/lib/python3.7/encodings
664	squashfs-root-415/usr/lib/python3.7/pydoc_data
460	squashfs-root-415/usr/lib/python3.7/distutils
460	squashfs-root-415/usr/lib/python3.7/asyncio
436	squashfs-root-415/usr/lib/python3.7/email

$ du squashfs-root-421/usr/lib/python3.9/ --max-depth=1 | sort -nr | head -n8
194088	squashfs-root-421/usr/lib/python3.9/
143512	squashfs-root-421/usr/lib/python3.9/site-packages
33824	squashfs-root-421/usr/lib/python3.9/config-3.9-x86_64-linux-gnu
5244	squashfs-root-421/usr/lib/python3.9/lib-dynload
1720	squashfs-root-421/usr/lib/python3.9/encodings
696	squashfs-root-421/usr/lib/python3.9/pydoc_data
520	squashfs-root-421/usr/lib/python3.9/asyncio
464	squashfs-root-421/usr/lib/python3.9/distutils
```
We should delete `usr/lib/python3.9/config-3.9-x86_64-linux-gnu/` (which is 33M unpacked)
With py3.7 (electrum 4.1.5), this folder was named `config-3.7m-x86_64-linux-gnu`,
presumably because the default config to compile py3.7 was `--with-pymalloc`,
but maybe it is not for py3.9... ? not sure. (see https://peps.python.org/pep-3149/ )
2022-03-27 19:27:55 +02:00
SomberNight
98d32f41d5 build: (reproducibility) always uses "pip install" with "--no-build-isolation"
fixes https://github.com/spesmilo/electrum/issues/7737
fixes https://github.com/spesmilo/electrum/issues/7736
related 8559d1eb72
2022-03-26 02:45:47 +01:00
SomberNight
1bb7ef92e7 binaries: bump python 3.9.10->3.9.11; and for android 3.8.12->3.8.13
This is bumping the python versions bundled inside our binaries.
For macOS and AppImage, from 3.9.10 to 3.9.11.
For Android, from 3.8.12 to 3.8.13.

Windows is left untouched as I am having issues with the wine build when using 3.9.11.
(see https://github.com/spesmilo/electrum/pull/7721#issuecomment-1071901116 )
2022-03-18 16:21:24 +01:00
SomberNight
5e2cee6a31 build appimage: rm importlib-metadata workaround
The importlib-metadata pkg is no longer needed apparently (since we bumped the min python to 3.8).
2022-02-22 17:14:23 +01:00
SomberNight
bb5b52f2d7 binaries: bump python 3.9.7->3.9.10 2022-02-17 16:51:13 +01:00
SomberNight
ca2d1eea45 build appimage: update appimagetool and stop using fork of mksquashfs
The latest release of appimagetool bundles a new enough version of
mksquashfs. We had been building a fork of mksquashfs but all the
relevant patches there had been upstreamed.

Note: we still need a wrapper when calling mksquashfs, as appimagetool
calls it with "-mkfs-time 0" and we have the SOURCE_DATE_EPOCH env var
set; and these two would conflict.
Two ways to fix: either unset SOURCE_DATE_EPOCH for that context, or
build a wrapper that removes the "-mkfs-time 0". The former would be
cleaner but for some reason I did not manage to build reproducibly
that way. The latter seems to work.

related:
- https://github.com/AppImage/AppImageKit/issues/929#issuecomment-580769875
  > Now official squashfs 4.4 makes reproducible images by default
- https://github.com/AppImage/AppImageKit/pull/996
2021-09-23 18:49:44 +02:00
SomberNight
11146d352f appimage build: bump python 3.8.12->3.9.7 2021-09-20 19:31:41 +02:00
SomberNight
fb3ce438d6 appimage build: bump python 3.7.10->3.8.12 2021-09-20 19:31:38 +02:00
SomberNight
3df1c3bbf7 build: rename some scripts
also, merge sdist/build.sh and sdist/make_tgz into sdist/make_sdist.sh
2021-06-18 16:29:03 +02:00