depot/third_party/nixpkgs/pkgs/development/python-modules/pexpect/default.nix
Default email 2ce89355c3 Project import generated by Copybara.
GitOrigin-RevId: 22a81aa5fc15b2d41b12f7160a71cd4a9f3c3fa1
2020-06-15 17:56:04 +02:00

48 lines
1.7 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, ptyprocess
, isPy3k
}:
buildPythonPackage (rec {
pname = "pexpect";
version = "4.8.0";
src = fetchPypi {
inherit pname version;
sha256 = "fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c";
};
# Wants to run pythonin a subprocess
doCheck = false;
propagatedBuildInputs = [ ptyprocess ];
meta = with lib; {
homepage = "http://www.noah.org/wiki/Pexpect";
description = "Automate interactive console applications such as ssh, ftp, etc";
license = licenses.mit;
maintainers = with maintainers; [ zimbatm ];
longDescription = ''
Pexpect is similar to the Don Libes "Expect" system, but Pexpect
as a different interface that is easier to understand. Pexpect
is basically a pattern matching system. It runs programs and
watches output. When output matches a given pattern Pexpect can
respond as if a human were typing responses. Pexpect can be used
for automation, testing, and screen scraping. Pexpect can be
used for automating interactive console applications such as
ssh, ftp, passwd, telnet, etc. It can also be used to control
web applications via "lynx", "w3m", or some other text-based web
browser. Pexpect is pure Python. Unlike other Expect-like
modules for Python Pexpect does not require TCL or Expect nor
does it require C extensions to be compiled. It should work on
any platform that supports the standard Python pty module.
'';
};
# TODO: move into main set, this was to avoid a rebuild
} // lib.optionalAttrs (!isPy3k ) {
# syntax error in _async module, likely intended only for Python 3.
dontUsePythonRecompileBytecode = !isPy3k;
})