1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 cython,
6 ipopt,
7 numpy,
8 pkg-config,
9 pytestCheckHook,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "cyipopt";
15 version = "1.6.1";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "mechmotum";
20 repo = "cyipopt";
21 tag = "v${version}";
22 hash = "sha256-feGGAwhNw+xZrSsag2W5nruQWAC6NP9k4F0X9EjaRTg=";
23 };
24
25 nativeBuildInputs = [ pkg-config ];
26
27 buildInputs = [ ipopt ];
28
29 build-system = [
30 cython
31 numpy
32 setuptools
33 ];
34
35 dependencies = [ numpy ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 pythonImportsCheck = [ "cyipopt" ];
40
41 meta = {
42 description = "Cython interface for the interior point optimzer IPOPT";
43 homepage = "https://github.com/mechmotum/cyipopt";
44 changelog = "https://github.com/mechmotum/cyipopt/blob/${src.tag}/CHANGELOG.rst";
45 license = lib.licenses.epl20;
46 maintainers = with lib.maintainers; [ nim65s ];
47 };
48}