Skip to content

Commit

Permalink
feat: add support for fastapi 0.111
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz authored and cpcloud committed May 9, 2024
1 parent 1272865 commit e16d91f
Show file tree
Hide file tree
Showing 8 changed files with 1,147 additions and 7 deletions.
1 change: 1 addition & 0 deletions known-build-systems.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"hatch-vcs",
"hatchling",
"pbr",
"pdm-backend",
"poetry-core",
"setuptools",
"setuptools-scm"
Expand Down
48 changes: 42 additions & 6 deletions overrides/build-systems.json
Original file line number Diff line number Diff line change
Expand Up @@ -6693,13 +6693,29 @@
"setuptools-scm"
],
"fastapi": [
"flit",
"hatchling",
"setuptools"
{
"buildSystem": "flit",
"until": "0.110.3"
},
{
"buildSystem": "hatchling",
"until": "0.110.3"
},
{
"buildSystem": "setuptools",
"until": "0.110.3"
},
{
"buildSystem": "pdm-backend",
"from": "0.110.3"
}
],
"fastapi-camelcase": [
"setuptools"
],
"fastapi-cli": [
"pdm-backend"
],
"fastapi-csrf-protect": [
"poetry-core"
],
Expand All @@ -6717,6 +6733,9 @@
"fastapi-sessions": [
"setuptools"
],
"fastapi-slim": [
"pdm-backend"
],
"fastapi-sso": [
"poetry",
"poetry-core"
Expand Down Expand Up @@ -9872,7 +9891,14 @@
"setuptools"
],
"jinja2": [
"setuptools"
{
"buildSystem": "setuptools",
"until": "3.1.4"
},
{
"buildSystem": "flit-core",
"from": "3.1.4"
}
],
"jinja2-ansible-filters": [
"setuptools"
Expand Down Expand Up @@ -24448,8 +24474,18 @@
"setuptools"
],
"typer": [
"flit-core",
"setuptools"
{
"buildSystem": "flit-core",
"until": "0.11.0"
},
{
"buildSystem": "setuptools",
"until": "0.11.0"
},
{
"buildSystem": "pdm-backend",
"from": "0.11.0"
}
],
"types-aioboto3": [
"setuptools"
Expand Down
8 changes: 8 additions & 0 deletions overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,13 @@ lib.composeManyExtensions [
propagatedBuildInputs = removePackagesByName (old.propagatedBuildInputs or [ ]) (lib.optionals (final ? fastapi-cli) [ final.fastapi-cli ]);
});

fastapi-cli = prev.fastapi-cli.overridePythonAttrs (
old: lib.optionalAttrs (!(old.src.isWheel or false)) {
# remove the dependency cycle
propagatedBuildInputs = builtins.filter (p: p.pname != "fastapi") old.propagatedBuildInputs;
}
);

fastecdsa = prev.fastecdsa.overridePythonAttrs (old: {
buildInputs = old.buildInputs or [ ] ++ [ pkgs.gmp.dev ];
});
Expand Down Expand Up @@ -1968,6 +1975,7 @@ lib.composeManyExtensions [
(
let
githubHash = {
"3.10.3" = "sha256-bK6wA8P/IXEbiuJAx7psd0nUUKjR1jX4scFfJr1MBAk=";
"3.8.10" = "sha256-XhOJAsF9HbyyKMU9o/f9Zl3+qYozk8tVQU8bkbXGAZs=";
"3.8.11" = "sha256-TFoagWUtd/nJceNaptgPp4aTR/tBCmxpiZIVJwOlia4=";
"3.8.12" = "sha256-/1NcXGYOjCIVsFee7qgmCjnYPJnDEtyHMKJ5sBamhWE=";
Expand Down
1 change: 1 addition & 0 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ in
use-url-wheel = callTest ./use-url-wheel { };
returns = callTest ./returns { };
option = callTest ./option { };
fastapi = callTest ./fastapi { };
fastapi-utils = callTest ./fastapi-utils { };
awscli = callTest ./awscli { };
assorted-pkgs = callTest ./assorted-pkgs { };
Expand Down
2 changes: 1 addition & 1 deletion tests/fastapi-utils/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions tests/fastapi/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ poetry2nix, python3, runCommand }:
let
env = poetry2nix.mkPoetryEnv {
python = python3;
pyproject = ./pyproject.toml;
poetrylock = ./poetry.lock;
};
in
runCommand "fastapi-test"
{ } ''
${env}/bin/python -c 'import fastapi'
touch $out
''
Loading

0 comments on commit e16d91f

Please sign in to comment.