2022-06-26 10:26:21 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2024-01-13 08:15:51 +00:00
|
|
|
, isPyPy
|
|
|
|
|
|
|
|
# build-system
|
2024-04-21 15:54:59 +00:00
|
|
|
, cython
|
2024-01-13 08:15:51 +00:00
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
|
|
|
, packaging
|
|
|
|
, cffi
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
, py
|
2020-11-06 00:33:48 +00:00
|
|
|
, pytestCheckHook
|
2022-06-26 10:26:21 +00:00
|
|
|
, python
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, tornado
|
|
|
|
, zeromq
|
2023-11-16 04:20:00 +00:00
|
|
|
, pytest-asyncio
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyzmq";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "25.1.2";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-k/GqMR6LuRLjTwBM8YZAek6Q7sTw7MDv0mBWv37aAiY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
packaging
|
|
|
|
] ++ (if isPyPy then [
|
|
|
|
cffi
|
|
|
|
] else [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython
|
2024-01-13 08:15:51 +00:00
|
|
|
]);
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
buildInputs = [
|
|
|
|
zeromq
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
propagatedBuildInputs = lib.optionals isPyPy [
|
|
|
|
cffi
|
2022-06-26 10:26:21 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-11-06 00:33:48 +00:00
|
|
|
pytestCheckHook
|
|
|
|
tornado
|
2023-11-16 04:20:00 +00:00
|
|
|
pytest-asyncio
|
2020-11-06 00:33:48 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"zmq"
|
2020-11-06 00:33:48 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"$out/${python.sitePackages}/zmq/tests/" # Folder with tests
|
2023-11-16 04:20:00 +00:00
|
|
|
# pytest.ini is missing in pypi's sdist
|
|
|
|
# https://github.com/zeromq/pyzmq/issues/1853#issuecomment-1592731986
|
|
|
|
"--asyncio-mode auto"
|
2024-01-13 08:15:51 +00:00
|
|
|
"--ignore=$out/lib/python3.12/site-packages/zmq/tests/test_mypy.py"
|
2020-11-06 00:33:48 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests hang
|
|
|
|
"test_socket"
|
|
|
|
"test_monitor"
|
|
|
|
# https://github.com/zeromq/pyzmq/issues/1272
|
|
|
|
"test_cython"
|
|
|
|
# Test fails
|
|
|
|
"test_mockable"
|
|
|
|
# Issues with the sandbox
|
|
|
|
"TestFutureSocket"
|
|
|
|
"TestIOLoop"
|
|
|
|
"TestPubLog"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for ØMQ";
|
|
|
|
homepage = "https://pyzmq.readthedocs.io/";
|
|
|
|
license = with licenses; [ bsd3 /* or */ lgpl3Only ];
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|