mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
python3Packages.amqtt: 0.10.0 -> unstable-2022-01-11
This commit is contained in:
parent
5eb7d1ed25
commit
2bf5042700
1 changed files with 22 additions and 15 deletions
|
@ -2,9 +2,11 @@
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, docopt
|
, docopt
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, hypothesis
|
, hypothesis
|
||||||
, passlib
|
, passlib
|
||||||
, poetry-core
|
, poetry-core
|
||||||
|
, pytest-logdog
|
||||||
, pytest-asyncio
|
, pytest-asyncio
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
|
@ -15,24 +17,21 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "amqtt";
|
pname = "amqtt";
|
||||||
version = "0.10.0";
|
version = "unstable-2022-01-11";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Yakifo";
|
owner = "Yakifo";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "8961b8fff57007a5d9907b98bc555f0519974ce9";
|
||||||
sha256 = "sha256-27LmNR1KC8w3zRJ7YBlBolQ4Q70ScTPqypMCpU6fO+I=";
|
hash = "sha256-3uwz4RSoa6KRC8mlVfeIMLPH6F2kOJjQjjXCrnVX0Jo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
nativeBuildInputs = [
|
||||||
substituteInPlace pyproject.toml \
|
poetry-core
|
||||||
--replace 'websockets = "^9.0"' 'websockets = "^10.0"' \
|
];
|
||||||
--replace 'PyYAML = "^5.4.0"' 'PyYAML = "*"' \
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [ poetry-core ];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
docopt
|
docopt
|
||||||
|
@ -44,22 +43,30 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
hypothesis
|
hypothesis
|
||||||
|
pytest-logdog
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace pyproject.toml \
|
||||||
|
--replace 'PyYAML = "^5.4.0"' 'PyYAML = "*"'
|
||||||
|
'';
|
||||||
|
|
||||||
disabledTestPaths = [
|
disabledTestPaths = [
|
||||||
# Test are not ported from hbmqtt yet
|
# Test are not ported from hbmqtt yet
|
||||||
"tests/test_cli.py"
|
"tests/test_cli.py"
|
||||||
"tests/test_client.py"
|
"tests/test_client.py"
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledTests = [
|
preCheck = ''
|
||||||
# Requires network access
|
# Some tests need amqtt
|
||||||
"test_connect_tcp"
|
export PATH=$out/bin:$PATH
|
||||||
];
|
'';
|
||||||
|
|
||||||
pythonImportsCheck = [ "amqtt" ];
|
pythonImportsCheck = [
|
||||||
|
"amqtt"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Python MQTT client and broker implementation";
|
description = "Python MQTT client and broker implementation";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue