You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many pip packages support passing environment variables at install time. For example, to use the slower multidict Python implementation:
MULTIDICT_NO_EXTENSIONS=1 pip install multidict
I haven't tested this yet, I'm sorry. Maybe Chaquopy's pip already reads from the local environment variables? Regardless, I think it would be easier to have this be an explicit option in the gradle plugin. That would also lead to more reproducible builds across machines
The text was updated successfully, but these errors were encountered:
If all you want is a newer version of multidict, you may be able to do that by moving to a newer version of Python. See the repository for the available version combinations – the newest versions are currently multidict 5.1.0 for Python 3.8-3.11, and multidict 6.0.4 for Python 3.12.
Most packages that support pure-Python fallbacks will either use them automatically if the native compilation fails, or have a pure-Python wheel on PyPI. I see multidict 6.0.4 doesn't do either of those things, so the environment variable would be necessary to install it on Python 3.11 or older.
However, the current multidict version 6.0.5 does have a pure-Python wheel on PyPI, so that should solve your immediate problem if you need a newer version of multidict on an older version of Python.
Maybe Chaquopy's pip already reads from the local environment variables?
Yes, it does, so you can pass the environment variable through Gradle on the command line, like this:
MULTIDICT_NO_EXTENSIONS=1 ./gradlew assembleDebug
After you've done this once, the wheel will be cached locally so you won't need to set the variable again.
But I agree it would be better to put it in a Gradle file so it's more reproducible, and I haven't managed to find an easy way of doing that:
Java has no setenv equivalent in its standard library.
Chaquopy runs pip using project.exec rather than an Exec task, so the subprocess environment can't be configured that way.
Setting a variable in gradlew apparently has no effect within Android Studio.
So I'll leave this issue open and see if anyone else has a similar problem.
Many pip packages support passing environment variables at install time. For example, to use the slower multidict Python implementation:
I haven't tested this yet, I'm sorry. Maybe Chaquopy's pip already reads from the local environment variables? Regardless, I think it would be easier to have this be an explicit option in the gradle plugin. That would also lead to more reproducible builds across machines
The text was updated successfully, but these errors were encountered: