summary refs log tree commit diff
path: root/pkgs/development/python-modules/trollius
diff options
context:
space:
mode:
authorBen Wolsieffer <benwolsieffer@gmail.com>2018-09-02 23:40:36 -0400
committerBen Wolsieffer <benwolsieffer@gmail.com>2018-10-11 18:15:16 -0400
commit820feccb18ba0948b7d077bccb13b2912b168873 (patch)
tree1f8228505d4d2d66ecfda359f90445415c2ed76f /pkgs/development/python-modules/trollius
parentfcaae4fc356adf6ca8c9708fa7939a0a97cffd92 (diff)
downloadnixpkgs-820feccb18ba0948b7d077bccb13b2912b168873.tar
nixpkgs-820feccb18ba0948b7d077bccb13b2912b168873.tar.gz
nixpkgs-820feccb18ba0948b7d077bccb13b2912b168873.tar.bz2
nixpkgs-820feccb18ba0948b7d077bccb13b2912b168873.tar.lz
nixpkgs-820feccb18ba0948b7d077bccb13b2912b168873.tar.xz
nixpkgs-820feccb18ba0948b7d077bccb13b2912b168873.tar.zst
nixpkgs-820feccb18ba0948b7d077bccb13b2912b168873.zip
pythonPackages.trollius: 1.0.4 -> 2.2
Diffstat (limited to 'pkgs/development/python-modules/trollius')
-rw-r--r--pkgs/development/python-modules/trollius/default.nix56
1 files changed, 30 insertions, 26 deletions
diff --git a/pkgs/development/python-modules/trollius/default.nix b/pkgs/development/python-modules/trollius/default.nix
index 6d43aa8da86..01ad57e55d7 100644
--- a/pkgs/development/python-modules/trollius/default.nix
+++ b/pkgs/development/python-modules/trollius/default.nix
@@ -1,45 +1,49 @@
-{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27, isPyPy, mock, futures  }:
+{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k, mock, unittest2, six, futures }:
+
 buildPythonPackage rec {
   pname = "trollius";
-  version = "1.0.4";
+  version = "2.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0xny8y12x3wrflmyn6xi8a7n3m3ac80fgmgzphx5jbbaxkjcm148";
+    sha256 = "093978388qvw5hyscbbj062dbdc2761xs9yzrq26mh63g689lnxk";
   };
 
-  checkInputs = [ mock ];
+  checkInputs = [ mock ] ++ lib.optional (!isPy3k) unittest2;
 
-  propagatedBuildInputs = lib.optionals (isPy27 || isPyPy) [ futures ];
+  propagatedBuildInputs = [ six ] ++ lib.optional (!isPy3k) futures;
 
   patches = [
     ./tests.patch
   ];
 
