diff --git a/pkgs/development/python-modules/pulp/default.nix b/pkgs/development/python-modules/pulp/default.nix index 65a179f59d6a..60fa54438f9c 100644 --- a/pkgs/development/python-modules/pulp/default.nix +++ b/pkgs/development/python-modules/pulp/default.nix @@ -1,29 +1,49 @@ { lib -, fetchPypi -, buildPythonPackage -, pyparsing , amply +, buildPythonPackage +, fetchFromGitHub +, pyparsing +, pythonOlder +, pytestCheckHook }: buildPythonPackage rec { - pname = "PuLP"; - version = "2.6.0"; + pname = "pulp"; + version = "2.7.0"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "4b4f7e1e954453e1b233720be23aea2f10ff068a835ac10c090a93d8e2eb2e8d"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "coin-or"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-j0f6OiscJyTqPNyLp0qWRjCGLWuT3HdU1S/sxpnsiMo="; }; - propagatedBuildInputs = [ pyparsing amply ]; + propagatedBuildInputs = [ + amply + pyparsing + ]; - # only one test that requires an extra - doCheck = false; - pythonImportsCheck = [ "pulp" ]; + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pulp" + ]; + + disabledTests = [ + # The solver is not available + "PULP_CBC_CMDTest" + "test_examples" + ]; meta = with lib; { + description = "Module to generate generate MPS or LP files"; homepage = "https://github.com/coin-or/pulp"; - description = "PuLP is an LP modeler written in python"; - maintainers = with maintainers; [ teto ]; license = licenses.mit; + maintainers = with maintainers; [ teto ]; }; }