Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add httpx recipe #3100

Merged
merged 2 commits into from
Dec 23, 2024
Merged

Add httpx recipe #3100

merged 2 commits into from
Dec 23, 2024

Conversation

DexerBR
Copy link
Contributor

@DexerBR DexerBR commented Dec 23, 2024

Dependencies, from https://www.python-httpx.org:

"""
The HTTPX project relies on these excellent libraries:

  • httpcore - The underlying transport implementation for httpx.
  • h11 - HTTP/1.1 support.
  • certifi - SSL certificates.
  • idna - Internationalized domain name support.
  • sniffio - Async library autodetection.

"""

@DexerBR DexerBR marked this pull request as ready for review December 23, 2024 19:37
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@AndreMiras AndreMiras merged commit 1d7c701 into kivy:develop Dec 23, 2024
33 checks passed
@DexerBR DexerBR deleted the httpx-recipe branch December 23, 2024 20:57
@Fak3
Copy link
Contributor

Fak3 commented Dec 24, 2024

Why this recipe is needed? Httpx can be installed with pip, and I use it in my Android app without any issues

@DexerBR
Copy link
Contributor Author

DexerBR commented Dec 24, 2024

Why this recipe is needed? Httpx can be installed with pip, and I use it in my Android app without any issues

At least for me it seemed necessary, since buildozer couldn't resolve the external dependencies. Before the recipe I was seeing errors like:

  • No module named 'httpcore'
  • No module named 'h11'

Some questions:

  • What version of httpx are you using?
  • What other requirements does your buildozer.spec have?
  • What classes/methods of httpx are you using?

@Fak3
Copy link
Contributor

Fak3 commented Dec 24, 2024

@DexerBR ah, i forgot that p4a never recursively installs subdependencies for python packages. In my project before building, I use pdm export to generate the full requirements.txt with all subdependencies from my pyproject.toml file. Then I pass the result to the p4a apk --requirements argument: --requirements="python3,kivy_2.3.1,openssl,sqlite3,pillow,pytz,sdl2,anyio==4.7.0,app-state==0.6,certifi==2024.12.14,charset-normalizer==3.4.0,colorama==0.4.1,docutils==0.21.2,getinstance==0.7,h11==0.14.0,httpcore==1.0.7,httpx==0.27.2,idna==3.10,lockorator==0.1,loguru==0.7.3,minidjango==2.2.3.dev20190701035504,plyer==1.4.0,pygments==2.18.0,python-dateutil==2.9.0.post0,requests==2.32.3,six==1.17.0,sniffio==1.1.0,sqlparse==0.3.0,typing-extensions==4.12.2,urllib3==2.2.3"

So yeah, now i see that the recipe can be useful for those who don't want to introduce recursive subdependencies generation step themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants