From f75de3890d92f9b84e50b25e58ba553acd99f071 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Thu, 26 Oct 2023 05:51:34 -0400 Subject: [PATCH] feat(plyvel): support building plyvel --- overrides/default.nix | 4 ++++ tests/default.nix | 1 + tests/plyvel/default.nix | 10 ++++++++++ tests/plyvel/poetry.lock | 21 +++++++++++++++++++++ tests/plyvel/pyproject.toml | 13 +++++++++++++ 5 files changed, 49 insertions(+) create mode 100644 tests/plyvel/default.nix create mode 100644 tests/plyvel/poetry.lock create mode 100644 tests/plyvel/pyproject.toml diff --git a/overrides/default.nix b/overrides/default.nix index 06586ac23..5f3dce2fa 100644 --- a/overrides/default.nix +++ b/overrides/default.nix @@ -1980,6 +1980,10 @@ lib.composeManyExtensions [ } ); + plyvel = super.plyvel.overridePythonAttrs (old: { + buildInputs = old.buildInputs or [ ] ++ [ pkgs.leveldb ]; + }); + poetry-plugin-export = super.poetry-plugin-export.overridePythonAttrs (_old: { dontUsePythonImportsCheck = true; pipInstallFlags = [ diff --git a/tests/default.nix b/tests/default.nix index de2ac99b3..63fe9b999 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -143,6 +143,7 @@ in pytesseract = callTest ./pytesseract { }; sphinx5 = callTest ./sphinx5 { }; subdirectory = callTest ./subdirectory { }; + plyvel = callTest ./plyvel { }; } // lib.optionalAttrs (!stdenv.isDarwin) { # Test deadlocks on darwin, sandboxing issue? dependency-environment = callTest ./dependency-environment { }; diff --git a/tests/plyvel/default.nix b/tests/plyvel/default.nix new file mode 100644 index 000000000..d91bef896 --- /dev/null +++ b/tests/plyvel/default.nix @@ -0,0 +1,10 @@ +{ lib, poetry2nix, python3, runCommand }: +let + env = poetry2nix.mkPoetryEnv { + python = python3; + projectDir = ./.; + }; +in +runCommand "plyvel-test" { } '' + "${lib.getExe env}" -c 'import plyvel; print(plyvel.__version__)' > $out +'' diff --git a/tests/plyvel/poetry.lock b/tests/plyvel/poetry.lock new file mode 100644 index 000000000..08ae5072d --- /dev/null +++ b/tests/plyvel/poetry.lock @@ -0,0 +1,21 @@ +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. + +[[package]] +name = "plyvel" +version = "1.5.0" +description = "Plyvel, a fast and feature-rich Python interface to LevelDB" +optional = false +python-versions = "*" +files = [ + {file = "plyvel-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:92d949ec657f58e966ee5cc58ea51c436b61e43b86247656f1b6d4a987782a35"}, + {file = "plyvel-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48df7416267977641e9ff82a2bce022e6f5e91889eae95322685fccf6ec9a3d7"}, + {file = "plyvel-1.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3b5ddaaa7b019db805a74cba52c39d88dd6447add1cb2620b0195115e4aa68b"}, + {file = "plyvel-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c480b57848e31c2e47029d3fb0f57ad4fc6a9204867e51bbdcf81a62df75de4b"}, + {file = "plyvel-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb217f52215ac715091396bcbaf645d4ef8eb4b5dd9f96ef01abc0aaed45e2ca"}, + {file = "plyvel-1.5.0.tar.gz", hash = "sha256:cd918e0b31690abcd3d202a8742caf951ab2fe1573de7af71c38456847f9202b"}, +] + +[metadata] +lock-version = "2.0" +python-versions = "^3.9" +content-hash = "bbde38f9e147570655c97d136a05d45e940dc3ead5e1be1992def9e2deb5bc40" diff --git a/tests/plyvel/pyproject.toml b/tests/plyvel/pyproject.toml new file mode 100644 index 000000000..1a0d747b2 --- /dev/null +++ b/tests/plyvel/pyproject.toml @@ -0,0 +1,13 @@ +[tool.poetry] +name = "plyvel-test" +version = "0.1.0" +description = "Test of python wheel-wheel package" +authors = ["Your Name "] + +[tool.poetry.dependencies] +python = "^3.9" +plyvel = "^1.5.0" + +[build-system] +requires = ["poetry-core>=1"] +build-backend = "poetry.core.masonry.api"