diff --git a/conda/recipes/cudf/build.sh b/conda/recipes/cudf/build.sh index 9c7f66da040..4b35a4c0fa6 100644 --- a/conda/recipes/cudf/build.sh +++ b/conda/recipes/cudf/build.sh @@ -1,3 +1,5 @@ +# Copyright (c) 2018-2019, NVIDIA CORPORATION. + cd python $PYTHON setup.py build_ext --inplace $PYTHON setup.py install diff --git a/conda/recipes/cudf/meta.yaml b/conda/recipes/cudf/meta.yaml index 8377a9a33ba..2284c2796ec 100644 --- a/conda/recipes/cudf/meta.yaml +++ b/conda/recipes/cudf/meta.yaml @@ -13,22 +13,17 @@ build: number: {{ git_revision_count }} script_env: - CUDF_BUILD_NO_GPU_TEST - - BUILD_ABI requirements: build: - - python x.x + - python - cython >=0.29,<0.30 - setuptools - libcudf {{ version }} - - libcudf_cffi {{ version }} - numba >=0.40 - nvstrings 0.7.* run: - - python x.x - - cython >=0.29,<0.30 - - setuptools - - libcudf {{ version }} + - python - libcudf_cffi {{ version }} - pandas >=0.23.4 - numba >=0.40 diff --git a/conda/recipes/libcudf/build.sh b/conda/recipes/libcudf/build.sh index 4f3aefd3d97..e054cacd62a 100644 --- a/conda/recipes/libcudf/build.sh +++ b/conda/recipes/libcudf/build.sh @@ -1,11 +1,6 @@ -CMAKE_COMMON_VARIABLES=" -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX11_ABI=$BUILD_ABI" - +# Copyright (c) 2018-2019, NVIDIA CORPORATION. -if [ -n "$MACOSX_DEPLOYMENT_TARGET" ]; then - # C++11 requires 10.9 - # but cudatoolkit 8 is build for 10.11 - export MACOSX_DEPLOYMENT_TARGET=10.11 -fi +CMAKE_COMMON_VARIABLES=" -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX11_ABI=$BUILD_ABI" # show environment printenv diff --git a/conda/recipes/libcudf/meta.yaml b/conda/recipes/libcudf/meta.yaml index 2f708512a9a..eaf4f9504f4 100644 --- a/conda/recipes/libcudf/meta.yaml +++ b/conda/recipes/libcudf/meta.yaml @@ -18,15 +18,17 @@ build: - CXX - CUDAHOSTCXX - PARALLEL_LEVEL - - BUILD_ABI + run_exports: + - {{ pin_subpackage("libcudf", max_pin="x.x") }} requirements: build: - cmake >=3.12.4 - - nvstrings 0.7.* + host: + - librmm 0.7.* + - libnvstrings 0.7.* run: - pyarrow 0.12.1 - - nvstrings 0.7.* test: commands: diff --git a/conda/recipes/libcudf_cffi/build.sh b/conda/recipes/libcudf_cffi/build.sh index fdd8859dd3a..b38fb3141d5 100644 --- a/conda/recipes/libcudf_cffi/build.sh +++ b/conda/recipes/libcudf_cffi/build.sh @@ -1,22 +1,8 @@ -CMAKE_COMMON_VARIABLES=" -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX11_ABI=$BUILD_ABI" - - -# if [ -n "$MACOSX_DEPLOYMENT_TARGET" ]; then -# # C++11 requires 10.9 -# # but cudatoolkit 8 is build for 10.11 -# export MACOSX_DEPLOYMENT_TARGET=10.11 -# fi +# Copyright (c) 2018-2019, NVIDIA CORPORATION. # Cleanup local git git clean -xdf # Change directory for build process -cd cpp -# Use CMake-based build procedure -mkdir build -cd build -# configure -cmake $CMAKE_COMMON_VARIABLES .. -# build -make python_cffi -# install -make install_python +cd cpp/python +# build and install +$PYTHON setup.py install --single-version-externally-managed --record=record.txt diff --git a/conda/recipes/libcudf_cffi/meta.yaml b/conda/recipes/libcudf_cffi/meta.yaml index 6fc813539fb..06d67981976 100644 --- a/conda/recipes/libcudf_cffi/meta.yaml +++ b/conda/recipes/libcudf_cffi/meta.yaml @@ -13,28 +13,20 @@ source: build: number: {{ git_revision_count }} - string: cuda{{ cuda_version }}_py{{ py_version }}_{{ git_revision_count }} + string: py{{ py_version }}_{{ git_revision_count }} script_env: - CC - CXX - - CUDAHOSTCXX - - PARALLEL_LEVEL - - BUILD_ABI requirements: build: - - cmake >=3.12.4 - - python x.x + - python - cffi - setuptools - - nvstrings 0.7.* - - pycparser 2.19 - - pyarrow 0.12.1 - run: - libcudf {{ version }} - - python x.x + run: + - python - cffi - - pycparser 2.19 - pyarrow 0.12.1 test: diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index f04c44fa9e3..0815ceca2ca 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -106,22 +106,6 @@ else() message(FATAL_ERROR "ZLib not found, please check your settings.") endif(ZLIB_FOUND) -################################################################################################### -# - add gtest ------------------------------------------------------------------------------------- - -if(BUILD_TESTS) - include(CTest) - include(ConfigureGoogleTest) - - if(GTEST_FOUND) - message(STATUS "Google C++ Testing Framework (Google Test) found in ${GTEST_ROOT}") - include_directories(${GTEST_INCLUDE_DIR}) - add_subdirectory(${CMAKE_SOURCE_DIR}/tests) - else() - message(AUTHOR_WARNING "Google C++ Testing Framework (Google Test) not found: automated tests are disabled.") - endif(GTEST_FOUND) -endif(BUILD_TESTS) - ################################################################################################### # - RMM ------------------------------------------------------------------------------------------- @@ -187,6 +171,22 @@ if (NVSTRINGS_INCLUDE AND NVTEXT_LIBRARY) set_target_properties(NVText PROPERTIES IMPORTED_LOCATION ${NVTEXT_LIBRARY}) endif (NVSTRINGS_INCLUDE AND NVTEXT_LIBRARY) +################################################################################################### +# - add gtest ------------------------------------------------------------------------------------- + +if(BUILD_TESTS) + include(CTest) + include(ConfigureGoogleTest) + + if(GTEST_FOUND) + message(STATUS "Google C++ Testing Framework (Google Test) found in ${GTEST_ROOT}") + include_directories(${GTEST_INCLUDE_DIR}) + add_subdirectory(${CMAKE_SOURCE_DIR}/tests) + else() + message(AUTHOR_WARNING "Google C++ Testing Framework (Google Test) not found: automated tests are disabled.") + endif(GTEST_FOUND) +endif(BUILD_TESTS) + ################################################################################################### # - include paths --------------------------------------------------------------------------------- diff --git a/cpp/python/libgdf_cffi/libgdf_build.py b/cpp/python/libgdf_cffi/libgdf_build.py index 8d669743905..af0c6e15438 100644 --- a/cpp/python/libgdf_cffi/libgdf_build.py +++ b/cpp/python/libgdf_cffi/libgdf_build.py @@ -1,13 +1,34 @@ +# Copyright (c) 2018-2019, NVIDIA CORPORATION. + import cffi import os +import sys + +fnames = [ + 'types.h', + 'convert_types.h', + 'functions.h', + 'io_types.h', + 'io_functions.h' +] + +cudf_include_dirs = [ + os.environ.get('CUDF_INCLUDE_DIR', '../../include/cudf/'), + os.path.join(sys.prefix, 'include/cudf') +] -include_dir = os.environ.get('CUDF_INCLUDE_DIR', '../../include/cudf/') +for cudf_include_dir in cudf_include_dirs: + if all([ + os.path.isfile(os.path.join(cudf_include_dir, fname)) + for fname in fnames + ]): + include_dir = cudf_include_dir + break ffibuilder = cffi.FFI() ffibuilder.set_source("libgdf_cffi.libgdf_cffi", None) -for fname in ['types.h', 'convert_types.h', 'functions.h', - 'io_types.h', 'io_functions.h']: +for fname in fnames: with open(os.path.join(include_dir, fname), 'r') as fin: ffibuilder.cdef(fin.read()) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index c7a2ab28ef0..8fb5afd6b19 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -19,19 +19,19 @@ endfunction(ConfigureTest) ################################################################################################### # - include paths --------------------------------------------------------------------------------- -include_directories("${GTEST_INCLUDE_DIR}" - "${ARROW_INCLUDE_DIR}" - "${FLATBUFFERS_INCLUDE_DIR}" - "${RMM_INCLUDE}" - "${NVSTRINGS_INCLUDE}" - "${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}" +include_directories("${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}" "${CMAKE_BINARY_DIR}/include" "${CMAKE_SOURCE_DIR}/include" "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/thirdparty/cub" "${CMAKE_SOURCE_DIR}/thirdparty/moderngpu/src" - "${CMAKE_SOURCE_DIR}/thirdparty/dlpack/include") + "${CMAKE_SOURCE_DIR}/thirdparty/dlpack/include" + "${GTEST_INCLUDE_DIR}" + "${ARROW_INCLUDE_DIR}" + "${FLATBUFFERS_INCLUDE_DIR}" + "${RMM_INCLUDE}" + "${NVSTRINGS_INCLUDE}") ################################################################################################### # - library paths ---------------------------------------------------------------------------------