From 310af1b7c4664a130cc67047d50f8364e2f6eb33 Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Sun, 8 Oct 2017 13:51:59 -0400 Subject: [PATCH 1/2] Move all cmake files to cpp/cmake_modules, fix up sdist tarball so it can be built/installed Change-Id: I1d0a8dcaa210d981e9e6b2d5ad28a9e32eb1bc70 --- {python => cpp}/cmake_modules/FindArrow.cmake | 0 {python => cpp}/cmake_modules/FindCython.cmake | 0 {python => cpp}/cmake_modules/FindParquet.cmake | 0 {python => cpp}/cmake_modules/FindPlasma.cmake | 0 {python => cpp}/cmake_modules/UseCython.cmake | 0 python/CMakeLists.txt | 12 +++++++++++- python/MANIFEST.in | 3 +-- python/cmake_modules | 1 + python/cmake_modules/BuildUtils.cmake | 1 - python/cmake_modules/CompilerInfo.cmake | 1 - python/cmake_modules/FindNumPy.cmake | 1 - python/cmake_modules/FindPythonLibsNew.cmake | 1 - python/cmake_modules/SetupCxxFlags.cmake | 1 - 13 files changed, 13 insertions(+), 8 deletions(-) rename {python => cpp}/cmake_modules/FindArrow.cmake (100%) rename {python => cpp}/cmake_modules/FindCython.cmake (100%) rename {python => cpp}/cmake_modules/FindParquet.cmake (100%) rename {python => cpp}/cmake_modules/FindPlasma.cmake (100%) rename {python => cpp}/cmake_modules/UseCython.cmake (100%) create mode 120000 python/cmake_modules delete mode 120000 python/cmake_modules/BuildUtils.cmake delete mode 120000 python/cmake_modules/CompilerInfo.cmake delete mode 120000 python/cmake_modules/FindNumPy.cmake delete mode 120000 python/cmake_modules/FindPythonLibsNew.cmake delete mode 120000 python/cmake_modules/SetupCxxFlags.cmake diff --git a/python/cmake_modules/FindArrow.cmake b/cpp/cmake_modules/FindArrow.cmake similarity index 100% rename from python/cmake_modules/FindArrow.cmake rename to cpp/cmake_modules/FindArrow.cmake diff --git a/python/cmake_modules/FindCython.cmake b/cpp/cmake_modules/FindCython.cmake similarity index 100% rename from python/cmake_modules/FindCython.cmake rename to cpp/cmake_modules/FindCython.cmake diff --git a/python/cmake_modules/FindParquet.cmake b/cpp/cmake_modules/FindParquet.cmake similarity index 100% rename from python/cmake_modules/FindParquet.cmake rename to cpp/cmake_modules/FindParquet.cmake diff --git a/python/cmake_modules/FindPlasma.cmake b/cpp/cmake_modules/FindPlasma.cmake similarity index 100% rename from python/cmake_modules/FindPlasma.cmake rename to cpp/cmake_modules/FindPlasma.cmake diff --git a/python/cmake_modules/UseCython.cmake b/cpp/cmake_modules/UseCython.cmake similarity index 100% rename from python/cmake_modules/UseCython.cmake rename to cpp/cmake_modules/UseCython.cmake diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index d148d1105b6..169e7ad02ef 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -21,7 +21,17 @@ cmake_minimum_required(VERSION 2.7) project(pyarrow) -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules") +# Running from a Python sdist tarball +set(LOCAL_CMAKE_MODULES "${CMAKE_SOURCE_DIR}/cmake_modules") +if (EXISTS "${LOCAL_CMAKE_MODULES}") + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LOCAL_CMAKE_MODULES}) +endif() + +# Running from a git source tree +set(CPP_CMAKE_MODULES "${CMAKE_SOURCE_DIR}/../cpp/cmake_modules") +if (EXISTS "${CPP_CMAKE_MODULES}") + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CPP_CMAKE_MODULES}) +endif() include(CMakeParseArguments) diff --git a/python/MANIFEST.in b/python/MANIFEST.in index 756879a0bb0..c6c9cd4920e 100644 --- a/python/MANIFEST.in +++ b/python/MANIFEST.in @@ -2,9 +2,8 @@ include README.md include LICENSE.txt global-include CMakeLists.txt +graft pyarrow graft cmake_modules -recursive-include src/pyarrow *.cc *.h -recursive-include pyarrow *.pxd global-exclude *.so global-exclude *.pyc diff --git a/python/cmake_modules b/python/cmake_modules new file mode 120000 index 00000000000..76e2a8d12c5 --- /dev/null +++ b/python/cmake_modules @@ -0,0 +1 @@ +../cpp/cmake_modules \ No newline at end of file diff --git a/python/cmake_modules/BuildUtils.cmake b/python/cmake_modules/BuildUtils.cmake deleted file mode 120000 index e3c98c8fc53..00000000000 --- a/python/cmake_modules/BuildUtils.cmake +++ /dev/null @@ -1 +0,0 @@ -../../cpp/cmake_modules/BuildUtils.cmake \ No newline at end of file diff --git a/python/cmake_modules/CompilerInfo.cmake b/python/cmake_modules/CompilerInfo.cmake deleted file mode 120000 index 559ac3240c3..00000000000 --- a/python/cmake_modules/CompilerInfo.cmake +++ /dev/null @@ -1 +0,0 @@ -../../cpp/cmake_modules/CompilerInfo.cmake \ No newline at end of file diff --git a/python/cmake_modules/FindNumPy.cmake b/python/cmake_modules/FindNumPy.cmake deleted file mode 120000 index 767b320ec7e..00000000000 --- a/python/cmake_modules/FindNumPy.cmake +++ /dev/null @@ -1 +0,0 @@ -../../cpp/cmake_modules/FindNumPy.cmake \ No newline at end of file diff --git a/python/cmake_modules/FindPythonLibsNew.cmake b/python/cmake_modules/FindPythonLibsNew.cmake deleted file mode 120000 index 7087123cb23..00000000000 --- a/python/cmake_modules/FindPythonLibsNew.cmake +++ /dev/null @@ -1 +0,0 @@ -../../cpp/cmake_modules/FindPythonLibsNew.cmake \ No newline at end of file diff --git a/python/cmake_modules/SetupCxxFlags.cmake b/python/cmake_modules/SetupCxxFlags.cmake deleted file mode 120000 index 3121a89926d..00000000000 --- a/python/cmake_modules/SetupCxxFlags.cmake +++ /dev/null @@ -1 +0,0 @@ -../../cpp/cmake_modules/SetupCxxFlags.cmake \ No newline at end of file From dcc2e47d3de165e34be62f1cbf2d170786e8f848 Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Sun, 8 Oct 2017 14:25:39 -0400 Subject: [PATCH 2/2] Fix RAT excludes given changes to cmake files Change-Id: Ibc76b3445fead23ac9416e80e523980a36d92bde --- dev/release/rat_exclude_files.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt index 83c9f194791..fa7113cc4b5 100644 --- a/dev/release/rat_exclude_files.txt +++ b/dev/release/rat_exclude_files.txt @@ -34,11 +34,7 @@ cpp/src/plasma/thirdparty/xxhash.h dev/release/rat_exclude_files.txt js/.npmignore js/closure-compiler-scripts/* -python/cmake_modules/BuildUtils.cmake -python/cmake_modules/FindPythonLibsNew.cmake -python/cmake_modules/FindNumPy.cmake -python/cmake_modules/SetupCxxFlags.cmake -python/cmake_modules/CompilerInfo.cmake +python/cmake_modules python/doc/requirements.txt python/MANIFEST.in python/pyarrow/includes/__init__.pxd