2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
parameterized,
|
|
|
|
ply,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyomo";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "6.7.3";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "pyomo";
|
|
|
|
owner = "pyomo";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-6qpJH6WkrTzsDCtvoGMzZgw1UeSIIyI3jSA8JMsUC4E=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [ ply ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
parameterized
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "pyomo" ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d);
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Don't test the documentation and the examples
|
|
|
|
"doc/"
|
|
|
|
"examples/"
|
|
|
|
# Tests don't work properly in the sandbox
|
|
|
|
"pyomo/environ/tests/test_environ.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test requires lsb_release
|
|
|
|
"test_get_os_version"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2022-04-27 09:35:20 +00:00
|
|
|
description = "Python Optimization Modeling Objects";
|
2024-05-15 15:35:15 +00:00
|
|
|
homepage = "http://www.pyomo.org/";
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/Pyomo/pyomo/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2024-05-15 15:35:15 +00:00
|
|
|
mainProgram = "pyomo";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|