numcpp: 2.13.0 -> 2.14.1

This commit is contained in:
emaryn
2025-05-22 00:44:12 +08:00
parent 1bc34e6907
commit dfd3a4fa2a
2 changed files with 28 additions and 8 deletions
+10 -8
View File
@@ -9,15 +9,17 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "numcpp";
version = "2.13.0";
version = "2.14.1";
src = fetchFromGitHub {
owner = "dpilger26";
repo = "NumCpp";
rev = "Version_${finalAttrs.version}";
hash = "sha256-+2xd8GNMSKPz801lfMAcHIkmidKd+xM8YblkdFj3HZk=";
tag = "Version_${finalAttrs.version}";
hash = "sha256-8ghHTRneLeiFgzF9zHFjFu46qopc3l2Svku1H06XQTw=";
};
patches = [ ./pytest-CMakeLists.patch ];
nativeCheckInputs = [
gtest
python3
@@ -36,16 +38,16 @@ stdenv.mkDerivation (finalAttrs: {
postInstall = ''
substituteInPlace $out/share/NumCpp/cmake/NumCppConfig.cmake \
--replace "\''${PACKAGE_PREFIX_DIR}/" ""
--replace-fail "\''${PACKAGE_PREFIX_DIR}/" ""
'';
NIX_CFLAGS_COMPILE = "-Wno-error";
meta = with lib; {
meta = {
description = "Templatized Header Only C++ Implementation of the Python NumPy Library";
homepage = "https://github.com/dpilger26/NumCpp";
license = licenses.mit;
maintainers = with maintainers; [ spalf ];
platforms = platforms.unix;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ spalf ];
platforms = lib.platforms.unix;
};
})
@@ -0,0 +1,18 @@
add --embed to $PYTHON_LD_FLAGS and strip a preceding whitespace to conform to CMP0004
--- a/test/pytest/src/CMakeLists.txt
+++ b/test/pytest/src/CMakeLists.txt
@@ -56,11 +56,12 @@ find_package(Python 3.11 REQUIRED
if(UNIX)
execute_process(
COMMAND
- python3-config --ldflags
+ python3-config --embed --ldflags
OUTPUT_VARIABLE
PYTHON_LD_FLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE
)
+ string(STRIP ${PYTHON_LD_FLAGS} PYTHON_LD_FLAGS)
endif()
target_link_libraries(${TARGET_NAME} PRIVATE