Skip to content

Commit

Permalink
feat(plyvel): support building plyvel
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Oct 26, 2023
1 parent 3b6124e commit f75de38
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
4 changes: 4 additions & 0 deletions overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
1 change: 1 addition & 0 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down
10 changes: 10 additions & 0 deletions tests/plyvel/default.nix
Original file line number Diff line number Diff line change
@@ -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
''
21 changes: 21 additions & 0 deletions tests/plyvel/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/plyvel/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[tool.poetry]
name = "plyvel-test"
version = "0.1.0"
description = "Test of python wheel-wheel package"
authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.9"
plyvel = "^1.5.0"

[build-system]
requires = ["poetry-core>=1"]
build-backend = "poetry.core.masonry.api"

0 comments on commit f75de38

Please sign in to comment.