Merge pull request #225904 from SomeoneSerge/update-xtensor-python-0.25.2

python3Packages.xtensor-python: 0.25.1 -> 0.26.1
This commit is contained in:
Doron Behar
2023-10-08 18:28:42 +03:00
committed by GitHub
5 changed files with 113 additions and 36 deletions
+47
View File
@@ -0,0 +1,47 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, doctest
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xsimd";
version = "10.0.0";
src = fetchFromGitHub {
owner = "xtensor-stack";
repo = "xsimd";
rev = finalAttrs.version;
sha256 = "sha256-+ewKbce+rjNWQ0nQzm6O4xSwgzizSPpDPidkQYuoSTU=";
};
nativeBuildInputs = [
cmake
];
patches = lib.optionals stdenv.isDarwin [
# https://github.com/xtensor-stack/xsimd/issues/807
./disable-test_error_gamma-test.patch
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
# https://github.com/xtensor-stack/xsimd/issues/798
./disable-polar-test.patch
];
cmakeFlags = [
"-DBUILD_TESTS=${if (finalAttrs.doCheck && stdenv.hostPlatform == stdenv.buildPlatform) then "ON" else "OFF"}"
];
doCheck = true;
nativeCheckInputs = [
doctest
];
checkTarget = "xtest";
meta = with lib; {
description = "C++ wrappers for SIMD intrinsics";
homepage = "https://github.com/xtensor-stack/xsimd";
license = licenses.bsd3;
maintainers = with maintainers; [ tobim ];
platforms = platforms.all;
};
})
+4 -4
View File
@@ -5,13 +5,13 @@
, doctest
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "xsimd";
version = "11.1.0";
src = fetchFromGitHub {
owner = "xtensor-stack";
repo = "xsimd";
rev = version;
rev = finalAttrs.version;
sha256 = "sha256-l6IRzndjb95hIcFCCm8zmlNHWtKduqy2t/oml/9Xp+w=";
};
patches = [
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
];
cmakeFlags = [
"-DBUILD_TESTS=${if (doCheck && stdenv.hostPlatform == stdenv.buildPlatform) then "ON" else "OFF"}"
"-DBUILD_TESTS=${if (finalAttrs.doCheck && stdenv.hostPlatform == stdenv.buildPlatform) then "ON" else "OFF"}"
];
doCheck = true;
@@ -57,4 +57,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ tobim ];
platforms = platforms.all;
};
}
})
+35 -17
View File
@@ -2,36 +2,54 @@
, stdenv
, fetchFromGitHub
, cmake
, gtest
, xsimd
, doctest
, enableAssertions ? false
, enableBoundChecks ? false # Broadcasts don't pass bound checks
, nlohmann_json
, xtl
# Although this dependency is of the same GitHub organization, xtensor don't
# support xsimd 11 yet, see:
# https://github.com/xtensor-stack/xtensor/issues/2721
, xsimd10
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "xtensor";
version = "0.23.10";
version = "0.24.7";
src = fetchFromGitHub {
owner = "xtensor-stack";
repo = "xtensor";
rev = version;
sha256 = "1ayrhyh9x33b87ic01b4jzxc8x27yxpxzya5x54ikazvz8p71n14";
rev = finalAttrs.version;
hash = "sha256-dVbpcBW+jK9nIl5efk5LdKdBm8CkaJWEZ0ZY7ZuApwk=";
};
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [ xtl xsimd ];
nativeBuildInputs = [
cmake
];
propagatedBuildInputs = [
nlohmann_json
xtl
] ++ lib.optionals (!(stdenv.isAarch64 && stdenv.isLinux)) [
# xsimd support is broken on aarch64-linux, see:
# https://github.com/xtensor-stack/xsimd/issues/945
xsimd10
];
cmakeFlags = [ "-DBUILD_TESTS=ON" ];
cmakeFlags = let
cmakeBool = x: if x then "ON" else "OFF";
in [
"-DBUILD_TESTS=${cmakeBool finalAttrs.doCheck}"
"-DXTENSOR_ENABLE_ASSERT=${cmakeBool enableAssertions}"
"-DXTENSOR_CHECK_DIMENSION=${cmakeBool enableBoundChecks}"
];
doCheck = true;
nativeCheckInputs = [ gtest ];
nativeCheckInputs = [
doctest
];
checkTarget = "xtest";
# https://github.com/xtensor-stack/xtensor/issues/2542
postPatch = ''
substituteInPlace xtensor.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
description = "Multi-dimensional arrays with broadcasting and lazy computing.";
homepage = "https://github.com/xtensor-stack/xtensor";
@@ -39,4 +57,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ cpcloud ];
platforms = platforms.all;
};
}
})
@@ -1,5 +1,6 @@
{ lib
, buildPythonPackage
, toPythonModule
, stdenv
, fetchFromGitHub
, cmake
, gtest
@@ -8,28 +9,37 @@
, numpy
}:
buildPythonPackage rec {
toPythonModule (stdenv.mkDerivation(finalAttrs: {
pname = "xtensor-python";
version = "0.25.1";
version = "0.26.1";
src = fetchFromGitHub {
owner = "xtensor-stack";
repo = pname;
rev = version;
sha256 = "17la76hn4r1jv67dzz8x2pzl608r0mnvz854407mchlzj6rhsxza";
repo = "xtensor-python";
rev = finalAttrs.version;
sha256 = "sha256-kLFt5Ah5/ZO6wfTZQviVXeIAVok+/F/XCwpgPSagOMo=";
};
nativeBuildInputs = [ cmake pybind11 ];
propagatedBuildInputs = [ xtensor numpy ];
dontUseSetuptoolsBuild = true;
dontUsePipInstall = true;
dontUseSetuptoolsCheck = true;
nativeBuildInputs = [
cmake
];
buildInputs = [
pybind11
];
nativeCheckInputs = [
gtest
];
doCheck = true;
cmakeFlags = [
"-DBUILD_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
];
propagatedBuildInputs = [
xtensor
numpy
];
checkTarget = "xtest";
meta = with lib; {
homepage = "https://github.com/xtensor-stack/xtensor-python";
@@ -37,4 +47,4 @@ buildPythonPackage rec {
license = licenses.bsd3;
maintainers = with maintainers; [ lsix ];
};
}
}))
+2
View File
@@ -25847,6 +25847,8 @@ with pkgs;
xsimd = callPackage ../development/libraries/xsimd { };
xsimd10 = callPackage ../development/libraries/xsimd/10.nix { };
xtensor = callPackage ../development/libraries/xtensor { };
xtl = callPackage ../development/libraries/xtl { };