Skip to content

Commit

Permalink
Configure ReadTheDocs
Browse files Browse the repository at this point in the history
Provides the necessary configuration files and settings to build on
ReadTheDocs. Requires a hack to the build system to handle the toolchain
configuration in the ReadTheDocs environment. Otherwise everything else
is pretty standard.
  • Loading branch information
jakirkham committed Apr 4, 2017
1 parent e1dad1b commit 1fd0bdd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions environment_doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: pyfftw_doc_env

channels:
- conda-forge

dependencies:
- cython
- fftw
- numpy
- python
- scipy
- sphinx
4 changes: 4 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
conda:
file: environment_doc.yml
python:
pip_install: true
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@

VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)


if os.environ.get("READTHEDOCS") == "True":
try:
environ = os.environb
except AttributeError:
environ = os.environ

environ[b"CC"] = b"x86_64-linux-gnu-gcc"
environ[b"LD"] = b"x86_64-linux-gnu-ld"
environ[b"AR"] = b"x86_64-linux-gnu-ar"


def get_package_data():
from pkg_resources import get_build_platform

Expand Down

0 comments on commit 1fd0bdd

Please sign in to comment.