Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 2.8 kB view raw
1{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k, mock, unittest2, six, futures }: 2 3buildPythonPackage rec { 4 pname = "trollius"; 5 version = "2.2.post1"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "06s44k6pcq35vl5j4i2pgkpb848djal818qypcvx44gyn4azjrqn"; 10 }; 11 12 checkInputs = [ mock ] ++ lib.optional (!isPy3k) unittest2; 13 14 propagatedBuildInputs = [ six ] ++ lib.optional (!isPy3k) futures; 15 16 patches = [ 17 ./tests.patch 18 ]; 19 20 disabled = isPy3k; 21 22 postPatch = '' 23 # Overrides PYTHONPATH causing dependencies not to be found 24 sed -i -e "s|test_env_var_debug|skip_test_env_var_debug|g" tests/test_tasks.py 25 '' + lib.optionalString stdenv.isDarwin '' 26 # Some of the tests fail on darwin with `error: AF_UNIX path too long' 27 # because of the *long* path names for sockets 28 sed -i -e "s|test_create_ssl_unix_connection|skip_test_create_ssl_unix_connection|g" tests/test_events.py 29 sed -i -e "s|test_create_unix_connection|skip_test_create_unix_connection|g" tests/test_events.py 30 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 31 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 32 sed -i -e "s|test_create_unix_server_ssl_verified|skip_test_create_unix_server_ssl_verified|g" tests/test_events.py 33 sed -i -e "s|test_create_unix_server_ssl_verify_failed|skip_test_create_unix_server_ssl_verify_failed|g" tests/test_events.py 34 sed -i -e "s|test_create_unix_server_ssl|skip_test_create_unix_server_ssl|g" tests/test_events.py 35 sed -i -e "s|test_create_unix_server|skip_test_create_unix_server|g" tests/test_events.py 36 sed -i -e "s|test_open_unix_connection_error|skip_test_open_unix_connection_error|g" tests/test_streams.py 37 sed -i -e "s|test_open_unix_connection_no_loop_ssl|skip_test_open_unix_connection_no_loop_ssl|g" tests/test_streams.py 38 sed -i -e "s|test_open_unix_connection|skip_test_open_unix_connection|g" tests/test_streams.py 39 sed -i -e "s|test_pause_reading|skip_test_pause_reading|g" tests/test_subprocess.py 40 sed -i -e "s|test_read_pty_output|skip_test_read_pty_output|g" tests/test_events.py 41 sed -i -e "s|test_start_unix_server|skip_test_start_unix_server|g" tests/test_streams.py 42 sed -i -e "s|test_unix_sock_client_ops|skip_test_unix_sock_client_ops|g" tests/test_events.py 43 sed -i -e "s|test_write_pty|skip_test_write_pty|g" tests/test_events.py 44 ''; 45 46 meta = with stdenv.lib; { 47 description = "Port of the asyncio project to Python 2.7"; 48 homepage = "https://github.com/vstinner/trollius"; 49 license = licenses.asl20; 50 maintainers = with maintainers; [ ]; 51 }; 52}