Merge pull request #211929 from fabaff/vector-fix

python310Packages.vector: adjust inputs
This commit is contained in:
Fabian Affolter 2023-01-22 21:47:20 +01:00 committed by GitHub
commit dc483ae474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 11 deletions

View File

@ -1,16 +1,18 @@
{ lib { lib
, ansicolors , ansicolors
, buildPythonPackage , buildPythonPackage
, coverage
, fetchPypi , fetchPypi
, pytest-cov
, pytestCheckHook , pytestCheckHook
, pythonOlder
, textwrap3 , textwrap3
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "ansiwrap"; pname = "ansiwrap";
version = "0.8.4"; version = "0.8.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
@ -18,21 +20,31 @@ buildPythonPackage rec {
sha256 = "ca0c740734cde59bf919f8ff2c386f74f9a369818cdc60efe94893d01ea8d9b7"; sha256 = "ca0c740734cde59bf919f8ff2c386f74f9a369818cdc60efe94893d01ea8d9b7";
}; };
nativeCheckInputs = [ postPatch = ''
# https://github.com/jonathaneunice/ansiwrap/issues/18
substituteInPlace test/test_ansiwrap.py \
--replace "set(range(20, 120)).difference(LINE_LENGTHS)" "sorted(set(range(20, 120)).difference(LINE_LENGTHS))" \
--replace "set(range(120, 400)).difference(LINE_LENGTHS)" "sorted(set(range(120, 400)).difference(LINE_LENGTHS))"
'';
checkInputs = [
ansicolors ansicolors
coverage
pytest-cov
pytestCheckHook pytestCheckHook
]; ];
propagatedBuildInputs = [ textwrap3 ]; propagatedBuildInputs = [
textwrap3
];
pythonImportsCheck = [ "ansiwrap" ]; pythonImportsCheck = [
"ansiwrap"
];
meta = with lib; { meta = with lib; {
description = "Textwrap, but savvy to ANSI colors and styles"; description = "Textwrap, but savvy to ANSI colors and styles";
homepage = "https://github.com/jonathaneunice/ansiwrap"; homepage = "https://github.com/jonathaneunice/ansiwrap";
changelog = "https://github.com/jonathaneunice/ansiwrap/blob/master/CHANGES.yml";
license = licenses.asl20; license = licenses.asl20;
maintainers = [ maintainers.costrouc ]; maintainers = with maintainers; [ costrouc ];
}; };
} }

View File

@ -1,10 +1,16 @@
{ lib { lib
, awkward
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, hatch-vcs , hatch-vcs
, hatchling , hatchling
, numba
, numpy , numpy
, notebook
, packaging
, papermill
, pytestCheckHook , pytestCheckHook
, pythonOlder
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -12,6 +18,8 @@ buildPythonPackage rec {
version = "0.11.0"; version = "0.11.0";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-/e0wZDWIIm9vi37NEkIEitQj0p1M132AAO6id0eaA5Y="; sha256 = "sha256-/e0wZDWIIm9vi37NEkIEitQj0p1M132AAO6id0eaA5Y=";
@ -21,17 +29,30 @@ buildPythonPackage rec {
hatch-vcs hatch-vcs
hatchling hatchling
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
numpy numpy
packaging
]; ];
nativeCheckInputs = [ pytestCheckHook ]; checkInputs = [
awkward
notebook
numba
papermill
pytestCheckHook
];
pythonImportsCheck = [ "vector" ]; pythonImportsCheck = [
"vector"
];
__darwinAllowLocalNetworking = true;
meta = with lib; { meta = with lib; {
description = "A Python 3.7+ library for 2D, 3D, and Lorentz vectors, especially arrays of vectors, to solve common physics problems in a NumPy-like way"; 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"; homepage = "https://github.com/scikit-hep/vector";
changelog = "https://github.com/scikit-hep/vector/releases/tag/v${version}";
license = with licenses; [ bsd3 ]; license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ veprbl ]; maintainers = with maintainers; [ veprbl ];
}; };