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