diff options
author | Chris Ostrouchov <chris.ostrouchov@gmail.com> | 2018-08-10 16:43:58 -0400 |
---|---|---|
committer | Chris Ostrouchov <chris.ostrouchov@gmail.com> | 2018-08-10 16:49:06 -0400 |
commit | ff27546351e00f62dd21d0334a0df2279160d084 (patch) | |
tree | bcf9b0293ed17144156e39f00a192cfbed7209d3 /pkgs/development/python-modules/pygmo | |
parent | def307e476da03fa282633abfabfb45578700347 (diff) |
pythonPackages.pygmo: init at 2.8
- python 2.7, 3+ - skipping tests becuase none are easy to run (require some parallel workers) - fetchFromgitHub so that running tests in future is possible
Diffstat (limited to 'pkgs/development/python-modules/pygmo')
-rw-r--r-- | pkgs/development/python-modules/pygmo/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pygmo/default.nix b/pkgs/development/python-modules/pygmo/default.nix new file mode 100644 index 0000000000000..2500121dc9e68 --- /dev/null +++ b/pkgs/development/python-modules/pygmo/default.nix @@ -0,0 +1,48 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, cmake +, eigen +, nlopt +, ipopt +, boost +, pagmo2 +, numpy +, cloudpickle +, ipyparallel +, numba +}: + +buildPythonPackage rec { + pname = "pygmo"; + version = "2.8"; + + src = fetchFromGitHub { + owner = "esa"; + repo = "pagmo2"; + rev = "v${version}"; + sha256 = "1xwxamcn3fkwr62jn6bkanrwy0cvsksf75hfwx4fvl56awnbz41z"; + }; + + buildInputs = [ cmake eigen nlopt ipopt boost pagmo2 ]; + propagatedBuildInputs = [ numpy cloudpickle ipyparallel numba ]; + + preBuild = '' + cp -v -r $src/* . + cmake -DCMAKE_INSTALL_PREFIX=$out -DPAGMO_BUILD_TESTS=no -DCMAKE_SYSTEM_NAME=Linux -DPagmo_DIR=${pagmo2} -DPAGMO_BUILD_PYGMO=yes -DPAGMO_BUILD_PAGMO=no -DPAGMO_WITH_EIGEN3=yes -DPAGMO_WITH_NLOPT=yes -DNLOPT_LIBRARY=${nlopt}/lib/libnlopt_cxx.so -DPAGMO_WITH_IPOPT=yes -DIPOPT=${ipopt} + + make install + mv $out/lib/python*/site-packages/pygmo wheel + cd wheel + ''; + + # dont do tests + doCheck = false; + + meta = { + description = "Parallel optimisation for Python"; + homepage = https://esa.github.io/pagmo2/; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ costrouc ]; + }; +} |