1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 fetchPypi,
6 pytestCheckHook,
7 pytest-rerunfailures,
8 pythonOlder,
9 vine,
10}:
11
12buildPythonPackage rec {
13 pname = "amqp";
14 version = "5.3.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-zdwAxyVElSICO62Un3D/97SPCxredNFwpvEKsERzlDI=";
22 };
23
24 propagatedBuildInputs = [ vine ];
25
26 __darwinAllowLocalNetworking = true;
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 pytest-rerunfailures
31 ];
32
33 disabledTests = [
34 # Requires network access
35 "test_rmq.py"
36 ]
37 ++ lib.optionals stdenv.hostPlatform.isDarwin [
38 # Requires network access but fails on macos only
39 "test_connection.py"
40 ];
41
42 pythonImportsCheck = [ "amqp" ];
43
44 meta = with lib; {
45 description = "Python client for the Advanced Message Queuing Procotol (AMQP). This is a fork of amqplib which is maintained by the Celery project";
46 homepage = "https://github.com/celery/py-amqp";
47 changelog = "https://github.com/celery/py-amqp/releases/tag/v${version}";
48 license = licenses.bsd3;
49 maintainers = with maintainers; [ fab ];
50 };
51}