Skip to content

Commit

Permalink
ARROW-1535: [Python] Enable sdist tarballs to be installed
Browse files Browse the repository at this point in the history
The tarballs produced by `setup.py sdist` have always been broken. This creates a tarball that can be installed assuming that the Arrow/Parquet C++ libraries are installed already on the target system.

I wanted to see if I could bundle the `cpp/cmake_modules` files without using a symlink but I couldn't figure it out; it might require subclassing the sdist cmdclass to make this work. I'm not sure having the symlink is so bad

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #1188 from wesm/ARROW-1535 and squashes the following commits:

dcc2e47 [Wes McKinney] Fix RAT excludes given changes to cmake files
310af1b [Wes McKinney] Move all cmake files to cpp/cmake_modules, fix up sdist tarball so it can be built/installed
  • Loading branch information
wesm committed Oct 9, 2017
1 parent 81a0e67 commit a0555c0
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 13 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 1 addition & 5 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 1 addition & 2 deletions python/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions python/cmake_modules
1 change: 0 additions & 1 deletion python/cmake_modules/BuildUtils.cmake

This file was deleted.

1 change: 0 additions & 1 deletion python/cmake_modules/CompilerInfo.cmake

This file was deleted.

1 change: 0 additions & 1 deletion python/cmake_modules/FindNumPy.cmake

This file was deleted.

1 change: 0 additions & 1 deletion python/cmake_modules/FindPythonLibsNew.cmake

This file was deleted.

1 change: 0 additions & 1 deletion python/cmake_modules/SetupCxxFlags.cmake

This file was deleted.

0 comments on commit a0555c0

Please sign in to comment.