2018-11-26 20:21:50 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-02-04 14:44:53 +00:00
|
|
|
, fetchFromGitHub
|
2019-10-17 09:59:13 +01:00
|
|
|
, fetchpatch
|
2018-11-26 20:21:50 +00:00
|
|
|
, matchpy
|
|
|
|
, numpy
|
|
|
|
, astunparse
|
|
|
|
, typing-extensions
|
2021-02-04 14:44:53 +00:00
|
|
|
, pytestCheckHook
|
2018-11-26 20:21:50 +00:00
|
|
|
, pytestcov
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "uarray";
|
2021-02-04 14:44:53 +00:00
|
|
|
version = "0.8.2";
|
2018-11-26 20:21:50 +00:00
|
|
|
|
2021-02-04 14:44:53 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Quansight-Labs";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1x2jp7w2wmn2awyv05xs0frpq0fa0rprwcxyg72wgiss0bnzxnhm";
|
2018-11-26 20:21:50 +00:00
|
|
|
};
|
|
|
|
|
2021-02-04 14:44:53 +00:00
|
|
|
patches = [(
|
|
|
|
# Fixes a compile error with newer versions of GCC -- should be included
|
|
|
|
# in the next release after 0.8.2
|
|
|
|
fetchpatch {
|
|
|
|
url = "https://github.com/Quansight-Labs/uarray/commit/a2012fc7bb94b3773eb402c6fe1ba1a894ea3d18.patch";
|
|
|
|
sha256 = "1qqh407qg5dz6x766mya2bxrk0ffw5h17k478f5kcs53g4dyfc3s";
|
|
|
|
}
|
|
|
|
)];
|
2018-11-26 20:21:50 +00:00
|
|
|
|
2021-02-04 14:44:53 +00:00
|
|
|
checkInputs = [ pytestCheckHook pytestcov ];
|
|
|
|
propagatedBuildInputs = [ matchpy numpy astunparse typing-extensions ];
|
|
|
|
|
|
|
|
# Tests must be run from outside the source directory
|
|
|
|
preCheck = ''
|
|
|
|
cd $TMP
|
|
|
|
'';
|
|
|
|
pytestFlagsArray = ["--pyargs" "uarray"];
|
2019-10-17 09:59:13 +01:00
|
|
|
pythonImportsCheck = [ "uarray" ];
|
2018-11-26 20:21:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Universal array library";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/Quansight-Labs/uarray";
|
2018-11-26 20:21:50 +00:00
|
|
|
license = licenses.bsd0;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|