1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-05 12:02:47 +00:00
nixpkgs/pkgs/development/python-modules/trollius/default.nix

47 lines
2.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27, isPyPy, mock, futures }:
2017-09-16 00:16:11 +01:00
buildPythonPackage rec {
pname = "trollius";
version = "1.0.4";
src = fetchPypi {
inherit pname version;
sha256 = "0xny8y12x3wrflmyn6xi8a7n3m3ac80fgmgzphx5jbbaxkjcm148";
};
checkInputs = [ mock ];
2017-09-16 00:16:11 +01:00
propagatedBuildInputs = lib.optionals (isPy27 || isPyPy) [ futures ];
2017-09-16 00:16:11 +01:00
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
'';
meta = with stdenv.lib; {
description = "Port of the Tulip project (asyncio module, PEP 3156) on Python 2";
homepage = "https://bitbucket.org/enovance/trollius";
license = licenses.asl20;
maintainers = with maintainers; [ garbas ];
};
}