mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 23:20:55 +00:00
pythonPackages.fastapi: init at 0.33.0
This commit is contained in:
parent
f878d34e5f
commit
124fb417fc
40
pkgs/development/python-modules/fastapi/default.nix
Normal file
40
pkgs/development/python-modules/fastapi/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, uvicorn
|
||||
, starlette
|
||||
, pydantic
|
||||
, python
|
||||
, isPy3k
|
||||
, which
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fastapi";
|
||||
version = "0.33.0";
|
||||
disabled = !isPy3k;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1mc8ljfk6xyn2cq725s8hgapp62z5mylzw9akvkhwwz3bh8m5a7f";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
uvicorn
|
||||
starlette
|
||||
pydantic
|
||||
];
|
||||
|
||||
patches = [ ./setup.py.patch ];
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} -c "from fastapi import FastAPI; app = FastAPI()"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/tiangolo/fastapi";
|
||||
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ wd15 ];
|
||||
};
|
||||
}
|
13
pkgs/development/python-modules/fastapi/setup.py.patch
Normal file
13
pkgs/development/python-modules/fastapi/setup.py.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/setup.py b/setup.py
|
||||
index ccc3d2b..77ce446 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -10,7 +10,7 @@ package_data = \
|
||||
{'': ['*']}
|
||||
|
||||
install_requires = \
|
||||
-['starlette >=0.11.1,<=0.12.0', 'pydantic >=0.30,<=0.30.0']
|
||||
+['starlette >=0.11.1', 'pydantic >=0.30']
|
||||
|
||||
extras_require = \
|
||||
{'all': ['requests',
|
|
@ -6045,6 +6045,7 @@ in {
|
|||
|
||||
pydantic = callPackage ../development/python-modules/pydantic { };
|
||||
|
||||
fastapi = callPackage ../development/python-modules/fastapi { };
|
||||
});
|
||||
|
||||
in fix' (extends overrides packages)
|
||||
|
|
Loading…
Reference in a new issue