1{ lib
2, buildPythonPackage
3, eigen
4, nlopt
5, ipopt
6, boost
7, pagmo2
8, numpy
9, cloudpickle
10, ipyparallel
11, numba
12, python
13}:
14
15let
16 propagatedBuildInputs = [ numpy cloudpickle ipyparallel numba ];
17
18 pagmo2WithPython = pagmo2.overrideAttrs (oldAttrs: {
19 cmakeFlags = oldAttrs.cmakeFlags ++ [
20 "-DPAGMO_BUILD_PYGMO=yes"
21 "-DPAGMO_BUILD_PAGMO=no"
22 "-DPagmo_DIR=${pagmo2}"
23 ];
24 buildInputs = [ eigen nlopt ipopt boost pagmo2 ] ++ propagatedBuildInputs;
25 postInstall = ''
26 mv wheel $out
27 '';
28 });
29
30in buildPythonPackage {
31 pname = "pygmo";
32 version = pagmo2WithPython.version;
33
34 inherit propagatedBuildInputs;
35
36 src = pagmo2WithPython;
37
38 preBuild = ''
39 mv ${python.sitePackages}/pygmo wheel
40 cd wheel
41 '';
42
43 # dont do tests
44 doCheck = false;
45
46 meta = with lib; {
47 description = "Parallel optimisation for Python";
48 homepage = "https://esa.github.io/pagmo2/";
49 license = licenses.gpl3Plus;
50 maintainers = [ maintainers.costrouc ];
51 };
52}