2021-08-22 07:53:02 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# This package provides a binary "apython" which sometimes invokes
|
|
|
|
# [sys.executable, '-m', 'aioconsole'] as a subprocess. If apython is
|
|
|
|
# run directly out of this derivation, it won't work, because
|
|
|
|
# sys.executable will point to a Python binary that is not wrapped to
|
|
|
|
# be able to find aioconsole.
|
|
|
|
# However, apython will work fine when using python##.withPackages,
|
|
|
|
# because with python##.withPackages the sys.executable is already
|
|
|
|
# wrapped to be able to find aioconsole and any other packages.
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioconsole";
|
2023-03-08 16:32:21 +00:00
|
|
|
version = "0.6.1";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vxgmichel";
|
|
|
|
repo = pname;
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-08 16:32:21 +00:00
|
|
|
sha256 = "sha256-XR79o65jZFR9jr9ubw7wdxCWNH8ANMrBDTVpLnetsuU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-22 07:53:02 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov aioconsole --count 2" ""
|
|
|
|
'';
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_interact_syntax_error"
|
2022-04-27 09:35:20 +00:00
|
|
|
# Output and the sandbox don't work well together
|
|
|
|
"test_interact_multiple_indented_lines"
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"aioconsole"
|
|
|
|
];
|
2021-08-22 07:53:02 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Asynchronous console and interfaces for asyncio";
|
|
|
|
homepage = "https://github.com/vxgmichel/aioconsole";
|
2021-08-22 07:53:02 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ catern ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|