mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 09:11:39 -05:00
Add support for non-pyproject local dependencies
We were previously assuming that pyproject.toml always exists in a local dependency. This is not the case for setup.py.
This commit is contained in:
parent
3204df6699
commit
10e417df85
1 changed files with 10 additions and 4 deletions
|
@ -47,10 +47,16 @@ pythonPackages.callPackage
|
||||||
isGit = isSource && source.type == "git";
|
isGit = isSource && source.type == "git";
|
||||||
isLocal = isSource && source.type == "directory";
|
isLocal = isSource && source.type == "directory";
|
||||||
localDepPath = toPath source.url;
|
localDepPath = toPath source.url;
|
||||||
pyProject = poetryLib.readTOML (localDepPath + "/pyproject.toml");
|
|
||||||
buildSystemPkgs = poetryLib.getBuildSystemPkgs {
|
buildSystemPkgs =
|
||||||
inherit pythonPackages pyProject;
|
let
|
||||||
};
|
pyProjectPath = localDepPath + "/pyproject.toml";
|
||||||
|
pyProject = poetryLib.readTOML pyProjectPath;
|
||||||
|
in
|
||||||
|
if builtins.pathExists pyProjectPath then poetryLib.getBuildSystemPkgs {
|
||||||
|
inherit pythonPackages pyProject;
|
||||||
|
} else [ ];
|
||||||
|
|
||||||
fileInfo =
|
fileInfo =
|
||||||
let
|
let
|
||||||
isBdist = f: lib.strings.hasSuffix "whl" f.file;
|
isBdist = f: lib.strings.hasSuffix "whl" f.file;
|
||||||
|
|
Loading…
Add table
Reference in a new issue