Closed tfmoraes closed 3 years ago
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/another-good-way-to-package-python-packages-from-pypi/14647/16
this is happening to me too.
I confirm this issue as well. I am trying to avoid building numpy from source using following code, but it doesn't work
pkgs.poetry2nix.mkPoetryApplication {
python = pkgs.python38;
projectDir = builtins.path { path = ./.; name = "xyz"; };
src = ./.;
doCheck = false;
overrides =
pkgs.poetry2nix.overrides.withDefaults (self: super: {
# Use Python wheel to avoid lengthy compilation from source code
numpy = super.numpy.override {
preferWheel = true;
};
});
@adisbladis , I just found that test_preferwheel.py is empty file.
But setting global preferWheels = true
works !
Example:
pkgs.poetry2nix.mkPoetryApplication {
python = pkgs.python38;
projectDir = builtins.path { path = ./.; name = "xyz"; };
src = ./.;
doCheck = false;
preferWheels = true;
I tested here and preferWheels
is working now.
Do you know if the issue with preferWheel
was ever resolved? I have been able to use preferWheels
but not preferWheel
.
I create this github repository to show this problem: https://github.com/tfmoraes/poetry2nix_test
In this repository I used Niv to lock the Nixpkgs version (last in nixos-unstable) and Poetry2nix (also the last version). The project in this repository has two dependencies: numpy and cython. It uses
poetry2nix.mkPoetryEnv
to create a python environment with those two packages installed. I set it use wheels (preferWheels = true
). But it's not using the wheels.