Closed pasqui23 closed 4 years ago
~This is the exact same issue as https://github.com/nix-community/poetry2nix/issues/41#issuecomment-577143862.~
~I suggest you add setuptools-scm
to your environment.~
I should have read the error report before saying anything.
So the core problem is that poetry does not handle setup_requires
and doesn't put it into the lock file.
There are 2 solutions to this problem:
Build from source with pytest-runner
from nixpkgs:
env=poetry2nix.mkPoetryEnv {
poetrylock = ./poetry.lock;
python = python3;
overrides = [
poetry2nix.defaultPoetryOverrides
(self: super: {
faker = super.faker.overridePythonAttrs(old: {
buildInputs = old.buildInputs ++ [
self.pytestrunner
];
});
})
];
};
Use the pypi wheel
env=poetry2nix.mkPoetryEnv {
poetrylock = ./poetry.lock;
python = python3;
overrides = [
poetry2nix.defaultPoetryOverrides
(self: super: {
faker = super.faker.override { preferWheel = true; };
})
];
};
Closed in 6d8ba34f4f382e20fa16b0b919c38fddde60a8e2
Something similar happened to me just now with matplotlib. They require certifi
in setup_requires
now: https://github.com/matplotlib/matplotlib/blob/7cfdbe121f6e82e33e10e79996f3d51974b39429/setup.py#L289
The
nix-buiild -f . env
fails withGiven the following poetry.lock
And the following default.nix: