From 9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 Mon Sep 17 00:00:00 2001
From: maxim-yurchuk <maxim-yurchuk@yandex-team.com>
Date: Wed, 9 Oct 2024 12:29:46 +0300
Subject: publishFullContrib: true for ydb

<HIDDEN_URL>
commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
---
 .../numpy/py3/patches/05-fix-win-build.patch       | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 contrib/python/numpy/py3/patches/05-fix-win-build.patch

(limited to 'contrib/python/numpy/py3/patches/05-fix-win-build.patch')

diff --git a/contrib/python/numpy/py3/patches/05-fix-win-build.patch b/contrib/python/numpy/py3/patches/05-fix-win-build.patch
new file mode 100644
index 0000000000..c628efec95
--- /dev/null
+++ b/contrib/python/numpy/py3/patches/05-fix-win-build.patch
@@ -0,0 +1,38 @@
+--- contrib/python/numpy/py3/numpy/core/src/npymath/npy_math_private.h	(index)
++++ contrib/python/numpy/py3/numpy/core/src/npymath/npy_math_private.h	(working tree)
+@@ -34,6 +34,10 @@
+ #include "numpy/npy_endian.h"
+ #include "numpy/npy_common.h"
+ 
++#ifdef _MSC_VER  // windows in ucrt\math.h makes #define complex _complex
++#undef complex
++#endif
++
+ /*
+  * The original fdlibm code used statements like:
+  *      n0 = ((*(int*)&one)>>29)^1;             * index of high word *
+--- contrib/python/numpy/py3/numpy/distutils/include/npy_cpu_dispatch_config.x86_64.h	(index)
++++ contrib/python/numpy/py3/numpy/distutils/include/npy_cpu_dispatch_config.x86_64.h	(working tree)
+@@ -53,7 +53,11 @@
+ #ifdef NPY__CPU_TARGET_POPCNT
+ 	/** POPCNT **/
+ 	#define NPY_HAVE_POPCNT 1
++#ifdef _MSC_VER
++	#include <nmmintrin.h>
++#else
+ 	#include <popcntintrin.h>
++#endif
+ #endif /*NPY__CPU_TARGET_POPCNT*/
+ #ifdef NPY__CPU_TARGET_SSE42
+ 	/** SSE42 **/
+--- contrib/python/numpy/py3/numpy/core/src/common/numpyos.c	(index)
++++ contrib/python/numpy/py3/numpy/core/src/common/numpyos.c	(working tree)
+@@ -783,7 +783,7 @@ NumPyOS_strtoull(const char *str, char **endptr, int base)
+ 
+ #include <stdlib.h>
+ 
+-#if _MSC_VER >= 1900
++#if _MSC_VER >= 1900 && 0
+ /* npy3k_compat.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH
+  * macros. It does not need to be defined when building using MSVC
+  * earlier than 14.0 (_MSC_VER == 1900).
-- 
cgit v1.2.3