python312Packages.vector: clean and fix

This commit is contained in:
Gaetan Lepage
2024-08-04 17:36:32 +02:00
committed by gador
parent a988a03598
commit f516196fd1
@@ -1,58 +1,77 @@
{
lib,
awkward,
buildPythonPackage,
fetchPypi,
pythonOlder,
fetchFromGitHub,
# build-system
hatch-vcs,
hatchling,
numba,
# dependencies
numpy,
notebook,
packaging,
# checks
awkward,
dask-awkward,
notebook,
numba,
papermill,
pytestCheckHook,
pythonOlder,
sympy,
stdenv,
}:
buildPythonPackage rec {
pname = "vector";
version = "1.4.1";
format = "pyproject";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-Fa74kRVg2x6j/6nb1UFNDsV1pQSiw/I+pFFwoYmURm4=";
src = fetchFromGitHub {
owner = "scikit-hep";
repo = "vector";
rev = "refs/tags/v${version}";
hash = "sha256-ckwJgh5aWFTwoEBVmKukdk+cmQeOuecLiYD2EcuELGw=";
};
nativeBuildInputs = [
build-system = [
hatch-vcs
hatchling
];
propagatedBuildInputs = [
dependencies = [
numpy
packaging
];
checkInputs = [
nativeCheckInputs = [
awkward
dask-awkward
notebook
numba
papermill
pytestCheckHook
sympy
];
pythonImportsCheck = [ "vector" ];
__darwinAllowLocalNetworking = true;
meta = with lib; {
disabledTests = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
# AssertionError: assert 2.1073424255447017e-08 == 0.0
"test_issue_463"
];
meta = {
description = "Library for 2D, 3D, and Lorentz vectors, especially arrays of vectors, to solve common physics problems in a NumPy-like way";
homepage = "https://github.com/scikit-hep/vector";
changelog = "https://github.com/scikit-hep/vector/releases/tag/v${version}";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ veprbl ];
license = with lib.licenses; [ bsd3 ];
maintainers = with lib.maintainers; [ veprbl ];
};
}