kivy / kivy-ios

Toolchain for compiling Python / Kivy / other libraries for iOS
https://kivy.org/docs/guide/packaging-ios.html
MIT License
758 stars 238 forks source link

Use `--no-deps` and `--platform` during install of recipe python deps #801

Closed misl6 closed 1 year ago

misl6 commented 1 year ago

Why only for pip installations made via install_python_deps and not for everything (e.g toolchain pip install) ?

Basically just for not breaking things for users now, since we likely need to write a guide for parsing dependencies, but we're in a rush for releasing 2.2.0rc1 (which need additional python_deps compared to 2.1.0)

Why --platform any ?

Well, packages like charset-normalizer (which is a dependency of requests) ship to PyPi both platform-specific wheels (like charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_universal2.whl) and non-platform specific wheels (charset_normalizer-3.1.0-py3-none-any.whl).

In kivy-ios we need to ask pip to install a non-platform-specific version (otherwise it will install the macosx version, which is not compatible with iOS)

Wow. --platform seems nice feature, but why --no-deps?

Well, unfortunately, --platform does not work alone.

ERROR: When restricting platform and interpreter constraints using --python-version, --platform, --abi, or --implementation, either --no-deps must be set, or --only-binary=:all: must be set and --no-binary must not be set (or must be set to :none:).
misl6 commented 1 year ago

LGTM, but build is failing, I haven't investigated why

I gone too fast 😀, and missed an important chunk of code. Updated it.