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

Merge pull request #155796 from austinbutler/entrypoint2-1

python3Packages.entrypoint2: 0.2.4 -> 1.0
parents e77a40f9 71b4acaa
Loading
Loading
Loading
Loading
+4 −18
Original line number Diff line number Diff line
{ lib, buildPythonPackage, fetchPypi, EasyProcess, pathpy, pytest }:
{ lib, buildPythonPackage, fetchPypi, EasyProcess, pathpy, pytestCheckHook }:

buildPythonPackage rec {
  pname = "entrypoint2";
  version = "0.2.4";
  version = "1.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "4770c3afcf3865c606a6e5f7cfcc5c59212f555fcee9b2540270399149c1dde3";
    sha256 = "sha256-Z+kG9q2VjYP0i07ewo192CZw6SYZiPa0prY6vJ+zvlY=";
  };

  propagatedBuildInputs = [ ];

  pythonImportsCheck = [ "entrypoint2" ];

  # argparse is part of the standardlib
  prePatch = ''
    substituteInPlace setup.py --replace "argparse" ""
  '';

  checkInputs = [ EasyProcess pathpy pytest ];

  # 0.2.1 has incompatible pycache files included
  # https://github.com/ponty/entrypoint2/issues/8
  checkPhase = ''
    rm -rf tests/__pycache__
    pytest tests
  '';
  checkInputs = [ EasyProcess pathpy pytestCheckHook ];

  meta = with lib; {
    description = "Easy to use command-line interface for python modules";