-  # Some of the tests fail on darwin with `error: AF_UNIX path too long'
-  # because of the *long* path names for sockets
-  patchPhase = lib.optionalString stdenv.isDarwin ''
-      sed -i -e "s|test_create_ssl_unix_connection|skip_test_create_ssl_unix_connection|g" tests/test_events.py
-      sed -i -e "s|test_create_unix_connection|skip_test_create_unix_connection|g" tests/test_events.py
-      sed -i -e "s|test_create_unix_server_existing_path_nonsock|skip_test_create_unix_server_existing_path_nonsock|g" tests/test_unix_events.py
-      sed -i -e "s|test_create_unix_server_existing_path_sock|skip_test_create_unix_server_existing_path_sock|g" tests/test_unix_events.py
-      sed -i -e "s|test_create_unix_server_ssl_verified|skip_test_create_unix_server_ssl_verified|g" tests/test_events.py
-      sed -i -e "s|test_create_unix_server_ssl_verify_failed|skip_test_create_unix_server_ssl_verify_failed|g" tests/test_events.py
-      sed -i -e "s|test_create_unix_server_ssl|skip_test_create_unix_server_ssl|g" tests/test_events.py
-      sed -i -e "s|test_create_unix_server|skip_test_create_unix_server|g" tests/test_events.py
-      sed -i -e "s|test_open_unix_connection_error|skip_test_open_unix_connection_error|g" tests/test_streams.py
-      sed -i -e "s|test_open_unix_connection_no_loop_ssl|skip_test_open_unix_connection_no_loop_ssl|g" tests/test_streams.py
-      sed -i -e "s|test_open_unix_connection|skip_test_open_unix_connection|g" tests/test_streams.py
-      sed -i -e "s|test_pause_reading|skip_test_pause_reading|g" tests/test_subprocess.py
-      sed -i -e "s|test_read_pty_output|skip_test_read_pty_output|g" tests/test_events.py
-      sed -i -e "s|test_start_unix_server|skip_test_start_unix_server|g" tests/test_streams.py
-      sed -i -e "s|test_unix_sock_client_ops|skip_test_unix_sock_client_ops|g" tests/test_events.py
-      sed -i -e "s|test_write_pty|skip_test_write_pty|g" tests/test_events.py
+  postPatch = ''
+    # Overrides PYTHONPATH causing dependencies not to be found
+    sed -i -e "s|test_env_var_debug|skip_test_env_var_debug|g" tests/test_tasks.py
+  '' + lib.optionalString stdenv.isDarwin ''
+    # Some of the tests fail on darwin with `error: AF_UNIX path too long'
+    # because of the *long* path names for sockets
+    sed -i -e "s|test_create_ssl_unix_connection|skip_test_create_ssl_unix_connection|g" tests/test_events.py
+    sed -i -e "s|test_create_unix_connection|skip_test_create_unix_connection|g" tests/test_events.py
+    sed -i -e "s|test_create_unix_server_existing_path_nonsock|skip_test_create_unix_server_existing_path_nonsock|g" tests/test_unix_events.py
+    sed -i -e "s|test_create_unix_server_existing_path_sock|skip_test_create_unix_server_existing_path_sock|g" tests/test_unix_events.py
+    sed -i -e "s|test_create_unix_server_ssl_verified|skip_test_create_unix_server_ssl_verified|g" tests/test_events.py
+    sed -i -e "s|test_create_unix_server_ssl_verify_failed|skip_test_create_unix_server_ssl_verify_failed|g" tests/test_events.py
+    sed -i -e "s|test_create_unix_server_ssl|skip_test_create_unix_server_ssl|g" tests/test_events.py
+    sed -i -e "s|test_create_unix_server|skip_test_create_unix_server|g" tests/test_events.py
+    sed -i -e "s|test_open_unix_connection_error|skip_test_open_unix_connection_error|g" tests/test_streams.py
+    sed -i -e "s|test_open_unix_connection_no_loop_ssl|skip_test_open_unix_connection_no_loop_ssl|g" tests/test_streams.py
+    sed -i -e "s|test_open_unix_connection|skip_test_open_unix_connection|g" tests/test_streams.py
+    sed -i -e "s|test_pause_reading|skip_test_pause_reading|g" tests/test_subprocess.py
+    sed -i -e "s|test_read_pty_output|skip_test_read_pty_output|g" tests/test_events.py
+    sed -i -e "s|test_start_unix_server|skip_test_start_unix_server|g" tests/test_streams.py
+    sed -i -e "s|test_unix_sock_client_ops|skip_test_unix_sock_client_ops|g" tests/test_events.py
+    sed -i -e "s|test_write_pty|skip_test_write_pty|g" tests/test_events.py
   '';
 
   meta = with stdenv.lib; {
-    description = "Port of the Tulip project (asyncio module, PEP 3156) on Python 2";
-    homepage = "https://bitbucket.org/enovance/trollius";
+    description = "Port of the asyncio project to Python 2.7";
+    homepage = https://github.com/vstinner/trollius;
     license = licenses.asl20;
     maintainers = with maintainers; [ garbas ];
   };