git.iko.soy/typeable/nixpkgs
on master help sign in
uvloop: fix darwin build
commit69ee17f0602f9dee6203e0186a6934d6cebb7022 authorFabian Möller <fabianm88@gmail.com> dateFri 13 Sep 2019, 23:11 (7 years ago) parenta4bea6d
2 files changed+33
pkgs/development/python-modules/uvloop/darwin_sandbox.patch+28 pkgs/development/python-modules/uvloop/default.nix+5
pkgs/development/python-modules/uvloop/darwin_sandbox.patchnew file+28
@@ -0,0 +1,28 @@
1+diff --git a/tests/test_pipes.py b/tests/test_pipes.py
2+index d883abf..2e74d7a 100644
3+--- a/tests/test_pipes.py
4++++ b/tests/test_pipes.py
5+@@ -2,6 +2,7 @@ import asyncio
6+ import io
7+ import os
8+ import socket
9++import unittest
10+
11+ from uvloop import _testbase as tb
12+
13+@@ -96,6 +97,7 @@ class _BasePipeTest:
14+ # extra info is available
15+ self.assertIsNotNone(proto.transport.get_extra_info('pipe'))
16+
17++ @unittest.skip("darwin sandbox")
18+ def test_read_pty_output(self):
19+ proto = MyReadPipeProto(loop=self.loop)
20+
21+@@ -198,6 +200,7 @@ class _BasePipeTest:
22+ self.loop.run_until_complete(proto.done)
23+ self.assertEqual('CLOSED', proto.state)
24+
25++ @unittest.skip("darwin sandbox")
26+ def test_write_pty(self):
27+ master, slave = os.openpty()
28+ os.set_blocking(master, False)
pkgs/development/python-modules/uvloop/default.nix+5
@@ -20,6 +20,8 @@ buildPythonPackage rec {
2020 sha256 = "0blcnrd5vky2k1m1p1skx4516dr1jx76yyb0c6fi82si6mqd0b4l";
2121 };
2222
23+ patches = lib.optional stdenv.isDarwin ./darwin_sandbox.patch;
24+
2325 buildInputs = [
2426 libuv
2527 ] ++ lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ];
@@ -31,6 +33,9 @@ buildPythonPackage rec {
3133
3234 checkInputs = [ pyopenssl psutil ];
3335
36+ # Some of the tests use localhost networking.
37+ __darwinAllowLocalNetworking = true;
38+
3439 meta = with lib; {
3540 description = "Fast implementation of asyncio event loop on top of libuv";
3641 homepage = http://github.com/MagicStack/uvloop;