2023-02-02 05:12:57 +01:00
|
|
|
{ lib
|
2023-05-29 06:16:38 +02:00
|
|
|
, stdenv
|
2023-02-02 05:12:57 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, beautifulsoup4
|
|
|
|
, boto3
|
|
|
|
, lxml
|
|
|
|
, pdoc
|
|
|
|
, pytestCheckHook
|
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bx-py-utils";
|
2023-04-25 16:55:34 +02:00
|
|
|
version = "80";
|
2023-02-02 05:12:57 +01:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "boxine";
|
|
|
|
repo = "bx_py_utils";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-04-25 16:55:34 +02:00
|
|
|
hash = "sha256-ih0tqT+3fTTgncXz4bneo4OGT0jVhybdADTy1de5VqI=";
|
2023-02-02 05:12:57 +01:00
|
|
|
};
|
|
|
|
|
2023-04-25 16:55:34 +02:00
|
|
|
postPatch = ''
|
|
|
|
rm bx_py_utils_tests/publish.py
|
|
|
|
'';
|
|
|
|
|
2023-02-02 05:12:57 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"bx_py_utils.anonymize"
|
|
|
|
"bx_py_utils.auto_doc"
|
|
|
|
"bx_py_utils.compat"
|
|
|
|
"bx_py_utils.dict_utils"
|
|
|
|
"bx_py_utils.environ"
|
|
|
|
"bx_py_utils.error_handling"
|
|
|
|
"bx_py_utils.file_utils"
|
|
|
|
"bx_py_utils.graphql_introspection"
|
|
|
|
"bx_py_utils.hash_utils"
|
|
|
|
"bx_py_utils.html_utils"
|
|
|
|
"bx_py_utils.iteration"
|
|
|
|
"bx_py_utils.path"
|
|
|
|
"bx_py_utils.processify"
|
|
|
|
"bx_py_utils.rison"
|
|
|
|
"bx_py_utils.stack_info"
|
|
|
|
"bx_py_utils.string_utils"
|
|
|
|
"bx_py_utils.test_utils"
|
|
|
|
"bx_py_utils.text_tools"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
beautifulsoup4
|
|
|
|
boto3
|
|
|
|
lxml
|
|
|
|
pdoc
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
2023-05-16 01:33:21 +02:00
|
|
|
disabledTests = [
|
|
|
|
# too closely affected by bs4 updates
|
|
|
|
"test_pretty_format_html"
|
|
|
|
"test_assert_html_snapshot_by_css_selector"
|
|
|
|
];
|
|
|
|
|
2023-02-02 05:12:57 +01:00
|
|
|
disabledTestPaths = [
|
|
|
|
"bx_py_utils_tests/tests/test_project_setup.py"
|
2023-05-29 06:16:38 +02:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
# processify() doesn't work under darwin
|
|
|
|
# https://github.com/boxine/bx_py_utils/issues/80
|
|
|
|
"bx_py_utils_tests/tests/test_processify.py"
|
2023-02-02 05:12:57 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Various Python utility functions";
|
|
|
|
homepage = "https://github.com/boxine/bx_py_utils";
|
2023-05-29 06:28:29 +02:00
|
|
|
changelog = "https://github.com/boxine/bx_py_utils/releases/tag/${src.rev}";
|
2023-02-02 05:12:57 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|