Unverified Commit 458f45ce authored by Arne Keller's avatar Arne Keller Committed by GitHub
Browse files

numcpp: 2.13.0 -> 2.14.1 (#408834)

parents 27268de0 dfd3a4fa
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -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;
  };
})
+18 −0
Original line number Diff line number Diff line
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