Skip to content

Commit

Permalink
ARROW-7: Add barebones Python library build toolchain
Browse files Browse the repository at this point in the history
This patch provides no actual functionality; it only builds an empty Cython extension that links to libarrow.so. I will hook this into Travis CI at some later time.

I have adapted a limited amount of BSD (2- or 3-clause) or Apache 2.0 3rd-party code (particularly the cmake/Cython integration) to bootstrap this Python package / build setup in accordance with http://www.apache.org/legal/resolved.html. I have noted the relevant copyright holders and licenses in `python/LICENSE.txt`. In particular, I expect to continue to refactor and reuse occasional utility code from pandas (https://github.com/pydata/pandas) as practical.

Since a significant amount of "glue code" will need to be written to marshal between Arrow data and pure Python / NumPy / pandas objects, to get started I've adopted the approach used by libdynd/dynd-python -- a C++ "glue library" that is then called from Cython to provide a Python user interface. This will allow us to build shims as necessary to abstract away complications that leak through (for example: enabling C++ code with no knowledge of Python to invoke Python functions). Let's see how this goes: there are other options, like Boost::Python, but Cython + shim code is a more lightweight and flexible solution for the moment.

Author: Wes McKinney <[email protected]>

Closes #17 from wesm/ARROW-7 and squashes the following commits:

be059a2 [Wes McKinney] Nest arrow::py namespace
3ad3143 [Wes McKinney] Add preliminary Python development toolchain
  • Loading branch information
wesm committed Mar 7, 2016
1 parent 612fbc7 commit 572cdf2
Show file tree
Hide file tree
Showing 29 changed files with 1,934 additions and 0 deletions.
1 change: 1 addition & 0 deletions cpp/src/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ install(FILES
api.h
array.h
builder.h
field.h
type.h
DESTINATION include/arrow)

Expand Down
3 changes: 3 additions & 0 deletions cpp/src/arrow/table/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ SET_TARGET_PROPERTIES(arrow_table PROPERTIES LINKER_LANGUAGE CXX)

# Headers: top level
install(FILES
column.h
schema.h
table.h
DESTINATION include/arrow/table)

ADD_ARROW_TEST(column-test)
Expand Down
37 changes: 37 additions & 0 deletions python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
thirdparty/
CMakeFiles/
CMakeCache.txt
CTestTestfile.cmake
Makefile
cmake_install.cmake
build/
Testing/

# Python stuff

# Editor temporary/working/backup files
*flymake*

# Compiled source
*.a
*.dll
*.o
*.py[ocd]
*.so
.build_cache_dir
MANIFEST

# Generated sources
*.c
*.cpp
# Python files

# setup.py working directory
build
# setup.py dist directory
dist
# Egg metadata
*.egg-info
# coverage
.coverage
coverage.xml
Loading

0 comments on commit 572cdf2

Please sign in to comment.