Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 30 additions & 8 deletions pkgs/development/python-modules/pysqueezebox/default.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,43 @@
{ lib, fetchPypi, buildPythonPackage, pythonOlder, aiohttp }:
{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
pname = "pysqueezebox";
version = "0.5.5";
version = "0.6.0";
format = "setuptools";

disabled = pythonOlder "3.6";

src = fetchPypi {
inherit pname version;
sha256 = "93e6a3824b560d4ea2b2e5f0a67fdf3b309b6194fbf9927e44fc0d12c7fdc6c0";
src = fetchFromGitHub {
owner = "rajlaud";
repo = pname;
rev = "v${version}";
hash = "sha256-0ArKVRy4H0NWShlQMziKvbHp9OjpAkEKp4zrvpVlXOk=";
};

propagatedBuildInputs = [
aiohttp
];

# No tests in the Pypi distribution
doCheck = false;
pythonImportsCheck = [ "pysqueezebox" ];
checkInputs = [
pytest-asyncio
pytestCheckHook
];

pythonImportsCheck = [
"pysqueezebox"
];

disabledTestPaths = [
# Tests require network access
"tests/test_integration.py"
];

meta = with lib; {
description = "Asynchronous library to control Logitech Media Server";
Expand All @@ -25,3 +46,4 @@ buildPythonPackage rec {
maintainers = with maintainers; [ nyanloutre ];
};
}

60 changes: 41 additions & 19 deletions pkgs/development/python-modules/pyzmq/default.nix
Original file line number Diff line number Diff line change
@@ -1,46 +1,68 @@
{ buildPythonPackage
{ lib
, buildPythonPackage
, fetchPypi
, py
, pytestCheckHook
, python
, pythonOlder
, tornado
, zeromq
, py
, python
}:

buildPythonPackage rec {
pname = "pyzmq";
version = "22.3.0";
version = "23.0.0";
format = "setuptools";

disabled = pythonOlder "3.6";

src = fetchPypi {
inherit pname version;
sha256 = "8eddc033e716f8c91c6a2112f0a8ebc5e00532b4a6ae1eb0ccc48e027f9c671c";
hash = "sha256-pF9cBHfRLfBe8uKSK0m3wK6dD0/5trsNZmVY3w7zcSI=";
};

buildInputs = [
zeromq
];

propagatedBuildInputs = [
py
];

checkInputs = [
pytestCheckHook
tornado
];
buildInputs = [ zeromq ];
propagatedBuildInputs = [ py ];

# failing tests
disabledTests = [
"test_socket" # hangs
"test_current"
"test_instance"
"test_callable_check"
"test_on_recv_basic"
"test_on_recv_wake"
"test_monitor" # https://github.com/zeromq/pyzmq/issues/1272
"test_cython"
"test_asyncio" # hangs
"test_mockable" # fails
pythonImportsCheck = [
"zmq"
];

pytestFlagsArray = [
"$out/${python.sitePackages}/zmq/tests/" # Folder with tests
];

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"
];

# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;

meta = with lib; {
description = "Python bindings for ØMQ";
homepage = "https://pyzmq.readthedocs.io/";
license = with licenses; [ bsd3 /* or */ lgpl3Only ];
maintainers = with maintainers; [ ];
};
}