1{
2 lib,
3 buildPythonPackage,
4 cython,
5 fetchFromGitHub,
6 parameterized,
7 ply,
8 pybind11,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools,
12 writableTmpDirAsHomeHook,
13}:
14
15buildPythonPackage rec {
16 pname = "pyomo";
17 version = "6.9.4";
18 pyproject = true;
19
20 disabled = pythonOlder "3.9";
21
22 src = fetchFromGitHub {
23 repo = "pyomo";
24 owner = "pyomo";
25 tag = version;
26 hash = "sha256-iH6vxxA/CdPCXqiw3BUmhUwhS2hfwaJy5jIic4id0Jw=";
27 };
28
29 build-system = [
30 cython
31 pybind11
32 setuptools
33 ];
34
35 dependencies = [ ply ];
36
37 nativeCheckInputs = [
38 parameterized
39 pytestCheckHook
40 writableTmpDirAsHomeHook
41 ];
42
43 pythonImportsCheck = [ "pyomo" ];
44
45 disabledTestPaths = [
46 # Don't test the documentation and the examples
47 "doc/"
48 "examples/"
49 # Tests don't work properly in the sandbox
50 "pyomo/environ/tests/test_environ.py"
51 ];
52
53 disabledTests = [
54 # Test requires lsb_release
55 "test_get_os_version"
56 ];
57
58 meta = with lib; {
59 description = "Python Optimization Modeling Objects";
60 homepage = "http://www.pyomo.org/";
61 changelog = "https://github.com/Pyomo/pyomo/releases/tag/${src.tag}";
62 license = licenses.bsd3;
63 maintainers = [ ];
64 mainProgram = "pyomo";
65 };
66}