1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 gevent,
6 pytestCheckHook,
7 pythonOlder,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "gipc";
13 version = "1.6.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "jgehrcke";
20 repo = "gipc";
21 tag = version;
22 hash = "sha256-eYE7A1VDJ0NSshvdJKxPwGyVdW6BnyWoRSR1i1iTr8Y=";
23 };
24
25 postPatch = ''
26 substituteInPlace setup.py \
27 --replace-fail "gevent>=1.5,<=23.9.1" "gevent>=1.5"
28 '';
29
30 build-system = [ setuptools ];
31
32 dependencies = [ gevent ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 pythonImportsCheck = [ "gipc" ];
37
38 disabledTests = [
39 # AttributeError
40 "test_all_handles_length"
41 "test_child"
42 "test_closeread"
43 "test_closewrite"
44 "test_early_readchild_exit"
45 "test_handlecount"
46 "test_handler"
47 "test_onewriter"
48 "test_readclose"
49 "test_singlemsg"
50 "test_twochannels_singlemsg"
51 "test_twoclose"
52 "test_twowriters"
53 "test_write_closewrite_read"
54 ];
55
56 meta = with lib; {
57 description = "Gevent-cooperative child processes and IPC";
58 longDescription = ''
59 Usage of Python's multiprocessing package in a gevent-powered
60 application may raise problems and most likely breaks the application
61 in various subtle ways. gipc (pronunciation "gipsy") is developed with
62 the motivation to solve many of these issues transparently. With gipc,
63 multiprocessing. Process-based child processes can safely be created
64 anywhere within your gevent-powered application.
65 '';
66 homepage = "http://gehrcke.de/gipc";
67 changelog = "https://github.com/jgehrcke/gipc/blob/${version}/CHANGELOG.rst";
68 license = licenses.mit;
69 maintainers = [ ];
70 };
71}