1{ lib 2, stdenv 3, buildPythonPackage 4, pythonOlder 5, fetchFromGitHub 6, poetry-core 7, beautifulsoup4 8, boto3 9, lxml 10, pdoc 11, pytestCheckHook 12, requests-mock 13}: 14 15buildPythonPackage rec { 16 pname = "bx-py-utils"; 17 version = "80"; 18 19 disabled = pythonOlder "3.9"; 20 21 format = "pyproject"; 22 23 src = fetchFromGitHub { 24 owner = "boxine"; 25 repo = "bx_py_utils"; 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-ih0tqT+3fTTgncXz4bneo4OGT0jVhybdADTy1de5VqI="; 28 }; 29 30 postPatch = '' 31 rm bx_py_utils_tests/publish.py 32 ''; 33 34 nativeBuildInputs = [ 35 poetry-core 36 ]; 37 38 pythonImportsCheck = [ 39 "bx_py_utils.anonymize" 40 "bx_py_utils.auto_doc" 41 "bx_py_utils.compat" 42 "bx_py_utils.dict_utils" 43 "bx_py_utils.environ" 44 "bx_py_utils.error_handling" 45 "bx_py_utils.file_utils" 46 "bx_py_utils.graphql_introspection" 47 "bx_py_utils.hash_utils" 48 "bx_py_utils.html_utils" 49 "bx_py_utils.iteration" 50 "bx_py_utils.path" 51 "bx_py_utils.processify" 52 "bx_py_utils.rison" 53 "bx_py_utils.stack_info" 54 "bx_py_utils.string_utils" 55 "bx_py_utils.test_utils" 56 "bx_py_utils.text_tools" 57 ]; 58 59 nativeCheckInputs = [ 60 beautifulsoup4 61 boto3 62 lxml 63 pdoc 64 pytestCheckHook 65 requests-mock 66 ]; 67 68 disabledTests = [ 69 # too closely affected by bs4 updates 70 "test_pretty_format_html" 71 "test_assert_html_snapshot_by_css_selector" 72 ]; 73 74 disabledTestPaths = [ 75 "bx_py_utils_tests/tests/test_project_setup.py" 76 ] ++ lib.optionals stdenv.isDarwin [ 77 # processify() doesn't work under darwin 78 # https://github.com/boxine/bx_py_utils/issues/80 79 "bx_py_utils_tests/tests/test_processify.py" 80 ]; 81 82 meta = { 83 description = "Various Python utility functions"; 84 homepage = "https://github.com/boxine/bx_py_utils"; 85 changelog = "https://github.com/boxine/bx_py_utils/releases/tag/${src.rev}"; 86 license = lib.licenses.mit; 87 maintainers = with lib.maintainers; [ dotlambda ]; 88 }; 89}