Skip to content

Commit 458f45c

Browse files
numcpp: 2.13.0 -> 2.14.1 (#408834)
2 parents 27268de + dfd3a4f commit 458f45c

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

pkgs/by-name/nu/numcpp/package.nix

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@
99
}:
1010
stdenv.mkDerivation (finalAttrs: {
1111
pname = "numcpp";
12-
version = "2.13.0";
12+
version = "2.14.1";
1313

1414
src = fetchFromGitHub {
1515
owner = "dpilger26";
1616
repo = "NumCpp";
17-
rev = "Version_${finalAttrs.version}";
18-
hash = "sha256-+2xd8GNMSKPz801lfMAcHIkmidKd+xM8YblkdFj3HZk=";
17+
tag = "Version_${finalAttrs.version}";
18+
hash = "sha256-8ghHTRneLeiFgzF9zHFjFu46qopc3l2Svku1H06XQTw=";
1919
};
2020

21+
patches = [ ./pytest-CMakeLists.patch ];
22+
2123
nativeCheckInputs = [
2224
gtest
2325
python3
@@ -36,16 +38,16 @@ stdenv.mkDerivation (finalAttrs: {
3638

3739
postInstall = ''
3840
substituteInPlace $out/share/NumCpp/cmake/NumCppConfig.cmake \
39-
--replace "\''${PACKAGE_PREFIX_DIR}/" ""
41+
--replace-fail "\''${PACKAGE_PREFIX_DIR}/" ""
4042
'';
4143

4244
NIX_CFLAGS_COMPILE = "-Wno-error";
4345

44-
meta = with lib; {
46+
meta = {
4547
description = "Templatized Header Only C++ Implementation of the Python NumPy Library";
4648
homepage = "https://github.com/dpilger26/NumCpp";
47-
license = licenses.mit;
48-
maintainers = with maintainers; [ spalf ];
49-
platforms = platforms.unix;
49+
license = lib.licenses.mit;
50+
maintainers = with lib.maintainers; [ spalf ];
51+
platforms = lib.platforms.unix;
5052
};
5153
})
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
add --embed to $PYTHON_LD_FLAGS and strip a preceding whitespace to conform to CMP0004
2+
3+
--- a/test/pytest/src/CMakeLists.txt
4+
+++ b/test/pytest/src/CMakeLists.txt
5+
@@ -56,11 +56,12 @@ find_package(Python 3.11 REQUIRED
6+
if(UNIX)
7+
execute_process(
8+
COMMAND
9+
- python3-config --ldflags
10+
+ python3-config --embed --ldflags
11+
OUTPUT_VARIABLE
12+
PYTHON_LD_FLAGS
13+
OUTPUT_STRIP_TRAILING_WHITESPACE
14+
)
15+
+ string(STRIP ${PYTHON_LD_FLAGS} PYTHON_LD_FLAGS)
16+
endif()
17+
18+
target_link_libraries(${TARGET_NAME} PRIVATE

0 commit comments

Comments
 (0)