You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2018/01/17 17:21:13 UTC

[arrow] branch master updated: ARROW-1991: [Website] Fix Docker documentation build

This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 9be080f  ARROW-1991: [Website] Fix Docker documentation build
9be080f is described below

commit 9be080fc7747a701c57c86cbe48b33bd48dcba07
Author: Wes McKinney <we...@twosigma.com>
AuthorDate: Wed Jan 17 12:21:08 2018 -0500

    ARROW-1991: [Website] Fix Docker documentation build
    
    @kou something is failing here, I'm not sure what's different here vs. Travis CI (not sure if this is what's failing the doc build):
    
    ```
      DOC   Building HTML
    ../arrow-glib-docs.xml:25: warning: failed to load external entity "../xml/gtkdocentities.ent"
      %gtkdocentities;
                      ^
    Entity: line 1:
     %gtkdocentities;
                     ^
    ../arrow-glib-docs.xml:29: parser error : Entity 'package_name' not defined
        <title>&package_name; Reference Manual</title>
                             ^
    ../arrow-glib-docs.xml:31: parser error : Entity 'package_string' not defined
          for &package_string;.
                              ^
    warning: failed to load external entity "../xml/basic-array.xml"
    ../arrow-glib-docs.xml:43: element include: XInclude error : could not load ../xml/basic-array.xml, and no fallback was found
    warning: failed to load external entity "../xml/composite-array.xml"
    ../arrow-glib-docs.xml:44: element include: XInclude error : could not load ../xml/composite-array.xml, and no fallback was found
    ../xml/array-builder.xml:25: warning: failed to load external entity "../xml/xml/gtkdocentities.ent"
      %gtkdocentities;
    ```
    
    Author: Wes McKinney <we...@twosigma.com>
    Author: Kouhei Sutou <ko...@clear-code.com>
    
    Closes #1472 from wesm/fix-gen-apidocs and squashes the following commits:
    
    5b907acd [Wes McKinney] Add explicit instructions for uploading API docs to website
    5734a651 [Wes McKinney] Use JDK7 for Java on Ubuntu 16.04
    0fcb1e11 [Wes McKinney] Use gcc 4.9 rather than default gcc because of gcc5 ABI issues
    dbf8be8e [Kouhei Sutou] Disable auto-reconfigure
    b1b5050b [Kouhei Sutou] Fix GLib doc build
    8b2d7e43 [Wes McKinney] Fixes for glib doc build
    9da9e143 [Wes McKinney] Add BOOST_ROOT
---
 c_glib/arrow-glib/Makefile.am       |  7 +++-
 dev/docker-compose.yml              |  4 +-
 dev/gen_apidocs/Dockerfile          | 20 ++++++----
 dev/gen_apidocs/create_documents.sh | 73 ++++++++++++++++++++++++-------------
 dev/release/RELEASE_MANAGEMENT.md   |  9 +++++
 5 files changed, 78 insertions(+), 35 deletions(-)

diff --git a/c_glib/arrow-glib/Makefile.am b/c_glib/arrow-glib/Makefile.am
index 16d0703..9148f8a 100644
--- a/c_glib/arrow-glib/Makefile.am
+++ b/c_glib/arrow-glib/Makefile.am
@@ -16,6 +16,7 @@
 # under the License.
 
 CLEANFILES =
+DISTCLEANFILES =
 
 EXTRA_DIST =					\
 	meson.build
@@ -169,6 +170,10 @@ BUILT_SOURCES =					\
 	stamp-enums.c				\
 	stamp-enums.h
 
+DISTCLEANFILES +=				\
+	stamp-enums.c				\
+	stamp-enums.h
+
 EXTRA_DIST +=					\
 	enums.c.template			\
 	enums.h.template
@@ -214,7 +219,7 @@ INTROSPECTION_SCANNER_ARGS =
 INTROSPECTION_SCANNER_ENV =
 if USE_ARROW_BUILD_DIR
 INTROSPECTION_SCANNER_ENV +=			\
-	LD_LIBRARY_PATH=$(ARROW_LIB_DIR):$${PKG_CONFIG_PATH}
+	LD_LIBRARY_PATH=$(ARROW_LIB_DIR):$${LD_LIBRARY_PATH}
 endif
 if OS_MACOS
 INTROSPECTION_SCANNER_ENV +=			\
diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml
index 4b90148..a73fd1b 100644
--- a/dev/docker-compose.yml
+++ b/dev/docker-compose.yml
@@ -17,7 +17,7 @@
 version: '3'
 services:
   gen_apidocs:
-    build: 
+    build:
       context: gen_apidocs
     volumes:
      - ../..:/apache-arrow
@@ -29,7 +29,7 @@ services:
     volumes:
      - ../..:/apache-arrow
   dask_integration:
-    build: 
+    build:
       context: dask_integration
     volumes:
      - ../..:/apache-arrow
diff --git a/dev/gen_apidocs/Dockerfile b/dev/gen_apidocs/Dockerfile
index ca4718e..da740ee 100644
--- a/dev/gen_apidocs/Dockerfile
+++ b/dev/gen_apidocs/Dockerfile
@@ -14,19 +14,24 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-FROM ubuntu:14.04
-# Prerequsites for apt-add-repository
-RUN apt-get update && apt-get install -y \
-    software-properties-common python-software-properties
+FROM ubuntu:16.04
+
 # Basic OS dependencies
-RUN apt-add-repository -y ppa:ubuntu-toolchain-r/test && \
-    apt-get update && apt-get install -y \
+RUN apt-get update && apt-get install -y \
         wget \
         rsync \
         git \
         gcc-4.9 \
         g++-4.9 \
-        build-essential
+        build-essential \
+        software-properties-common
+
+# Java build fails with default JDK8
+RUN add-apt-repository ppa:openjdk-r/ppa &&\
+    apt-get update &&\
+    apt-get install -y openjdk-7-jdk &&\
+    update-java-alternatives -s java-1.7.0-openjdk-amd64
+
 # This will install conda in /home/ubuntu/miniconda
 RUN wget -O /tmp/miniconda.sh \
     https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
@@ -73,6 +78,7 @@ RUN /home/ubuntu/miniconda/bin/conda create -y -q -n pyarrow-dev \
         doxygen \
         maven \
         -c conda-forge
+
 ADD . /apache-arrow
 WORKDIR /apache-arrow
 CMD arrow/dev/gen_apidocs/create_documents.sh
diff --git a/dev/gen_apidocs/create_documents.sh b/dev/gen_apidocs/create_documents.sh
index 566d9ce..5403126 100755
--- a/dev/gen_apidocs/create_documents.sh
+++ b/dev/gen_apidocs/create_documents.sh
@@ -27,6 +27,7 @@ export ARROW_HOME=$(pwd)/dist
 export PARQUET_HOME=$(pwd)/dist
 CONDA_BASE=/home/ubuntu/miniconda
 export LD_LIBRARY_PATH=$(pwd)/dist/lib:${CONDA_BASE}/lib:${LD_LIBRARY_PATH}
+export PKG_CONFIG_PATH=$(pwd)/dist/lib/pkgconfig:${PKG_CONFIG_PATH}
 export PATH=${CONDA_BASE}/bin:${PATH}
 
 # Prepare the asf-site before copying api docs
@@ -38,16 +39,38 @@ git clone --branch=asf-site \
     https://git-wip-us.apache.org/repos/asf/arrow-site.git asf-site
 popd
 
+# Make Java documentation
+export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
+wget http://mirrors.gigenet.com/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
+tar xvf apache-maven-3.5.2-bin.tar.gz
+export PATH=$(pwd)/apache-maven-3.5.2/bin:$PATH
+
+pushd arrow/java
+rm -rf target/site/apidocs/*
+mvn -Drat.skip=true install
+mvn -Drat.skip=true site
+mkdir -p ../site/asf-site/docs/java/
+rsync -r target/site/apidocs/ ../site/asf-site/docs/java/
+popd
+
 # Make Python documentation (Depends on C++ )
 # Build Arrow C++
 source activate pyarrow-dev
 
 export ARROW_BUILD_TOOLCHAIN=$CONDA_PREFIX
+export BOOST_ROOT=$CONDA_PREFIX
 export PARQUET_BUILD_TOOLCHAIN=$CONDA_PREFIX
+export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:${LD_LIBRARY_PATH}
+export PKG_CONFIG_PATH=$CONDA_PREFIX/lib/pkgconfig:${PKG_CONFIG_PATH}
+
+export CC=gcc-4.9
+export CXX=g++-4.9
 
-rm -rf arrow/cpp/build_docs
-mkdir arrow/cpp/build_docs
-pushd arrow/cpp/build_docs
+CPP_BUILD_DIR=$(pwd)/arrow/cpp/build_docs
+
+rm -rf $CPP_BUILD_DIR
+mkdir $CPP_BUILD_DIR
+pushd $CPP_BUILD_DIR
 cmake -DCMAKE_BUILD_TYPE=$ARROW_BUILD_TYPE \
       -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
       -DARROW_PYTHON=on \
@@ -58,6 +81,28 @@ make -j4
 make install
 popd
 
+# Build c_glib documentation
+pushd arrow/c_glib
+if [ -f Makefile ]; then
+    # Ensure updating to prevent auto re-configure
+    touch configure **/Makefile
+    make distclean
+    # Work around for 'make distclean' removes doc/reference/xml/
+    git checkout doc/reference/xml
+fi
+./autogen.sh
+rm -rf build_docs
+mkdir build_docs
+pushd build_docs
+../configure \
+    --prefix=${AROW_HOME} \
+    --enable-gtk-doc
+make -j4 GTK_DOC_V_XREF=": "
+mkdir -p ../../site/asf-site/docs/c_glib
+rsync -r doc/reference/html/ ../../site/asf-site/docs/c_glib
+popd
+popd
+
 # Build Parquet C++
 rm -rf parquet-cpp/build_docs
 mkdir parquet-cpp/build_docs
@@ -83,19 +128,6 @@ mkdir -p ../site/asf-site/docs/python
 rsync -r doc/_build/html/ ../site/asf-site/docs/python
 popd
 
-# Build c_glib documentation
-pushd arrow/c_glib
-rm -rf doc/reference/html/*
-./autogen.sh
-./configure \
-    --with-arrow-cpp-build-dir=$(pwd)/../cpp/build \
-    --with-arrow-cpp-build-type=$ARROW_BUILD_TYPE \
-    --enable-gtk-doc
-LD_LIBRARY_PATH=$(pwd)/../cpp/build/$ARROW_BUILD_TYPE make GTK_DOC_V_XREF=": "
-mkdir -p ../site/asf-site/docs/c_glib
-rsync -r doc/reference/html/ ../site/asf-site/docs/c_glib
-popd
-
 # Make C++ documentation
 pushd arrow/cpp/apidoc
 rm -rf html/*
@@ -103,12 +135,3 @@ doxygen Doxyfile
 mkdir -p ../../site/asf-site/docs/cpp
 rsync -r html/ ../../site/asf-site/docs/cpp
 popd
-
-# Make Java documentation
-pushd arrow/java
-rm -rf target/site/apidocs/*
-mvn -Drat.skip=true install
-mvn -Drat.skip=true site
-mkdir -p ../site/asf-site/docs/java/
-rsync -r target/site/apidocs/ ../site/asf-site/docs/java/
-popd
diff --git a/dev/release/RELEASE_MANAGEMENT.md b/dev/release/RELEASE_MANAGEMENT.md
index 73eaf5f..0f8c220 100644
--- a/dev/release/RELEASE_MANAGEMENT.md
+++ b/dev/release/RELEASE_MANAGEMENT.md
@@ -112,6 +112,15 @@ software must be built in order to create the documentation, so this
 step may take some time to run, especially the first time around as the
 Docker container will also have to be built.
 
+To upload the updated documentation to the website, navigate to `site/asf-site`
+and commit all changes:
+
+```
+pushd site/asf-site
+git add .
+git commit -m "Updated API documentation for version X.Y.Z"
+```
+
 After successfully creating the API documentation the website can be
 run locally to browse the API documentation from the top level
 `Documentation` menu. To run the website issue the command:

-- 
To stop receiving notification emails like this one, please contact
['"commits@arrow.apache.org" <co...@arrow.apache.org>'].