git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #41934 from teto/cmd2_0.9.1

pythonPackages.cmd2: 0.8.0 -> 0.9.1

commit27eb3c267394f4047a4c3f16e6da9a19fe0f9ff2 authorxeji <36407913+xeji@users.noreply.github.com> dateSat 14 Jul 2018, 21:50 (8 years ago) parent1c88d0c65b15ba
4 files changed+88−34
pkgs/development/python-modules/cmd2/default.nix+9−9 pkgs/development/python-modules/cmd2/old.nix+49 pkgs/development/python-modules/wcwidth/default.nix+26 pkgs/top-level/python-packages.nix+4−25
pkgs/development/python-modules/cmd2/default.nix+9−9
@@ -1,17 +1,15 @@
1−{ stdenv, fetchPypi, buildPythonPackage, pythonOlder
2−, pyperclip, six, pyparsing, vim
1+{ stdenv, fetchPypi, buildPythonPackage, pythonOlder, isPy3k
2+, pyperclip, six, pyparsing, vim, wcwidth, colorama
33, contextlib2 ? null, subprocess32 ? null
44, pytest, mock, which, fetchFromGitHub, glibcLocales
55}:
66buildPythonPackage rec {
77 pname = "cmd2";
8− version = "0.8.0";
8+ version = "0.9.1";
99
10− src = fetchFromGitHub {
11− owner = "python-cmd2";
12− repo = "cmd2";
13− rev = version;
14− sha256 = "0nw2b7n7zg51bc3glxw0l9fn91mwjnjshklhmxhyvjbsg7khf64z";
10+ src = fetchPypi {
11+ inherit pname version;
12+ sha256 = "1wpw4f9zix30hfncm0hwxjjdx78zq26x3r8s9nvsq9vnxf41xb49";
1513 };
1614
1715 LC_ALL="en_US.UTF-8";
@@ -31,14 +29,16 @@ buildPythonPackage rec {
3129 py.test -k 'not test_path_completion_user_expansion'
3230 '';
3331 doCheck = !stdenv.isDarwin;
32+ disabled = !isPy3k;
3433
3534 propagatedBuildInputs = [
35+ colorama
3636 pyperclip
3737 six
3838 pyparsing
39+ wcwidth
3940 ]
4041 ++ stdenv.lib.optional (pythonOlder "3.5") contextlib2
41− ++ stdenv.lib.optional (pythonOlder "3.0") subprocess32
4242 ;
4343
4444 meta = with stdenv.lib; {
pkgs/development/python-modules/cmd2/old.nixnew file+49
@@ -0,0 +1,49 @@
1+{ stdenv, fetchPypi, buildPythonPackage, pythonOlder
2+, pyperclip, six, pyparsing, vim
3+, contextlib2 ? null, subprocess32 ? null
4+, pytest, mock, which, fetchFromGitHub, glibcLocales
5+}:
6+buildPythonPackage rec {
7+ pname = "cmd2";
8+ version = "0.8.0";
9+
10+ src = fetchFromGitHub {
11+ owner = "python-cmd2";
12+ repo = "cmd2";
13+ rev = version;
14+ sha256 = "0nw2b7n7zg51bc3glxw0l9fn91mwjnjshklhmxhyvjbsg7khf64z";
15+ };
16+
17+ LC_ALL="en_US.UTF-8";
18+
19+ postPatch = stdenv.lib.optional stdenv.isDarwin ''
20+ # Fake the impure dependencies pbpaste and pbcopy
21+ mkdir bin
22+ echo '#/bin/sh' > bin/pbpaste
23+ echo '#/bin/sh' > bin/pbcopy
24+ chmod +x bin/{pbcopy,pbpaste}
25+ export PATH=$(realpath bin):$PATH
26+ '';
27+
28+ checkInputs= [ pytest mock which vim glibcLocales ];
29+ checkPhase = ''
30+ # test_path_completion_user_expansion might be fixed in the next release
31+ py.test -k 'not test_path_completion_user_expansion'
32+ '';
33+ doCheck = !stdenv.isDarwin;
34+
35+ propagatedBuildInputs = [
36+ pyperclip
37+ six
38+ pyparsing
39+ ]
40+ ++ stdenv.lib.optional (pythonOlder "3.5") contextlib2
41+ ++ stdenv.lib.optional (pythonOlder "3.0") subprocess32
42+ ;
43+
44+ meta = with stdenv.lib; {
45+ description = "Enhancements for standard library's cmd module";
46+ homepage = https://github.com/python-cmd2/cmd2;
47+ maintainers = with maintainers; [ teto ];
48+ };
49+}
pkgs/development/python-modules/wcwidth/default.nixnew file+26
@@ -0,0 +1,26 @@
1+{ stdenv, fetchurl, buildPythonPackage }:
2+
3+buildPythonPackage rec {
4+ name = "wcwidth-${version}";
5+ version = "0.1.7";
6+
7+ src = fetchurl {
8+ url = "mirror://pypi/w/wcwidth/${name}.tar.gz";
9+ sha256 = "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx";
10+ };
11+
12+ # Checks fail due to missing tox.ini file:
13+ doCheck = false;
14+
15+ meta = with stdenv.lib; {
16+ description = "Measures number of Terminal column cells of wide-character codes";
17+ longDescription = ''
18+ This API is mainly for Terminal Emulator implementors -- any Python
19+ program that attempts to determine the printable width of a string on
20+ a Terminal. It is implemented in python (no C library calls) and has
21+ no 3rd-party dependencies.
22+ '';
23+ homepage = https://github.com/jquast/wcwidth;
24+ license = licenses.mit;
25+ };
26+ }
pkgs/top-level/python-packages.nix+4−25
@@ -9110,7 +9110,9 @@ in {
91109110 cachetools_1 = callPackage ../development/python-modules/cachetools/1.nix {};
91119111 cachetools = callPackage ../development/python-modules/cachetools {};
91129112
9113− cmd2 = callPackage ../development/python-modules/cmd2 {};
9113+ cmd2_8 = callPackage ../development/python-modules/cmd2/old.nix {};
9114+ cmd2_9 = callPackage ../development/python-modules/cmd2 {};
9115+ cmd2 = if isPy27 then self.cmd2_8 else self.cmd2_9;
91149116
91159117 warlock = buildPythonPackage rec {
91169118 name = "warlock-${version}";
@@ -14735,30 +14737,7 @@ EOF
1473514737 imagemagick = pkgs.imagemagickBig;
1473614738 };
1473714739
14738− wcwidth = buildPythonPackage rec {
14739− name = "wcwidth-${version}";
14740− version = "0.1.6";
14741−
14742− src = pkgs.fetchurl {
14743− url = "mirror://pypi/w/wcwidth/${name}.tar.gz";
14744− sha256 = "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw";
14745− };
14746−
14747− # Checks fail due to missing tox.ini file:
14748− doCheck = false;
14749−
14750− meta = {
14751− description = "Measures number of Terminal column cells of wide-character codes";
14752− longDescription = ''
14753− This API is mainly for Terminal Emulator implementors -- any Python
14754− program that attempts to determine the printable width of a string on
14755− a Terminal. It is implemented in python (no C library calls) and has
14756− no 3rd-party dependencies.
14757− '';
14758− homepage = https://github.com/jquast/wcwidth;
14759− license = licenses.mit;
14760− };
14761− };
14740+ wcwidth = callPackage ../development/python-modules/wcwidth { };
1476214741
1476314742 web = buildPythonPackage rec {
1476414743 version = "0.37";