bmcage / odes

The ODES scikit for ordinary differential and algebraic equations, an extension to scipy
https://scikits-odes.readthedocs.io/
Other
122 stars 44 forks source link

Install from nix doesn't work #141

Closed goatchurchprime closed 2 months ago

goatchurchprime commented 1 year ago

Instructions given here: https://scikits-odes.readthedocs.io/en/stable/installation.html#using-nix but updated to python310

> nix-shell -p python310
> nix-shell -p python310Packages.numpy
> nix-shell -p python310Packages.scikits-odes
> python
>>> import scikits.odes
ModuleNotFoundError

It's possible there's a compiler error:

INFO: CCompilerOpt.cache_flush[857] : write cache to path -> /build/scikits.odes-2.6.4/build/temp.linux-x86_64-cpython-310/ccompiler_opt_cache_ext.py
error: builder for '/nix/store/s0mwadpzrjhskd1pnj6z9l4mmdrwmdpy-python3.10-scikits.odes-2.6.4.drv' failed with exit code 1;

I don't know much about the build process, but it does a partial recompile every time I try to install it, which seems to mean the package is not happy. It would be nice if it gave more of an indication that I would be wasting my time going into python and looking for a package that it knows I want but isn't there. So it could be useful to add a pythonImportsCheck parameter into its buildPythonPackage call https://github.com/NixOS/nixpkgs/blob/nixos-22.05/pkgs/development/python-modules/scikits-odes/default.nix#L38

aragilar commented 1 year ago

Happy to accept a PR which fixes it (the nix instructions were added in https://github.com/bmcage/odes/pull/102, and the nix packaging isn't managed by us).

goatchurchprime commented 1 year ago

After getting a lot of help, this seems to work flake.zip

aragilar commented 2 months ago

It's not clear to me that there's anything we can do here, #146 makes the nix support more explicit that it is a third-party who has set this up.