Repository: parquet-cpp Updated Branches: refs/heads/master 32e8175d5 -> 94e2097bb
PARQUET-613: Add a conda (packaging tool) recipe Depends on PARQUET-614. With appropriate conda-forge (https://conda-forge.github.io/) patches conda-forge/snappy-feedstock#1 and conda-forge/zlib-feedstock#4, I'm able to build a conda package for this library. This will make it much easier for Python ecosystem packages that need to use parquet-cpp (e.g. the Python Apache Arrow library). Author: Wes McKinney <[email protected]> Closes #104 from wesm/PARQUET-613 and squashes the following commits: 80a8576 [Wes McKinney] Add an environment variable to disable SSL in curl to work around conda problem 114cf52 [Wes McKinney] Small cleaning 0d1ca81 [Wes McKinney] Implement a conda recipe for parquet-cpp Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/94e2097b Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/94e2097b Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/94e2097b Branch: refs/heads/master Commit: 94e2097bb93704c8f5323b8bafa16b8357aa069e Parents: 32e8175 Author: Wes McKinney <[email protected]> Authored: Sat May 14 11:59:38 2016 -0700 Committer: Wes McKinney <[email protected]> Committed: Sat May 14 11:59:38 2016 -0700 ---------------------------------------------------------------------- conda.recipe/build.sh | 47 ++++++++++++++++++++++++++++++++++ conda.recipe/meta.yaml | 30 ++++++++++++++++++++++ thirdparty/download_thirdparty.sh | 14 +++++++--- 3 files changed, 87 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/94e2097b/conda.recipe/build.sh ---------------------------------------------------------------------- diff --git a/conda.recipe/build.sh b/conda.recipe/build.sh new file mode 100644 index 0000000..23dc267 --- /dev/null +++ b/conda.recipe/build.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +set -e +set -x + +cd $RECIPE_DIR + +# Build dependencies +export BOOST_ROOT=$PREFIX + +export SNAPPY_HOME=$PREFIX +export THRIFT_HOME=$PREFIX +export ZLIB_HOME=$PREFIX + +cd .. + +mkdir conda-build + +cp -r thirdparty conda-build/ + +# For running the unit tests +export PARQUET_TEST_DATA=`pwd`/data + +cd conda-build +pwd + +# Build googletest for running unit tests + +# Work around conda certificate failure +export PARQUET_INSECURE_CURL=1 + +./thirdparty/download_thirdparty.sh + +./thirdparty/build_thirdparty.sh gtest + +source thirdparty/versions.sh +export GTEST_HOME=`pwd`/thirdparty/$GTEST_BASEDIR + +cmake \ + -DCMAKE_BUILD_TYPE=release \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DPARQUET_BUILD_BENCHMARKS=off \ + .. + +make +ctest -L unittest +make install http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/94e2097b/conda.recipe/meta.yaml ---------------------------------------------------------------------- diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml new file mode 100644 index 0000000..e15a5ec --- /dev/null +++ b/conda.recipe/meta.yaml @@ -0,0 +1,30 @@ +package: + name: parquet-cpp + version: "0.1" + +build: + number: {{environ.get('TRAVIS_BUILD_NUMBER', 0)}} # [unix] + skip: true # [win] + +requirements: + build: + - boost + - cmake + - zlib + - snappy + - thrift-cpp + - curl + +test: + commands: + - test -f $PREFIX/lib/libparquet.so + - test -f $PREFIX/include/parquet/api/reader.h + +about: + home: http://github.com/apache/parquet-cpp + license: Apache 2.0 + summary: 'C++ libraries for the Apache Parquet file format' + +extra: + recipe-maintainers: + - wesm http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/94e2097b/thirdparty/download_thirdparty.sh ---------------------------------------------------------------------- diff --git a/thirdparty/download_thirdparty.sh b/thirdparty/download_thirdparty.sh index 0674f77..fae6c9c 100755 --- a/thirdparty/download_thirdparty.sh +++ b/thirdparty/download_thirdparty.sh @@ -7,11 +7,17 @@ TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) source $TP_DIR/versions.sh +: ${PARQUET_INSECURE_CURL=0} + download_extract_and_cleanup() { - filename=$TP_DIR/$(basename "$1") - curl -#LC - "$1" -o $filename - tar xzf $filename -C $TP_DIR - rm $filename + filename=$TP_DIR/$(basename "$1") + if [ "$PARQUET_INSECURE_CURL" == "1" ]; then + curl -L -k "$1" -o $filename + else + curl -#LC - "$1" -o $filename + fi + tar xzf $filename -C $TP_DIR + rm $filename } if [ ! -d ${SNAPPY_BASEDIR} ]; then
