Add test for PEP 600

This commit is contained in:
Sem Mulder 2022-03-28 23:41:14 +02:00
parent 8bee2d9d83
commit d687e93cb9
5 changed files with 2229 additions and 0 deletions

View file

@ -739,6 +739,10 @@ lib.composeManyExtensions [
}
);
jupyter-packaging = super.jupyter-packaging.overridePythonAttrs (old: {
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.wheel ];
});
jupyterlab-widgets = super.jupyterlab-widgets.overridePythonAttrs (
old: rec {
buildInputs = (old.buildInputs or [ ]) ++ [ self.jupyter-packaging ];
@ -1089,6 +1093,14 @@ lib.composeManyExtensions [
}
);
open3d = super.open3d.overridePythonAttrs (old: {
buildInputs = (old.buildInputs or [ ]) ++ (with pkgs; [
udev
]);
# TODO(Sem Mulder): Add overridable flags for CUDA/PyTorch/Tensorflow support.
autoPatchelfIgnoreMissingDeps = true;
});
opencv-python = super.opencv-python.overridePythonAttrs (
old: {
nativeBuildInputs = [ pkgs.cmake ] ++ old.nativeBuildInputs;

View file

@ -31,6 +31,7 @@ builtins.removeAttrs
common-pkgs-1 = callTest ./common-pkgs-1 { };
common-pkgs-2 = callTest ./common-pkgs-2 { };
pep425 = pkgs.callPackage ./pep425 { inherit pep425; inherit pep425OSX; inherit pep425Python37; };
pep600 = callTest ./pep600 { };
env = callTest ./env { };
pytest-randomly = callTest ./pytest-randomly { };
file-src-deps = callTest ./file-src-deps { };

19
tests/pep600/default.nix Normal file
View file

@ -0,0 +1,19 @@
{ lib, poetry2nix, python3, runCommand }:
let
env = poetry2nix.mkPoetryEnv {
python = python3;
preferWheels = true;
pyproject = ./pyproject.toml;
poetrylock = ./poetry.lock;
overrides = poetry2nix.overrides.withDefaults (self: super: {
threadpoolctl = super.threadpoolctl.overridePythonAttrs (old: {
format = "wheel";
});
});
};
in
runCommand "pep600-test"
{ } ''
${env}/bin/python -c 'import open3d; print(open3d.__version__)'
touch $out
''

2181
tests/pep600/poetry.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,16 @@
[tool.poetry]
name = "test-pep600"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = "^3.9"
open3d = "=0.15.2"
jupyter-packaging = "<0.12.0"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"