From b74114188507e165e7c91a5eb89cd58f063574e4 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 6 Dec 2016 20:07:25 +0100 Subject: [PATCH 1/2] ARROW-346: Use conda environment to build API docs As we cannot currently build pyarrow on readthedocs, we have to resort to building the API docs for the latest version of pyarrow on conda-forge. All other documentation will though be pulled directly from the source code. Change-Id: I97618817d0f6b48ecb9054b8c898097697b182a9 --- .readthedocs.yml | 2 ++ python/doc/conf.py | 7 ++++++- python/doc/environment.yml | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .readthedocs.yml create mode 100644 python/doc/environment.yml diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000000..2e1fe3fbc25 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,2 @@ +conda: + file: python/doc/environment.yml diff --git a/python/doc/conf.py b/python/doc/conf.py index 4c324a8086c..e817bbdd42b 100644 --- a/python/doc/conf.py +++ b/python/doc/conf.py @@ -42,7 +42,12 @@ cmd_line = cmd_line_template.format(outputdir=output_dir, moduledir=module_dir) apidoc.main(cmd_line.split(" ")) -sys.path.insert(0, os.path.abspath('..')) +on_rtd = os.environ.get('READTHEDOCS') == 'True' + +if not on_rtd: + # Hack: On RTD we use the pyarrow package from conda-forge as we cannot + # build pyarrow there. + sys.path.insert(0, os.path.abspath('..')) # -- General configuration ------------------------------------------------ diff --git a/python/doc/environment.yml b/python/doc/environment.yml new file mode 100644 index 00000000000..6fd460017d9 --- /dev/null +++ b/python/doc/environment.yml @@ -0,0 +1,8 @@ +channels: +- defaults +- conda-forge +dependencies: +- arrow-cpp +- parquet-cpp +- pyarrow +- numpydoc From 6a4bdc16ee93449ab13c4a022e50070ea977dcdf Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 6 Dec 2016 20:56:23 +0100 Subject: [PATCH 2/2] Add license header Change-Id: I59ef5a8a1105a7d83472a79118a28edc40985652 --- python/doc/environment.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/python/doc/environment.yml b/python/doc/environment.yml index 6fd460017d9..8d1fe9bfb5d 100644 --- a/python/doc/environment.yml +++ b/python/doc/environment.yml @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + channels: - defaults - conda-forge