Skip to content

Commit

Permalink
ARROW-346: Use conda environment to build API docs
Browse files Browse the repository at this point in the history
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.

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes #228 from xhochy/ARROW-346 and squashes the following commits:

6a4bdc1 [Uwe L. Korn] Add license header
b741141 [Uwe L. Korn] ARROW-346: Use conda environment to build API docs
  • Loading branch information
xhochy authored and wesm committed Dec 9, 2016
1 parent e139b8b commit a5362c2
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
conda:
file: python/doc/environment.yml
7 changes: 6 additions & 1 deletion python/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ------------------------------------------------

Expand Down
25 changes: 25 additions & 0 deletions python/doc/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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
dependencies:
- arrow-cpp
- parquet-cpp
- pyarrow
- numpydoc

0 comments on commit a5362c2

Please sign in to comment.