-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add setup.py and travis. * Add script to install dependencies for travis. * Put Arrow into thirdparty. * Add .gitmodules file. * Install boost dependencies. * Make tests verbose. * Build arrow and numbuf in setup.py. * Change build_ext to install. * Switch develop to install in pip. * Test * fix numbuf build and installation * make import numbuf work * fix documentation * fix tests * quotes
- Loading branch information
1 parent
cb9457d
commit d1974af
Showing
12 changed files
with
188 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "thirdparty/arrow"] | ||
path = thirdparty/arrow | ||
url = https://github.com/ray-project/arrow.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
sudo: required | ||
|
||
language: generic | ||
|
||
matrix: | ||
include: | ||
- os: linux | ||
dist: trusty | ||
python: "2.7" | ||
- os: linux | ||
dist: trusty | ||
python: "3.5" | ||
- os: osx | ||
osx_image: xcode7 | ||
python: "2.7" | ||
- os: osx | ||
osx_image: xcode7 | ||
python: "3.5" | ||
|
||
install: | ||
- ./install-dependencies.sh | ||
- python setup.py install --user | ||
|
||
script: | ||
- python python/test/runtest.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) | ||
|
||
# Determine how many parallel jobs to use for make based on the number of cores | ||
unamestr="$(uname)" | ||
if [[ "$unamestr" == "Linux" ]]; then | ||
PARALLEL=$(nproc) | ||
elif [[ "$unamestr" == "Darwin" ]]; then | ||
PARALLEL=$(sysctl -n hw.ncpu) | ||
else | ||
echo "Unrecognized platform." | ||
exit 1 | ||
fi | ||
|
||
mkdir -p "$ROOT_DIR/build" | ||
pushd "$ROOT_DIR/build" | ||
cmake .. | ||
make install -j$PARALLEL | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
|
||
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) | ||
|
||
platform="unknown" | ||
unamestr="$(uname)" | ||
if [[ "$unamestr" == "Linux" ]]; then | ||
echo "Platform is linux." | ||
platform="linux" | ||
elif [[ "$unamestr" == "Darwin" ]]; then | ||
echo "Platform is macosx." | ||
platform="macosx" | ||
else | ||
echo "Unrecognized platform." | ||
exit 1 | ||
fi | ||
|
||
if [[ $platform == "macosx" ]]; then | ||
# check that brew is installed | ||
which -s brew | ||
if [[ $? != 0 ]]; then | ||
echo "Could not find brew, please install brew (see http://brew.sh/)." | ||
exit 1 | ||
else | ||
echo "Updating brew." | ||
brew update | ||
fi | ||
fi | ||
|
||
if [[ $platform == "linux" ]]; then | ||
# These commands must be kept in sync with the installation instructions. | ||
sudo apt-get update | ||
sudo apt-get install -y cmake build-essential autoconf libtool python-dev python-numpy python-pip libboost-all-dev | ||
elif [[ $platform == "macosx" ]]; then | ||
# These commands must be kept in sync with the installation instructions. | ||
brew install cmake automake autoconf libtool boost | ||
sudo easy_install pip | ||
sudo pip install numpy --ignore-installed six | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from libnumbuf import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import subprocess | ||
from setuptools import setup, find_packages, Extension | ||
import setuptools.command.install as _install | ||
|
||
# Because of relative paths, this must be run from inside numbuf/. | ||
|
||
class install(_install.install): | ||
def run(self): | ||
subprocess.check_call(["./setup.sh"]) | ||
subprocess.check_call(["./build.sh"]) | ||
subprocess.check_call(["cp", "libnumbuf.so", "numbuf/"]) | ||
# Calling _install.install.run(self) does not fetch required packages and | ||
# instead performs an old-style install. See command/install.py in | ||
# setuptools. So, calling do_egg_install() manually here. | ||
self.do_egg_install() | ||
|
||
setup(name="numbuf", | ||
version="0.0.1", | ||
packages=find_packages(), | ||
package_data={"numbuf": ["libnumbuf.so"]}, | ||
cmdclass={"install": install}, | ||
include_package_data=True, | ||
zip_safe=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) | ||
|
||
platform="unknown" | ||
unamestr="$(uname)" | ||
if [[ "$unamestr" == "Linux" ]]; then | ||
echo "Platform is linux." | ||
platform="linux" | ||
elif [[ "$unamestr" == "Darwin" ]]; then | ||
echo "Platform is macosx." | ||
platform="macosx" | ||
else | ||
echo "Unrecognized platform." | ||
exit 1 | ||
fi | ||
|
||
pushd "$ROOT_DIR/thirdparty" | ||
./download_thirdparty.sh | ||
./build_thirdparty.sh | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) | ||
PREFIX=$TP_DIR/installed | ||
|
||
# Determine how many parallel jobs to use for make based on the number of cores | ||
unamestr="$(uname)" | ||
if [[ "$unamestr" == "Linux" ]]; then | ||
PARALLEL=$(nproc) | ||
elif [[ "$unamestr" == "Darwin" ]]; then | ||
PARALLEL=$(sysctl -n hw.ncpu) | ||
echo "Platform is macosx." | ||
else | ||
echo "Unrecognized platform." | ||
exit 1 | ||
fi | ||
|
||
echo "building arrow" | ||
cd $TP_DIR/arrow/cpp | ||
source setup_build_env.sh | ||
mkdir -p $TP_DIR/arrow/cpp/build | ||
cd $TP_DIR/arrow/cpp/build | ||
cmake -DLIBARROW_LINKAGE=STATIC -DCMAKE_BUILD_TYPE=Release .. | ||
make VERBOSE=1 -j$PARALLEL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) | ||
|
||
git submodule update --init --recursive -- "$TP_DIR/arrow" |