about summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/aiohttp-socks/default.nix25
-rw-r--r--pkgs/development/python-modules/aiorpcx/default.nix25
-rw-r--r--pkgs/development/python-modules/mysql-connector/default.nix4
-rw-r--r--pkgs/development/python-modules/progressbar2/default.nix27
-rw-r--r--pkgs/development/python-modules/python-utils/default.nix22
-rw-r--r--pkgs/development/python-modules/pywal/default.nix9
6 files changed, 79 insertions, 33 deletions
diff --git a/pkgs/development/python-modules/aiohttp-socks/default.nix b/pkgs/development/python-modules/aiohttp-socks/default.nix
new file mode 100644
index 000000000000..f898c9313e1f
--- /dev/null
+++ b/pkgs/development/python-modules/aiohttp-socks/default.nix
@@ -0,0 +1,25 @@
+{ lib, fetchPypi, buildPythonPackage, pythonOlder, aiohttp }:
+
+buildPythonPackage rec {
+  pname = "aiohttp-socks";
+  version = "0.2.2";
+
+  src = fetchPypi {
+    inherit version;
+    pname = "aiohttp_socks";
+    sha256 = "0473702jk66xrgpm28wbdgpnak4v0dh2qmdjw7ky7hf3lwwqkggf";
+  };
+
+  propagatedBuildInputs = [ aiohttp ];
+
+  # Checks needs internet access
+  doCheck = false;
+
+  disabled = pythonOlder "3.5.3";
+
+  meta = {
+    description = "SOCKS proxy connector for aiohttp";
+    license = lib.licenses.asl20;
+    homepage = https://github.com/romis2012/aiohttp-socks;
+  };
+}
diff --git a/pkgs/development/python-modules/aiorpcx/default.nix b/pkgs/development/python-modules/aiorpcx/default.nix
new file mode 100644
index 000000000000..1c5d651264e0
--- /dev/null
+++ b/pkgs/development/python-modules/aiorpcx/default.nix
@@ -0,0 +1,25 @@
+{ lib, fetchPypi, buildPythonPackage, pythonOlder, attrs }:
+
+buildPythonPackage rec {
+  pname = "aiorpcx";
+  version = "0.10.2";
+
+  src = fetchPypi {
+    inherit version;
+    pname = "aiorpcX";
+    sha256 = "1p88k15jh0d2a18pnnbfcamsqi2bxvmmhpizmdlxfdxf8vy5ggyj";
+  };
+
+  propagatedBuildInputs = [ attrs ];
+
+  disabled = pythonOlder "3.6";
+
+  # Checks needs internet access
+  doCheck = false;
+
+  meta = {
+    description = "Transport, protocol and framing-independent async RPC client and server implementation";
+    license = lib.licenses.mit;
+    homepage = https://github.com/kyuupichan/aiorpcX;
+  };
+}
diff --git a/pkgs/development/python-modules/mysql-connector/default.nix b/pkgs/development/python-modules/mysql-connector/default.nix
index 579fc4631f66..2c0a83c62e3e 100644
--- a/pkgs/development/python-modules/mysql-connector/default.nix
+++ b/pkgs/development/python-modules/mysql-connector/default.nix
@@ -4,13 +4,13 @@
 
 buildPythonPackage rec {
   pname = "mysql-connector";
-  version = "8.0.13";
+  version = "8.0.14";
 
   src = fetchFromGitHub {
     owner = "mysql";
     repo = "mysql-connector-python";
     rev = version;
-    sha256 = "1qb6m3cp6zxmr49bp6g5g5b75yszgac1h26i2hza61mrvd235688";
+    sha256 = "1cf0ic2mx339j62579xjlaw5q5sz61dac379c7lsy3ln3krsw3y9";
   };
 
   propagatedBuildInputs = [ protobuf ];
diff --git a/pkgs/development/python-modules/progressbar2/default.nix b/pkgs/development/python-modules/progressbar2/default.nix
index 18fb14c3aa9a..362e73c0d71e 100644
--- a/pkgs/development/python-modules/progressbar2/default.nix
+++ b/pkgs/development/python-modules/progressbar2/default.nix
@@ -1,39 +1,38 @@
 { stdenv
 , python
 , buildPythonPackage
-, fetchFromGitHub
+, fetchPypi
 , pytest
 , python-utils
 , sphinx
-, coverage
-, execnet
 , flake8
 , pytestpep8
 , pytestflakes
 , pytestcov
 , pytestcache
-, pep8
 , pytestrunner
+, freezegun
 }:
 
 buildPythonPackage rec {
   pname = "progressbar2";
-  version = "3.12.0";
+  version = "3.39.2";
 
-  # Use source from GitHub, PyPI is missing tests
-  # https://github.com/WoLpH/python-progressbar/issues/151
-  src = fetchFromGitHub {
-    owner = "WoLpH";
-    repo = "python-progressbar";
-    rev = "v${version}";
-    sha256 = "1gk45sh8cd0kkyvzcvx95z6nlblmyx0x189mjfv3vfa43cr1mb0f";
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "6eb5135b987caca4212d2c7abc2923d4ad5ba18bb34ccbe7044b3628f52efc2c";
   };
 
+  postPatch = ''
+    rm -r tests/__pycache__
+    rm tests/*.pyc
+  '';
+
   propagatedBuildInputs = [ python-utils ];
   nativeBuildInputs = [ pytestrunner ];
   checkInputs = [
-    pytest sphinx coverage execnet flake8 pytestpep8 pytestflakes pytestcov
-    pytestcache pep8
+    pytest sphinx flake8 pytestpep8 pytestflakes pytestcov
+    pytestcache freezegun
   ];
   # ignore tests on the nix wrapped setup.py and don't flake .eggs directory
   checkPhase = ''
diff --git a/pkgs/development/python-modules/python-utils/default.nix b/pkgs/development/python-modules/python-utils/default.nix
index b7744ce79c3b..7aa776540061 100644
--- a/pkgs/development/python-modules/python-utils/default.nix
+++ b/pkgs/development/python-modules/python-utils/default.nix
@@ -1,29 +1,23 @@
-{ lib, buildPythonPackage, fetchFromGitHub, pytest, pytestrunner, pytestcov, pytestflakes, pytestpep8, sphinx, six }:
+{ lib, buildPythonPackage, fetchPypi, pytest, pytestrunner, pytestcov, pytestflakes, pytestpep8, sphinx, six }:
 
 buildPythonPackage rec {
   pname = "python-utils";
   version = "2.3.0";
-  name = pname + "-" + version;
 
-  src = fetchFromGitHub {
-    owner = "WoLpH";
-    repo = "python-utils";
-    rev = "v${version}";
-    sha256 = "14gyphcqwa77wfbnrzj363v3fdkxy08378lgd7l3jqnpvr8pfp5c";
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "34aaf26b39b0b86628008f2ae0ac001b30e7986a8d303b61e1357dfcdad4f6d3";
   };
 
-  checkInputs = [ pytest pytestrunner pytestcov pytestflakes pytestpep8 sphinx ];
-
   postPatch = ''
-    # pytest-runner is only actually required in checkPhase
-    substituteInPlace setup.py --replace "setup_requires=['pytest-runner']," ""
+    rm -r tests/__pycache__
+    rm tests/*.pyc
   '';
 
-  # Tests failing
-  doCheck = false;
+  checkInputs = [ pytest pytestrunner pytestcov pytestflakes pytestpep8 sphinx ];
 
   checkPhase = ''
-    py.test
+    py.test tests
   '';
 
   propagatedBuildInputs = [ six ];
diff --git a/pkgs/development/python-modules/pywal/default.nix b/pkgs/development/python-modules/pywal/default.nix
index 00691e65225c..7f908c943aef 100644
--- a/pkgs/development/python-modules/pywal/default.nix
+++ b/pkgs/development/python-modules/pywal/default.nix
@@ -1,10 +1,10 @@
-{ lib, python3Packages, imagemagick, feh }:
+{ lib, buildPythonPackage, fetchPypi, imagemagick, feh, isPy3k }:
 
-python3Packages.buildPythonApplication rec {
+buildPythonPackage rec {
   pname = "pywal";
   version = "3.2.1";
 
-  src = python3Packages.fetchPypi {
+  src = fetchPypi {
     inherit pname version;
     sha256 = "1pj30h19ijwhmbm941yzbkgr19q06dhp9492h9nrqw1wfjfdbdic";
   };
@@ -19,6 +19,9 @@ python3Packages.buildPythonApplication rec {
     ./feh.patch
   ];
 
+  # Invalid syntax
+  disabled = !isPy3k;
+
   postPatch = ''
     substituteInPlace pywal/backends/wal.py --subst-var-by convert "${imagemagick}/bin/convert"
     substituteInPlace pywal/wallpaper.py --subst-var-by feh "${feh}/bin/feh"