2021-03-12 13:04:58 +01:00
|
|
|
/* It is assumed that propagated dependencies are included in the poetryPackages.
|
2021-12-25 16:00:20 -08:00
|
|
|
The "certifi" is direct dependency of "requests" library.
|
2021-03-12 13:04:58 +01:00
|
|
|
|
2021-12-25 16:00:20 -08:00
|
|
|
Note: this test assumes that "certifi" lib is going to be a dep of "requests" in the future.
|
2021-03-12 13:04:58 +01:00
|
|
|
*/
|
2024-03-09 12:10:18 -05:00
|
|
|
{ poetry2nix, python3, python39 }:
|
2021-03-12 09:59:33 +01:00
|
|
|
let
|
|
|
|
inherit (builtins) elem map;
|
2021-03-12 14:49:21 +01:00
|
|
|
drvPythonCurrent = poetry2nix.mkPoetryPackages {
|
2021-03-12 09:59:33 +01:00
|
|
|
projectDir = ./.;
|
2021-03-12 12:53:39 +01:00
|
|
|
python = python3;
|
2021-03-12 09:59:33 +01:00
|
|
|
};
|
2021-03-12 14:49:21 +01:00
|
|
|
|
|
|
|
# Test backward compatibility
|
2023-02-27 14:36:06 +13:00
|
|
|
drvPythonOldest = poetry2nix.mkPoetryPackages {
|
2021-03-12 14:49:21 +01:00
|
|
|
projectDir = ./.;
|
2024-03-09 12:10:18 -05:00
|
|
|
python = python39;
|
2021-03-12 14:49:21 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
packageNamesCurrent = map (package: package.pname) drvPythonCurrent.poetryPackages;
|
2023-02-27 14:36:06 +13:00
|
|
|
packageNamesPythonOldest = map (package: package.pname) drvPythonOldest.poetryPackages;
|
2021-03-12 11:32:35 +01:00
|
|
|
in
|
2021-03-12 14:49:21 +01:00
|
|
|
assert builtins.elem "certifi" packageNamesCurrent;
|
2023-02-27 14:36:06 +13:00
|
|
|
assert builtins.elem "certifi" packageNamesPythonOldest;
|
2023-07-14 17:36:10 +12:00
|
|
|
drvPythonCurrent.python
|