[RDY] pythonPackages.cmd2: 0.7.7 -> 0.8.0 (#35162)

Some cool stuff like history saving to transcripts, support for argparse
based parsers etc:
https://github.com/python-cmd2/cmd2/blob/master/CHANGELOG.md

It is now possible to run tests though many fails.
This commit is contained in:
Matthieu Coudron 2018-02-28 22:55:02 +09:00 committed by Jörg Thalheim
parent edf077d392
commit 0a672f7984
2 changed files with 50 additions and 23 deletions

View File

@ -0,0 +1,49 @@
{ stdenv, fetchPypi, buildPythonPackage, pythonOlder
, pyperclip, six, pyparsing, vim
, contextlib2 ? null, subprocess32 ? null
, pytest, mock, which, fetchFromGitHub, glibcLocales
}:
buildPythonPackage rec {
pname = "cmd2";
version = "0.8.0";
src = fetchFromGitHub {
owner = "python-cmd2";
repo = "cmd2";
rev = version;
sha256 = "0nw2b7n7zg51bc3glxw0l9fn91mwjnjshklhmxhyvjbsg7khf64z";
};
LC_ALL="en_US.UTF-8";
postPatch = stdenv.lib.optional stdenv.isDarwin ''
# Fake the impure dependencies pbpaste and pbcopy
mkdir bin
echo '#/bin/sh' > bin/pbpaste
echo '#/bin/sh' > bin/pbcopy
chmod +x bin/{pbcopy,pbpaste}
export PATH=$(realpath bin):$PATH
'';
checkInputs= [ pytest mock which vim glibcLocales ];
checkPhase = ''
# test_path_completion_user_expansion might be fixed in the next release
py.test -k 'not test_path_completion_user_expansion'
'';
doCheck = !stdenv.isDarwin;
propagatedBuildInputs = [
pyperclip
six
pyparsing
]
++ stdenv.lib.optional (pythonOlder "3.5") contextlib2
++ stdenv.lib.optional (pythonOlder "3.0") subprocess32
;
meta = with stdenv.lib; {
description = "Enhancements for standard library's cmd module";
homepage = https://github.com/python-cmd2/cmd2;
maintainers = with maintainers; [ teto ];
};
}

View File

@ -11513,29 +11513,7 @@ in {
cachetools_1 = callPackage ../development/python-modules/cachetools/1.nix {};
cachetools = callPackage ../development/python-modules/cachetools {};
cmd2 = buildPythonPackage rec {
name = "cmd2-${version}";
version = "0.7.7";
src = pkgs.fetchurl {
url = "mirror://pypi/c/cmd2/${name}.tar.gz";
sha256 = "0widbir8ay1fd4zm8l0rjq78j1cvbammbz8xs32crbanqsgzpqml";
};
# No tests included
doCheck = false;
propagatedBuildInputs = with self; [
pyperclip
six
pyparsing
];
meta = with stdenv.lib; {
description = "Enhancements for standard library's cmd module";
homepage = "http://packages.python.org/cmd2/";
};
};
cmd2 = callPackage ../development/python-modules/cmd2 {};
warlock = buildPythonPackage rec {
name = "warlock-${version}";