python3Packages.fastapi: 0.42.0 -> 0.45.0 fix broken package enable tests
This commit is contained in:
parent
5438b13be8
commit
93aa213aca
@ -1,22 +1,28 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, uvicorn
|
||||
, starlette
|
||||
, pydantic
|
||||
, python
|
||||
, isPy3k
|
||||
, which
|
||||
, pytest
|
||||
, pytestcov
|
||||
, pyjwt
|
||||
, passlib
|
||||
, aiosqlite
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fastapi";
|
||||
version = "0.42.0";
|
||||
version = "0.45.0";
|
||||
format = "flit";
|
||||
disabled = !isPy3k;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "48cb522c1c993e238bfe272fbb18049cbd4bf5b9d6c0d4a4fa113cc790e8196c";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tiangolo";
|
||||
repo = "fastapi";
|
||||
rev = version;
|
||||
sha256 = "1qwh382ny6qa3zi64micdq4j7dc64zv4rfd8g91j0digd4rhs6i1";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@ -25,10 +31,24 @@ buildPythonPackage rec {
|
||||
pydantic
|
||||
];
|
||||
|
||||
patches = [ ./setup.py.patch ];
|
||||
checkInputs = [
|
||||
pytest
|
||||
pytestcov
|
||||
pyjwt
|
||||
passlib
|
||||
aiosqlite
|
||||
];
|
||||
|
||||
# starlette pinning kept in place due to 0.12.9 being a hard
|
||||
# dependency luckily fastapi is currently the only dependent on
|
||||
# starlette. Please remove pinning when possible
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "pydantic >=0.32.2,<=0.32.2" "pydantic"
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} -c "from fastapi import FastAPI; app = FastAPI()"
|
||||
pytest --ignore=tests/test_default_response_class.py
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -1,13 +0,0 @@
|
||||
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',
|
Loading…
Reference in New Issue
Block a user