1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:07:46 +00:00

Ports/python3: Make pip work

Add two patches to allow Python's package manager to work on Serenity:

- The first one enables zlib module, which is needed for `ensurepip`
  command;
- The second patch fixes pip downloads, so it's possible to install
  packages from the PyPI repository.
This commit is contained in:
Humberto Alves 2022-09-02 12:15:09 +01:00 committed by Linus Groh
parent 723a22fa5d
commit fb5a39498a
3 changed files with 76 additions and 0 deletions

View file

@ -36,3 +36,24 @@ Make some tweaks to Python's `setup.py`:
build the `_curses` module. This is by default included for a bunch of
extensions, but not `_curses`.
## `0005-Tweak-setup.py-sysroot-detection.patch`
Tweak `setup.py` sysroot detection
When crosscompiling, the Python installer expects the C compiler to
be invoked with a `--sysroot` command line option, which then is used
to find additional subdirectories containing headers and libraries.
Because there is no such option present, this is a workaround to use
the environment variable `SERENITY_INSTALL_ROOT` as a fake `--sysroot`
in the detection code.
## `0006-Workaround-for-unsupported-socket-option.patch`
Workaround for unsupported socket option
This is a workaround for ignoring the result of `setsockopt` call when
given `TCP_NODELAY` as an argument. This TCP socket option is used in
many applications (like pip and requests) for optimization purposes.
For now, it can be safely ignored until it's supported in the kernel.