Merge pull request #155008 from fabaff/fix-amqtt
python3Packages.amqtt: 0.10.0 -> unstable-2022-01-11
This commit is contained in:
commit
816f6e0c25
@ -2,9 +2,11 @@
|
||||
, buildPythonPackage
|
||||
, docopt
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, hypothesis
|
||||
, passlib
|
||||
, poetry-core
|
||||
, pytest-logdog
|
||||
, pytest-asyncio
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
@ -15,24 +17,21 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "amqtt";
|
||||
version = "0.10.0";
|
||||
version = "unstable-2022-01-11";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Yakifo";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-27LmNR1KC8w3zRJ7YBlBolQ4Q70ScTPqypMCpU6fO+I=";
|
||||
rev = "8961b8fff57007a5d9907b98bc555f0519974ce9";
|
||||
hash = "sha256-3uwz4RSoa6KRC8mlVfeIMLPH6F2kOJjQjjXCrnVX0Jo=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace 'websockets = "^9.0"' 'websockets = "^10.0"' \
|
||||
--replace 'PyYAML = "^5.4.0"' 'PyYAML = "*"' \
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ poetry-core ];
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
docopt
|
||||
@ -44,22 +43,30 @@ buildPythonPackage rec {
|
||||
|
||||
checkInputs = [
|
||||
hypothesis
|
||||
pytest-logdog
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace 'PyYAML = "^5.4.0"' 'PyYAML = "*"'
|
||||
'';
|
||||
|
||||
disabledTestPaths = [
|
||||
# Test are not ported from hbmqtt yet
|
||||
"tests/test_cli.py"
|
||||
"tests/test_client.py"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Requires network access
|
||||
"test_connect_tcp"
|
||||
];
|
||||
preCheck = ''
|
||||
# Some tests need amqtt
|
||||
export PATH=$out/bin:$PATH
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "amqtt" ];
|
||||
pythonImportsCheck = [
|
||||
"amqtt"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python MQTT client and broker implementation";
|
||||
|
49
pkgs/development/python-modules/pytest-logdog/default.nix
Normal file
49
pkgs/development/python-modules/pytest-logdog/default.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytest
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, setuptools-scm
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytest-logdog";
|
||||
version = "0.1.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ods";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-Tmoq+KAGzn0MMj29rukDfAc4LSIwC8DoMTuBAppV32I=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
pytest
|
||||
];
|
||||
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"pytest_logdog"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pytest plugin to test logging";
|
||||
homepage = "https://github.com/ods/pytest-logdog";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -37,6 +37,12 @@ buildPythonPackage rec {
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# hbmqtt was replaced by amqtt
|
||||
substituteInPlace tests/test_roomba_integration.py \
|
||||
--replace "from hbmqtt.broker import Broker" "from amqtt.broker import Broker"
|
||||
'';
|
||||
|
||||
disabledTestPaths = [
|
||||
# Requires network access
|
||||
"tests/test_discovery.py"
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pythonAtLeast
|
||||
, six
|
||||
, pygraphviz
|
||||
, pytestCheckHook
|
||||
@ -13,6 +14,7 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "transitions";
|
||||
version = "0.8.10";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
@ -36,6 +38,16 @@ buildPythonPackage rec {
|
||||
export HOME=$TMPDIR
|
||||
'';
|
||||
|
||||
disabledTests = lib.optionals (pythonAtLeast "3.10") [
|
||||
# https://github.com/pytransitions/transitions/issues/563
|
||||
"test_multiple_models"
|
||||
"test_timeout"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"transitions"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/pytransitions/transitions";
|
||||
description = "A lightweight, object-oriented finite state machine implementation in Python";
|
||||
|
@ -7692,6 +7692,8 @@ in {
|
||||
|
||||
pytest-localserver = callPackage ../development/python-modules/pytest-localserver { };
|
||||
|
||||
pytest-logdog = callPackage ../development/python-modules/pytest-logdog{ };
|
||||
|
||||
pytest-metadata = callPackage ../development/python-modules/pytest-metadata { };
|
||||
|
||||
pytest-mock = callPackage ../development/python-modules/pytest-mock { };
|
||||
|
Loading…
Reference in New Issue
Block a user