NumPy initialization / build fixes

Change-Id: Id0e52defe3b8d619a8480ca3a1dbb225001e192b
This commit is contained in:
Wes McKinney committed 2017-04-16 00:22:33 -04:00
1 parent 1744f83485
commit 2be93f0fed
6 files changed
+9 -16

No files matched your search

+2
View File
@@ -61,6 +61,7 @@ ADD_ARROW_LIB(arrow_python
SOURCES ${ARROW_PYTHON_SRCS}
SHARED_LINK_FLAGS ""
SHARED_LINK_LIBS ${ARROW_PYTHON_SHARED_LINK_LIBS}
STATIC_LINK_LIBS ""
)
if (MSVC)
@@ -88,6 +89,7 @@ install(FILES
numpy_convert.h
numpy_interop.h
pandas_convert.h
platform.h
type_traits.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/python")
-2
View File
@@ -23,8 +23,6 @@
namespace arrow {
namespace py {
void Init() {}
PyObject* numpy_nan = nullptr;
void set_numpy_nan(PyObject* obj) {
-3
View File
@@ -33,9 +33,6 @@ namespace py {
ARROW_EXPORT
extern PyObject* numpy_nan;
ARROW_EXPORT
void Init();
ARROW_EXPORT
void set_numpy_nan(PyObject* obj);
+3 -5
View File
@@ -15,11 +15,11 @@
// specific language governing permissions and limitations
// under the License.
#ifndef ARROW_PYTHON_CONFIG_H
#define ARROW_PYTHON_CONFIG_H
#include "arrow/python/platform.h"
#include "arrow/python/do_import_numpy.h"
#include "arrow/python/init.h"
#include "arrow/python/numpy_interop.h"
namespace arrow {
@@ -31,5 +31,3 @@ void InitNumPy() {
} // namespace py
} // namespace arrow
#endif // ARROW_PYTHON_INIT_H
+2 -2
View File
@@ -15,8 +15,8 @@
// specific language governing permissions and limitations
// under the License.
#ifndef ARROW_PYTHON_CONFIG_H
#define ARROW_PYTHON_CONFIG_H
#ifndef ARROW_PYTHON_INIT_H
#define ARROW_PYTHON_INIT_H
#include "arrow/python/platform.h"
+2 -4
View File
@@ -14,15 +14,13 @@
# distutils: language = c++
# cython: embedsignature = True
cdef extern from 'arrow/python/init.h':
pass
cdef extern from 'arrow/python/init.h' namespace 'arrow::py':
void InitNumPy()
cdef extern from 'arrow/python/config.h' namespace 'arrow::py':
void Init()
void set_numpy_nan(object o)
InitNumPy()
Init()
import numpy as np
set_numpy_nan(np.nan)