git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #44571 from kalbasit/nixpkgs-update-mycli

mycli: 1.6.0 -> 1.17.0

commit746aae0e5581e9a26ea7d8feb423fb213a80a187 authorRobert Schütz <rschuetz17@gmail.com> dateTue 7 Aug 2018, 10:49 (8 years ago) parent0359f15e9cb147
4 files changed+103−29
pkgs/development/python-modules/cli-helpers/default.nix+59 pkgs/development/python-modules/pymysql/default.nix+27 pkgs/tools/admin/mycli/default.nix+13−10 pkgs/top-level/python-packages.nix+4−19
pkgs/development/python-modules/cli-helpers/default.nixnew file+59
@@ -0,0 +1,59 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, terminaltables
5+, tabulate
6+, backports_csv
7+, wcwidth
8+, pytest
9+, isPy27
10+}:
11+
12+buildPythonPackage rec {
13+ pname = "cli_helpers";
14+ version = "1.0.2";
15+
16+ src = fetchPypi {
17+ inherit pname version;
18+ sha256 = "1z5rqm8pznj6bvivm2al8rsxm82rai8hc9bqrgh3ksnbzg2kfy7p";
19+ };
20+
21+ propagatedBuildInputs = [
22+ terminaltables
23+ tabulate
24+ wcwidth
25+ ] ++ (lib.optionals isPy27 [ backports_csv ]);
26+
27+ checkInputs = [ pytest ];
28+
29+ checkPhase = ''
30+ py.test
31+ '';
32+
33+ meta = with lib; {
34+ description = "Python helpers for common CLI tasks";
35+ longDescription = ''
36+ CLI Helpers is a Python package that makes it easy to perform common
37+ tasks when building command-line apps. It's a helper library for
38+ command-line interfaces.
39+
40+ Libraries like Click and Python Prompt Toolkit are amazing tools that
41+ help you create quality apps. CLI Helpers complements these libraries by
42+ wrapping up common tasks in simple interfaces.
43+
44+ CLI Helpers is not focused on your app's design pattern or framework --
45+ you can use it on its own or in combination with other libraries. It's
46+ lightweight and easy to extend.
47+
48+ What's included in CLI Helpers?
49+
50+ - Prettyprinting of tabular data with custom pre-processing
51+ - [in progress] config file reading/writing
52+
53+ Read the documentation at http://cli-helpers.rtfd.io
54+ '';
55+ homepage = https://cli-helpers.readthedocs.io/en/stable/;
56+ license = licenses.bsd3 ;
57+ maintainers = [ maintainers.kalbasit ];
58+ };
59+}
pkgs/development/python-modules/pymysql/default.nixnew file+27
@@ -0,0 +1,27 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, cryptography
5+}:
6+
7+buildPythonPackage rec {
8+ pname = "PyMySQL";
9+ version = "0.9.2";
10+
11+ src = fetchPypi {
12+ inherit pname version;
13+ sha256 = "0gvi63f1zq1bbd30x28kqyx351hal1yc323ckp0mihainb5n1iwy";
14+ };
15+
16+ propagatedBuildInputs = [ cryptography ];
17+
18+ # Wants to connect to MySQL
19+ doCheck = false;
20+
21+ meta = with lib; {
22+ description = "Pure Python MySQL Client";
23+ homepage = https://github.com/PyMySQL/PyMySQL;
24+ license = licenses.mit;
25+ maintainers = [ maintainers.kalbasit ];
26+ };
27+}
pkgs/tools/admin/mycli/default.nix+13−10
@@ -1,28 +1,31 @@
11{ lib
2−, python
2+, python3
3+, glibcLocales
34}:
45
5−with python.pkgs;
6+with python3.pkgs;
67
78buildPythonApplication rec {
89 pname = "mycli";
9− version = "1.6.0";
10+ version = "1.17.0";
1011
1112 src = fetchPypi {
1213 inherit pname version;
13− sha256 = "0qg4b62kizyb16kk0cvpk70bfs3gg4q4hj2b15nnc7a3gqqfp67j";
14+ sha256 = "11d3ssjifms6bid77jk06zl5wl3srihijmv5kggxa0w2l59y8h9m";
1415 };
1516
1617 propagatedBuildInputs = [
17− pymysql configobj sqlparse prompt_toolkit pygments click pycrypto
18+ pymysql configobj sqlparse prompt_toolkit pygments click pycrypto cli-helpers
1819 ];
1920
20− postPatch = ''
21− substituteInPlace setup.py --replace "==" ">="
22− '';
21+ checkInputs = [ pytest mock glibcLocales ];
22+
23+ checkPhase = ''
24+ export HOME=.
25+ export LC_ALL="en_US.UTF-8"
2326
24− # No tests in archive. Newer versions do include tests
25− doCheck = false;
27+ py.test
28+ '';
2629
2730 meta = {
2831 inherit version;
pkgs/top-level/python-packages.nix+4−19
@@ -352,6 +352,8 @@ in {
352352
353353 plantuml = callPackage ../tools/misc/plantuml { };
354354
355+ pymysql = callPackage ../development/python-modules/pymysql { };
356+
355357 Pmw = callPackage ../development/python-modules/Pmw { };
356358
357359 py_stringmatching = callPackage ../development/python-modules/py_stringmatching { };
@@ -1104,6 +1106,8 @@ in {
11041106
11051107 cheroot = callPackage ../development/python-modules/cheroot {};
11061108
1109+ cli-helpers = callPackage ../development/python-modules/cli-helpers {};
1110+
11071111 cmarkgfm = callPackage ../development/python-modules/cmarkgfm { };
11081112
11091113 circus = callPackage ../development/python-modules/circus {};
@@ -8097,25 +8101,6 @@ in {
80978101 };
80988102 };
80998103
8100− pymysql = buildPythonPackage rec {
8101− name = "pymysql-${version}";
8102− version = "0.6.6";
8103− src = pkgs.fetchgit {
8104− url = https://github.com/PyMySQL/PyMySQL.git;
8105− rev = "refs/tags/pymysql-${version}";
8106− sha256 = "0kpw11rxpyyhs9b139hxhbnx9n5kzjjw10wgwvhnf9m3mv7j4n71";
8107− };
8108−
8109− buildInputs = with self; [ unittest2 ];
8110−
8111− checkPhase = ''
8112− ${python.interpreter} runtests.py
8113− '';
8114−
8115− # Wants to connect to MySQL
8116− doCheck = false;
8117− };
8118−
81198104 pymysqlsa = self.buildPythonPackage rec {
81208105 name = "pymysqlsa-${version}";
81218106 version = "1.0";