2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
2024-07-27 06:49:29 +00:00
|
|
|
setuptools-scm,
|
2024-06-05 15:53:02 +00:00
|
|
|
beautifulsoup4,
|
|
|
|
boto3,
|
|
|
|
lxml,
|
|
|
|
pdoc,
|
|
|
|
pytestCheckHook,
|
|
|
|
requests-mock,
|
2024-07-27 06:49:29 +00:00
|
|
|
typeguard,
|
2023-02-02 18:25:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bx-py-utils";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "93";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "boxine";
|
|
|
|
repo = "bx_py_utils";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-4xZOj6A2RKz7zOhFkLcSM7D870PfOljI8jn2+gKeYk4=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
rm bx_py_utils_tests/publish.py
|
|
|
|
'';
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ setuptools-scm ];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
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
|
2024-07-27 06:49:29 +00:00
|
|
|
typeguard
|
2023-02-02 18:25:31 +00:00
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# too closely affected by bs4 updates
|
|
|
|
"test_pretty_format_html"
|
|
|
|
"test_assert_html_snapshot_by_css_selector"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTestPaths =
|
|
|
|
[ "bx_py_utils_tests/tests/test_project_setup.py" ]
|
|
|
|
++ 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 18:25:31 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Various Python utility functions";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "publish";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://github.com/boxine/bx_py_utils";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/boxine/bx_py_utils/releases/tag/${src.rev}";
|
2023-02-02 18:25:31 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|