Commit 0a7a6b09 authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

Define the doxygen build location in a single place, and pass it on to the other scripts

parent 07d2cf13
......@@ -23,7 +23,6 @@ sys.path.insert(0, os.path.abspath('.'))
from xhive import setup_if_needed
setup_if_needed()
# -- General configuration ------------------------------------------------
......@@ -49,9 +48,6 @@ extensions = [
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
doxylink = {
'doxehive': (os.path.join(os.environ["EHIVE_ROOT_DIR"], "docs", "_build", "doxygen", "ensembl-hive.tag"), 'perl/'),
}
# Add markdown support
from recommonmark.parser import CommonMarkParser
......@@ -87,6 +83,13 @@ version = re.sub('^(heads|remotes/origin)/', '', os.popen('git describe --all').
# The full version, including alpha/beta/rc tags.
release = version + '/' + os.popen('git rev-parse --short HEAD').read().strip()
doxygen_target = setup_if_needed()
doxylink = {
'doxehive': (os.path.join(doxygen_target, "ensembl-hive.tag"), 'perl/'),
}
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
......
......@@ -6,6 +6,7 @@ import sys
def setup_if_needed():
if os.environ.get("READTHEDOCS", None) == "True":
subprocess.check_call([os.environ["PWD"] + os.path.sep + "rtd_upgrade.sh"], stdout=sys.stdout, stderr=sys.stderr)
os.environ["PERL5LIB"] = os.path.pathsep.join(os.path.join(os.environ["HOME"], "packages", _) for _ in ["usr/share/perl5/", "usr/lib/x86_64-linux-gnu/perl5/5.22/", "usr/lib/x86_64-linux-gnu/perl5/5.22/auto/"])
......@@ -19,5 +20,7 @@ def setup_if_needed():
# Only run doxygen if it's missing
doxygen_target = os.path.join(os.environ["EHIVE_ROOT_DIR"], "docs", "_build", "doxygen")
if (os.environ.get("READTHEDOCS", None) == "True") or any(not os.path.exists(os.path.join(doxygen_target, _)) for _ in ["perl", "python3", "java"]):
subprocess.check_call([mkdoxygen_path])
subprocess.check_call([mkdoxygen_path, doxygen_target])
return doxygen_target
......@@ -3,21 +3,11 @@
use strict;
use warnings;
# Finding out own path in order to reference own components (including own modules):
use Cwd ();
use File::Basename ();
BEGIN {
$ENV{'EHIVE_ROOT_DIR'} ||= File::Basename::dirname( File::Basename::dirname( Cwd::realpath($0) ) );
unshift @INC, $ENV{'EHIVE_ROOT_DIR'}.'/modules';
}
use Getopt::Long qw(:config no_auto_abbrev);
use Bio::EnsEMBL::Hive::Version;
my $ehrd = $ENV{'EHIVE_ROOT_DIR'} or die "Environment variable 'EHIVE_ROOT_DIR' not defined, please check your setup";
my $erd = $ENV{'ENSEMBL_CVS_ROOT_DIR'} or die "Environment variable 'ENSEMBL_CVS_ROOT_DIR' not defined, please check your setup";
my $doxy_target = "$ehrd/docs/_build/doxygen/";
my $doxy_target = $ARGV[0] or die "Command-line argument <doxygen_target_path> not defined, please check your setup";
my $code_ver = Bio::EnsEMBL::Hive::Version->get_code_version();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment