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