Unverified Commit 64c6a82f authored by Emily's avatar Emily Committed by GitHub
Browse files

Merge pull request #330762 from pyrox0/denose/envs

python312Packages.envs: Drop nose dependency; modernize
parents b6f30324 5dc703c7
Loading
Loading
Loading
Loading
+9 −23
Original line number Diff line number Diff line
@@ -4,10 +4,8 @@
  click,
  fetchPypi,
  jinja2,
  mock,
  nose,
  pytestCheckHook,
  poetry-core,
  pythonOlder,
  terminaltables,
}:

@@ -16,44 +14,32 @@ buildPythonPackage rec {
  version = "1.4";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-nYQ1xphdHN1oKZ4ExY4r24rmz2ayWWqAeeb5qT8qA5g=";
  };

  nativeBuildInputs = [ poetry-core ];
  build-system = [ poetry-core ];

  propagatedBuildInputs = [
  dependencies = [
    click
    jinja2
    terminaltables
  ];

  # test rely on nose
  doCheck = pythonOlder "3.12";

  nativeCheckInputs = [
    mock
    nose
  ];

  checkPhase = ''
    runHook preCheck
  nativeCheckInputs = [ pytestCheckHook ];

    nosetests --with-isolation
  pytestFlagsArray = [ "envs/tests.py" ];

    runHook postCheck
  '';
  disabledTests = [ "test_list_envs" ];

  pythonImportsCheck = [ "envs" ];

  meta = with lib; {
  meta = {
    description = "Easy access to environment variables from Python";
    mainProgram = "envs";
    homepage = "https://github.com/capless/envs";
    license = licenses.asl20;
    maintainers = with maintainers; [ peterhoeg ];
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ peterhoeg ];
  };
}