Opt in to building unit tests

This commit is contained in:
Wes McKinney committed 2016-03-09 11:52:37 -08:00
1 parent 60088d05b2
commit 1d37c93ae8
3 files changed
+41 -38

No files matched your search

+9
View File
@@ -464,6 +464,15 @@ add_library(arrow
${LIBARROW_LINKAGE}
${ARROW_SRCS}
)
if (APPLE)
set_target_properties(arrow
PROPERTIES
BUILD_WITH_INSTALL_RPATH ON
INSTALL_NAME_DIR "@rpath"
)
endif()
set_target_properties(arrow
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}")
+18 -26
View File
@@ -28,37 +28,29 @@ install(FILES
status.h
DESTINATION include/arrow/util)
#######################################
# arrow_test_util
#######################################
add_library(arrow_test_util)
target_link_libraries(arrow_test_util
)
SET_TARGET_PROPERTIES(arrow_test_util PROPERTIES LINKER_LANGUAGE CXX)
#######################################
# arrow_test_main
#######################################
add_library(arrow_test_main
test_main.cc)
if (ARROW_BUILD_TESTS)
add_library(arrow_test_main
test_main.cc)
if (APPLE)
target_link_libraries(arrow_test_main
gtest
arrow_test_util
dl)
set_target_properties(arrow_test_main
PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
else()
target_link_libraries(arrow_test_main
gtest
arrow_test_util
pthread
dl
)
if (APPLE)
target_link_libraries(arrow_test_main
gtest
arrow_test_util
dl)
set_target_properties(arrow_test_main
PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
else()
target_link_libraries(arrow_test_main
gtest
arrow_test_util
pthread
dl
)
endif()
endif()
ADD_ARROW_TEST(bit-util-test)
+14 -12
View File
@@ -27,7 +27,7 @@ import Cython
import sys
import pkg_resources
from setuptools import setup
from setuptools import setup, Extension
import os
@@ -53,7 +53,7 @@ if Cython.__version__ < '0.19.1':
MAJOR = 0
MINOR = 1
MICRO = 0
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
VERSION = '%d.%d.%ddev' % (MAJOR, MINOR, MICRO)
class clean(_clean):
@@ -72,6 +72,9 @@ class build_ext(_build_ext):
def build_extensions(self):
numpy_incl = pkg_resources.resource_filename('numpy', 'core/include')
self.extensions = [ext for ext in self.extensions
if ext.name != '__dummy__']
for ext in self.extensions:
if (hasattr(ext, 'include_dirs') and
numpy_incl not in ext.include_dirs):
@@ -100,6 +103,7 @@ class build_ext(_build_ext):
# The staging directory for the module being built
build_temp = pjoin(os.getcwd(), self.build_temp)
build_lib = os.path.join(os.getcwd(), self.build_lib)
# Change to the build directory
saved_cwd = os.getcwd()
@@ -126,7 +130,7 @@ class build_ext(_build_ext):
static_lib_option, source]
self.spawn(cmake_command)
args = ['make']
args = ['make', 'VERBOSE=1']
if 'PYARROW_PARALLEL' in os.environ:
args.append('-j{0}'.format(os.environ['PYARROW_PARALLEL']))
self.spawn(args)
@@ -152,8 +156,6 @@ class build_ext(_build_ext):
if self.inplace:
# a bit hacky
build_lib = saved_cwd
else:
build_lib = pjoin(os.getcwd(), self.build_lib)
# Move the built libpyarrow library to the place expected by the Python
# build
@@ -219,14 +221,11 @@ class build_ext(_build_ext):
def get_outputs(self):
# Just the C extensions
cmake_exts = [self._get_cmake_ext_path(name)
for name in self.get_names()]
regular_exts = _build_ext.get_outputs(self)
return regular_exts + cmake_exts
# regular_exts = _build_ext.get_outputs(self)
return [self._get_cmake_ext_path(name)
for name in self.get_names()]
extensions = []
DESC = """\
Python library for Apache Arrow"""
@@ -235,7 +234,10 @@ setup(
packages=['pyarrow', 'pyarrow.tests'],
version=VERSION,
package_data={'pyarrow': ['*.pxd', '*.pyx']},
ext_modules=extensions,
# Dummy extension to trigger build_ext
ext_modules=[Extension('__dummy__', sources=[])],
cmdclass={
'clean': clean,
'build_ext': build_ext