2021-02-21 11:51:04 +01:00
|
|
|
let
|
|
|
|
sources = import ../nix/sources.nix;
|
|
|
|
in
|
|
|
|
{ pkgs ? import sources.nixpkgs {
|
2022-05-05 01:40:44 +12:00
|
|
|
config = {
|
|
|
|
allowAliases = false;
|
2022-09-02 04:26:07 +12:00
|
|
|
allowInsecurePredicate = x: true;
|
2022-05-05 01:40:44 +12:00
|
|
|
};
|
2021-02-21 11:51:04 +01:00
|
|
|
overlays = [
|
|
|
|
(import ../overlay.nix)
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}:
|
2019-11-28 16:21:27 +01:00
|
|
|
let
|
|
|
|
poetry = pkgs.callPackage ../pkgs/poetry { python = pkgs.python3; inherit poetry2nix; };
|
2023-04-05 10:01:40 +03:00
|
|
|
poetry2nix = import ./.. { inherit pkgs; };
|
2021-01-26 14:29:24 +03:00
|
|
|
poetryLib = import ../lib.nix { inherit pkgs; lib = pkgs.lib; stdenv = pkgs.stdenv; };
|
2022-05-05 01:40:44 +12:00
|
|
|
pep425 = pkgs.callPackage ../pep425.nix { inherit poetryLib; python = pkgs.python3; };
|
2023-02-27 14:36:06 +13:00
|
|
|
pep425PythonOldest = pkgs.callPackage ../pep425.nix { inherit poetryLib; python = pkgs.python38; };
|
2022-05-05 01:40:44 +12:00
|
|
|
pep425OSX = pkgs.callPackage ../pep425.nix { inherit poetryLib; isLinux = false; python = pkgs.python3; };
|
2020-01-12 19:56:45 +00:00
|
|
|
skipTests = builtins.filter (t: builtins.typeOf t != "list") (builtins.split "," (builtins.getEnv "SKIP_TESTS"));
|
2020-02-28 13:24:55 +00:00
|
|
|
callTest = test: attrs: pkgs.callPackage test ({ inherit poetry2nix; } // attrs);
|
2022-01-22 20:01:07 +12:00
|
|
|
|
|
|
|
# HACK: Return null on MacOS since the test in question fails
|
|
|
|
skipOSX = drv: if pkgs.stdenv.isDarwin then builtins.trace "Note: Skipping ${drv.name} on OSX" (pkgs.runCommand drv.name { } "touch $out") else drv;
|
|
|
|
|
2019-11-28 16:21:27 +01:00
|
|
|
in
|
2020-01-12 19:56:45 +00:00
|
|
|
builtins.removeAttrs
|
2020-04-29 14:12:59 +01:00
|
|
|
{
|
|
|
|
trivial = callTest ./trivial { };
|
2022-09-02 04:18:25 +12:00
|
|
|
|
|
|
|
# Uses the updated Poetry 1.2.0 format
|
|
|
|
trivial-poetry-1_2_0 = callTest ./trivial-poetry-1_2_0 { };
|
|
|
|
|
2021-05-09 21:47:06 +02:00
|
|
|
legacy = callTest ./legacy { };
|
2020-07-21 20:52:44 +02:00
|
|
|
composable-defaults = callTest ./composable-defaults { };
|
2020-04-29 14:12:59 +01:00
|
|
|
override = callTest ./override-support { };
|
|
|
|
override-default = callTest ./override-default-support { };
|
2021-11-07 09:50:59 -05:00
|
|
|
common-pkgs-1 = callTest ./common-pkgs-1 { };
|
|
|
|
common-pkgs-2 = callTest ./common-pkgs-2 { };
|
2023-02-27 14:36:06 +13:00
|
|
|
pep425 = pkgs.callPackage ./pep425 { inherit pep425; inherit pep425OSX; inherit pep425PythonOldest; };
|
2022-03-29 09:59:14 +02:00
|
|
|
pep600 = skipOSX (callTest ./pep600 { });
|
2020-04-29 14:12:59 +01:00
|
|
|
env = callTest ./env { };
|
2021-09-16 11:41:38 -04:00
|
|
|
pytest-randomly = callTest ./pytest-randomly { };
|
2021-07-10 13:40:33 +02:00
|
|
|
file-src-deps = callTest ./file-src-deps { };
|
|
|
|
file-src-deps-level2 = callTest ./file-src-deps-level2 { };
|
|
|
|
file-wheel-deps = callTest ./file-wheel-deps { };
|
|
|
|
file-wheel-deps-level2 = callTest ./file-wheel-deps-level2 { };
|
2020-04-29 14:12:59 +01:00
|
|
|
git-deps = callTest ./git-deps { };
|
2022-10-20 08:55:38 +00:00
|
|
|
git-deps-1_2_0 = callTest ./git-deps-1_2_0 { };
|
2020-04-29 14:12:59 +01:00
|
|
|
git-deps-pinned = callTest ./git-deps-pinned { };
|
2021-08-30 09:25:13 +12:00
|
|
|
in-list = callTest ./in-list { };
|
2020-04-29 14:12:59 +01:00
|
|
|
cli = poetry2nix;
|
2022-10-10 20:10:20 +13:00
|
|
|
path-deps = callTest ./path-deps { };
|
|
|
|
path-deps-develop = callTest ./path-deps-develop { };
|
|
|
|
path-deps-level2 = callTest ./path-deps-level2 { };
|
2020-04-29 14:12:59 +01:00
|
|
|
operators = callTest ./operators { };
|
|
|
|
preferWheel = callTest ./prefer-wheel { };
|
|
|
|
prefer-wheels = callTest ./prefer-wheels { };
|
|
|
|
closure-size = callTest ./closure-size {
|
2020-01-13 15:38:52 +00:00
|
|
|
inherit poetry;
|
2020-04-29 14:12:59 +01:00
|
|
|
inherit (pkgs) postgresql;
|
|
|
|
};
|
2022-09-22 19:06:23 +12:00
|
|
|
# pyqt5 = skipOSX (callTest ./pyqt5 { });
|
2020-04-29 14:12:59 +01:00
|
|
|
extras = callTest ./extras { };
|
|
|
|
source-filter = callTest ./source-filter { };
|
|
|
|
canonical-module-names = callTest ./canonical-module-names { };
|
|
|
|
wandb = callTest ./wandb { };
|
2022-02-05 16:00:33 +12:00
|
|
|
utf8-pyproject = callTest ./utf8-pyproject { };
|
2022-01-22 20:01:07 +12:00
|
|
|
|
|
|
|
# Test deadlocks on darwin, sandboxing issue?
|
|
|
|
dependency-environment = skipOSX (callTest ./dependency-environment { });
|
|
|
|
|
|
|
|
# Editable tests fails on Darwin because of sandbox paths
|
|
|
|
editable = skipOSX (callTest ./editable { });
|
|
|
|
editable-egg = skipOSX (callTest ./editable-egg { });
|
|
|
|
|
2020-08-24 18:37:58 +02:00
|
|
|
ansible-molecule = callTest ./ansible-molecule { };
|
2022-09-29 15:20:50 -04:00
|
|
|
bcrypt = callTest ./bcrypt { };
|
2021-03-12 09:59:33 +01:00
|
|
|
mk-poetry-packages = callTest ./mk-poetry-packages { };
|
2021-05-13 21:46:40 +02:00
|
|
|
markupsafe2 = callTest ./markupsafe2 { };
|
2023-03-24 00:54:50 +13:00
|
|
|
pendulum = skipOSX (callTest ./pendulum { });
|
2022-05-10 07:33:50 +12:00
|
|
|
# uwsgi = callTest ./uwsgi { }; # Commented out because build is flaky (unrelated to poetry2nix)
|
2021-12-22 14:03:59 -05:00
|
|
|
jq = callTest ./jq { };
|
2023-03-14 16:32:11 -07:00
|
|
|
ubersmith = callTest ./ubersmith { };
|
2023-03-15 16:53:22 -07:00
|
|
|
returns = callTest ./returns { };
|
2023-03-15 10:28:52 -07:00
|
|
|
option = callTest ./option { };
|
2023-03-16 09:09:39 -07:00
|
|
|
fastapi-utils = callTest ./fastapi-utils { };
|
2021-12-25 22:22:55 -08:00
|
|
|
awscli = callTest ./awscli { };
|
2021-12-29 12:34:32 -05:00
|
|
|
aiopath = callTest ./aiopath { };
|
2022-01-11 10:12:33 +13:00
|
|
|
fetched-projectdir = callTest ./fetched-projectdir { };
|
2022-01-20 10:04:25 +12:00
|
|
|
assorted-pkgs = callTest ./assorted-pkgs { };
|
2022-10-06 14:24:20 +02:00
|
|
|
watchfiles = callTest ./watchfiles { };
|
2023-04-01 06:37:23 -04:00
|
|
|
sqlalchemy = callTest ./sqlalchemy { };
|
|
|
|
tzlocal = callTest ./tzlocal { };
|
2023-05-02 21:48:58 -07:00
|
|
|
text-generation-webui = callTest ./text-generation-webui { };
|
2020-04-29 14:12:59 +01:00
|
|
|
|
2022-01-22 20:01:07 +12:00
|
|
|
# Cross tests fail on darwin for some strange reason:
|
|
|
|
# ERROR: MarkupSafe-2.0.1-cp39-cp39-linux_aarch64.whl is not a supported wheel on this platform.
|
|
|
|
extended-cross = skipOSX (callTest ./extended-cross { });
|
|
|
|
trivial-cross = skipOSX (callTest ./trivial-cross { });
|
|
|
|
|
2022-01-18 22:18:00 +12:00
|
|
|
# Inherit test cases from nixpkgs
|
2022-05-05 07:52:28 +12:00
|
|
|
nixops = pkgs.nixops;
|
|
|
|
nixops_unstable = skipOSX pkgs.nixops_unstable;
|
2022-01-22 20:01:07 +12:00
|
|
|
|
|
|
|
# Rmfuse fails on darwin because osxfuse only implements fuse api v2
|
|
|
|
rmfuse = skipOSX pkgs.rmfuse;
|
2022-01-18 22:18:00 +12:00
|
|
|
|
2023-04-06 15:38:21 -07:00
|
|
|
ml-stack = callTest ./ml-stack { };
|
2023-04-06 17:19:04 -07:00
|
|
|
|
2020-04-29 14:12:59 +01:00
|
|
|
# Test building poetry
|
|
|
|
inherit poetry;
|
2020-01-13 15:38:52 +00:00
|
|
|
|
2022-10-11 11:51:27 +13:00
|
|
|
poetry-env =
|
|
|
|
let
|
2022-10-18 08:35:43 -07:00
|
|
|
env = poetry2nix.mkPoetryEnv {
|
|
|
|
projectDir = ../pkgs/poetry;
|
|
|
|
groups = [ "typing" ];
|
|
|
|
};
|
2022-10-11 11:51:27 +13:00
|
|
|
in
|
|
|
|
pkgs.runCommand "poetry-env-test" { } ''
|
|
|
|
${env}/bin/python -c 'import requests'
|
|
|
|
${env}/bin/python -c 'import mypy'
|
|
|
|
touch $out
|
|
|
|
'';
|
2020-10-01 20:37:45 +02:00
|
|
|
|
2022-09-02 14:58:48 +12:00
|
|
|
dependency-groups = callTest ./dependency-groups { };
|
|
|
|
|
2020-04-29 14:12:59 +01:00
|
|
|
# And also test with pypy
|
|
|
|
# poetry-pypy = poetry.override { python = pkgs.pypy; };
|
|
|
|
# poetry-pypy3 = poetry.override { python = pkgs.pypy3; };
|
2020-01-07 23:40:40 +00:00
|
|
|
|
2023-02-03 14:55:46 +13:00
|
|
|
jupyterlab = callTest ./jupyterlab { };
|
|
|
|
|
2020-04-29 14:12:59 +01:00
|
|
|
# manylinux requires nixpkgs with https://github.com/NixOS/nixpkgs/pull/75763
|
|
|
|
# Once this is available in 19.09 and unstable we can re-enable the manylinux test
|
|
|
|
manylinux = callTest ./manylinux { };
|
2022-05-13 07:31:18 -04:00
|
|
|
shapely = callTest ./shapely { };
|
2023-01-30 14:36:52 +13:00
|
|
|
shapely-pre-2 = callTest ./shapely-pre-2 { };
|
2022-09-29 20:39:37 +03:00
|
|
|
setuptools = callTest ./setuptools { };
|
2022-10-07 09:37:55 +03:00
|
|
|
|
2023-01-30 14:19:58 +13:00
|
|
|
affine = callTest ./affine { };
|
2023-01-30 14:16:09 +13:00
|
|
|
affine-pre-2-4 = callTest ./affine-pre-2-4 { };
|
2022-12-13 15:41:58 +13:00
|
|
|
gdal = callTest ./gdal { };
|
2023-04-01 06:37:23 -04:00
|
|
|
gitlint-core = callTest ./gitlint-core { };
|
2023-03-27 14:11:57 +13:00
|
|
|
gitlint = callTest ./gitlint { };
|
2023-03-29 12:11:48 +13:00
|
|
|
jupyter-ydoc = callTest ./jupyter-ydoc { };
|
2023-03-27 15:59:53 +13:00
|
|
|
mutmut = callTest ./mutmut { };
|
2022-12-13 15:45:52 +13:00
|
|
|
rasterio = callTest ./rasterio { };
|
2022-10-07 09:37:55 +03:00
|
|
|
scientific = callTest ./scientific { };
|
2022-10-20 11:16:42 +00:00
|
|
|
scipy1_9 = callTest ./scipy1_9 { };
|
2022-10-09 07:11:17 -04:00
|
|
|
test-group = callTest ./test-group { };
|
2022-12-17 09:15:34 -05:00
|
|
|
nbconvert-wheel = callTest ./nbconvert-wheel { };
|
2022-12-17 09:55:11 -05:00
|
|
|
duckdb-wheel = callTest ./duckdb-wheel { };
|
2023-02-21 15:49:49 +13:00
|
|
|
fiona-source = callTest ./fiona-source { };
|
2022-12-17 08:34:44 -05:00
|
|
|
fiona-wheel = callTest ./fiona-wheel { };
|
2022-12-17 15:17:52 -05:00
|
|
|
shapely-wheel = callTest ./shapely-wheel { };
|
2022-12-18 10:39:28 -05:00
|
|
|
cffi-pandas-wheel = callTest ./cffi-pandas-wheel { };
|
2022-12-17 09:40:38 -05:00
|
|
|
pyarrow-wheel = callTest ./pyarrow-wheel { };
|
2022-12-20 09:31:32 -05:00
|
|
|
mkdocstrings-wheel = callTest ./mkdocstrings-wheel { };
|
2022-12-11 12:15:55 -05:00
|
|
|
test-extras = callTest ./test-extras { };
|
|
|
|
test-no-extras = callTest ./test-no-extras { };
|
2023-01-07 06:55:30 -05:00
|
|
|
missing-iswheel = callTest ./missing-iswheel { };
|
2022-12-17 10:41:33 -05:00
|
|
|
wheel-wheel = callTest ./wheel-wheel { };
|
2023-01-12 08:13:51 -05:00
|
|
|
fancycompleter-wheel = callTest ./fancycompleter-wheel { };
|
2023-02-15 14:17:21 +13:00
|
|
|
matplotlib-pre-3-7 = callTest ./matplotlib-pre-3-7 { };
|
2023-02-15 14:29:53 +13:00
|
|
|
matplotlib-post-3-7 = callTest ./matplotlib-post-3-7 { };
|
2023-02-22 12:08:24 +13:00
|
|
|
rfc3986-validator = callTest ./rfc3986-validator { };
|
2023-02-13 10:52:07 +13:00
|
|
|
virtualenv-pre-20-18 = callTest ./virtualenv-pre-20-18 { };
|
2023-02-13 11:13:24 +13:00
|
|
|
virtualenv-post-20-18 = callTest ./virtualenv-post-20-18 { };
|
2022-12-17 17:53:19 -05:00
|
|
|
grpcio-wheel = callTest ./grpcio-wheel { };
|
2022-12-18 07:44:07 -05:00
|
|
|
panel-wheels = callTest ./panel-wheels { };
|
2020-05-19 21:06:02 +01:00
|
|
|
}
|
|
|
|
skipTests
|