From 2435d48ae76113245325853a83bd70e849847a4a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 5 Nov 2022 08:36:19 +0000 Subject: [PATCH 1/2] python310Packages.pulp: 2.6.0 -> 2.7.0 --- pkgs/development/python-modules/pulp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pulp/default.nix b/pkgs/development/python-modules/pulp/default.nix index 65a179f59d6a..a0fa64d8ada0 100644 --- a/pkgs/development/python-modules/pulp/default.nix +++ b/pkgs/development/python-modules/pulp/default.nix @@ -7,11 +7,11 @@ buildPythonPackage rec { pname = "PuLP"; - version = "2.6.0"; + version = "2.7.0"; src = fetchPypi { inherit pname version; - sha256 = "4b4f7e1e954453e1b233720be23aea2f10ff068a835ac10c090a93d8e2eb2e8d"; + sha256 = "sha256-5z7msy1jnJuM9LSt7TNLoVi+X4MTVE4Fb3lqzgoQrmM="; }; propagatedBuildInputs = [ pyparsing amply ]; From 9027598655757c3eefb8ebe1757797712821fff1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 5 Nov 2022 10:31:47 +0100 Subject: [PATCH 2/2] python310Packages.pulp: disable on older Python releases - prepare to run the tests --- .../python-modules/pulp/default.nix | 46 +++++++++++++------ 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/pulp/default.nix b/pkgs/development/python-modules/pulp/default.nix index a0fa64d8ada0..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"; + pname = "pulp"; version = "2.7.0"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-5z7msy1jnJuM9LSt7TNLoVi+X4MTVE4Fb3lqzgoQrmM="; + 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 ]; }; }