mirror of https://github.com/abinit/abipy.git
Use READTHEDOCS env var
This commit is contained in:
parent
6f30b6797d
commit
07a4f7ff42
|
@ -53,7 +53,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -70,7 +70,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -83,7 +83,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -122,7 +122,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -55,7 +55,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -40,7 +40,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -50,7 +50,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -109,7 +109,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -75,7 +75,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -64,7 +64,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -90,7 +90,7 @@ def build_flow(options, paral_kgb=0):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -81,7 +81,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -78,7 +78,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -53,7 +53,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -115,7 +115,7 @@ def raman_work(structure, pseudos, shiftk, paral_kgb=1):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -149,7 +149,7 @@ def raman_work(structure, pseudos, ngkpt, shiftk):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -98,7 +98,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -155,7 +155,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -68,7 +68,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -89,7 +89,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -67,7 +67,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -127,7 +127,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -64,7 +64,7 @@ def build_flow(options):
|
|||
|
||||
# This block generates the thumbnails in the Abipy gallery.
|
||||
# You can safely REMOVE this part if you are using this script for production runs.
|
||||
if os.getenv("GENERATE_SPHINX_GALLERY", False):
|
||||
if os.getenv("READTHEDOCS", False):
|
||||
__name__ = None
|
||||
import tempfile
|
||||
options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()])
|
||||
|
|
|
@ -9,17 +9,15 @@ conda config --add channels matsci
|
|||
conda config --add channels abinit
|
||||
|
||||
# https://github.com/ContinuumIO/anaconda-issues/issues/542
|
||||
conda install -c anaconda setuptools
|
||||
|
||||
conda install -y -c anaconda setuptools
|
||||
conda install -y --file ./requirements.txt
|
||||
conda install -y --file ./requirements-optional.txt
|
||||
|
||||
echo Installation complete. Use: conda install abinit to install Fortran executable
|
||||
|
||||
# Install bader (http://theory.cm.utexas.edu/henkelman/code/bader/) from matsci
|
||||
conda install -c matsci bader
|
||||
conda install -y -c matsci bader
|
||||
|
||||
# Install abinit from abinit conda channel.
|
||||
conda install -c gmatteo abinit=8.6.1
|
||||
conda install -y -c gmatteo abinit=8.6.1
|
||||
abinit --version
|
||||
abinit --build
|
||||
abinit --build
|
||||
|
||||
echo Installation complete. Use: conda install abinit to install Fortran executable
|
|
@ -14,6 +14,6 @@ nosetests -v --with-coverage --cover-package=abipy --logging-level=INFO
|
|||
|
||||
# Generate documentation
|
||||
if [[ "${PYTHON_VERSION}" == "3.6" && "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
./docs/install_reqs.sh;
|
||||
cd ./docs && export GENERATE_SPHINX_GALLERY=1 && make && unset GENERATE_SPHINX_GALLERY && cd ..;
|
||||
pip install -q -r ./docs/requirements.txt
|
||||
cd ./docs && export READTHEDOCS=1 && make && unset READTHEDOCS && cd ..;
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue