Building `FastAPI` with `buildroot` `2022.05` (with `flit`support) fails
See original GitHub issueFirst Check
- I added a very descriptive title to this issue.
- I used the GitHub search to find a similar issue and didn’t find it.
- I searched the FastAPI documentation, with the integrated search.
- I already searched in Google “How to X in FastAPI” and didn’t find any information.
- I already read and followed all the tutorial in the docs and didn’t find an answer.
- I already checked if it is not related to FastAPI but to Pydantic.
- I already checked if it is not related to FastAPI but to Swagger UI.
- I already checked if it is not related to FastAPI but to ReDoc.
Commit to Help
- I commit to help with one of those options 👆
Example Code
Here are my two `Buildroot's` files for a package named `python-fastapi`:
[Config.in]
config BR2_PACKAGE_PYTHON_FASTAPI
bool "python-fastapi"
help
FastAPI framework, high performance, easy to learn, fast to code, ready for production
https://github.com/tiangolo/fastapi
[python-fastapi.mk]
################################################################################
#
# python-fastapi
#
################################################################################
PYTHON_FASTAPI_VERSION = 0.79.0
PYTHON_FASTAPI_SOURCE = fastapi-$(PYTHON_FASTAPI_VERSION).tar.gz
PYTHON_FASTAPI_SITE = https://files.pythonhosted.org/packages/ae/ed/ea37410618f1c206ba857d391d7b2de6de7a758ea586662aef77c945d3b4
PYTHON_FASTAPI_LICENSE = MIT
PYTHON_FASTAPI_LICENSE_FILES = LICENSE
PYTHON_FASTAPI_SETUP_TYPE = flit
$(eval $(python-package))
Description
The last 2022.05
version of buildroot has support to build python packages that use flit
.
I don’t know much about the details of how a python is packaged (and less about flit
), but I understand that FastAPI
provides a pyproject.toml
file where the package details are contained.
I was able to successfully build the package once I changed this part of that file:
[build-system]
requires = ["flit"]
build-backend = "flit.buildapi"
To this one:
[build-system]
requires = ["flit"]
build-backend = "flit_core.buildapi"
But I’m not sure if that breaks it for someone else.
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.79.0
Python Version
3.10.4
Additional Context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Issues · tiangolo/fastapi · GitHub
FastAPI framework, high performance, easy to learn, fast to code, ... Building FastAPI with buildroot 2022.05 (with flit support) fails question Further ...
Read more >response cookie values need use 'utf-8' encode,about tiangolo/fastapi
I searched the FastAPI documentation, with the integrated search. ... Building `FastAPI` with `buildroot` `2022.05` (with `flit`support) fails ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems
buildroot
currently does not have support forHatch
. But I noted thatpypa
is on its way to embrace it, so that’s something to work on thebuildroot
side. Thank you for the heads up @iudeenOnce FastAPI drops support for python 3.6, it’d most likely move away from
flit
towards Hatch. Will it solve your problem?