at 25.11-pre 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 7 # build-system 8 hatch-vcs, 9 hatchling, 10 11 # dependencies 12 numpy, 13 packaging, 14 15 # tests 16 awkward, 17 dask-awkward, 18 notebook, 19 numba, 20 papermill, 21 pytestCheckHook, 22 sympy, 23}: 24 25buildPythonPackage rec { 26 pname = "vector"; 27 version = "1.6.2"; 28 pyproject = true; 29 30 src = fetchFromGitHub { 31 owner = "scikit-hep"; 32 repo = "vector"; 33 tag = "v${version}"; 34 hash = "sha256-IMr3+YveR/FDQ2MbgbWr1KJFrdH9B+KOFVNGJjz6Zdk="; 35 }; 36 37 build-system = [ 38 hatch-vcs 39 hatchling 40 ]; 41 42 dependencies = [ 43 numpy 44 packaging 45 ]; 46 47 nativeCheckInputs = [ 48 awkward 49 dask-awkward 50 notebook 51 numba 52 papermill 53 pytestCheckHook 54 sympy 55 ]; 56 57 pythonImportsCheck = [ "vector" ]; 58 59 __darwinAllowLocalNetworking = true; 60 61 disabledTests = 62 lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ 63 # Fatal Python error: Segmentation fault 64 # numba/typed/typeddict.py", line 185 in __setitem__ 65 "test_method_transform2D" 66 "test_method_transform3D" 67 "test_method_transform4D" 68 ] 69 ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ 70 # AssertionError: assert 2.1073424255447017e-08 == 0.0 71 "test_issue_463" 72 ]; 73 74 meta = { 75 description = "Library for 2D, 3D, and Lorentz vectors, especially arrays of vectors, to solve common physics problems in a NumPy-like way"; 76 homepage = "https://github.com/scikit-hep/vector"; 77 changelog = "https://github.com/scikit-hep/vector/releases/tag/${src.tag}"; 78 license = with lib.licenses; [ bsd3 ]; 79 maintainers = with lib.maintainers; [ veprbl ]; 80 }; 81}