Unverified Commit 90275986 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

python310Packages.pulp: disable on older Python releases

- prepare to run the tests
parent 2435d48a
Loading
Loading
Loading
Loading
+32 −12
Original line number Diff line number Diff line
{ lib
, fetchPypi
, amply
, buildPythonPackage
, fetchFromGitHub
, pyparsing
, amply
, 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
  ];

  checkInputs = [
    pytestCheckHook
  ];

  # only one test that requires an extra
  doCheck = false;
  pythonImportsCheck = [ "pulp" ];
  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 ];
  };
}