Commit cf35b71d authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

Automatically build (perl) Doxygen on RTD

parent 8505af50
......@@ -150,7 +150,7 @@ html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
html_extra_path = ['../doxygen/']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
......
#!/bin/bash
# $PWD is the user manual, which I want to keep clean
cd "$HOME"
# Exit if we have already installed the dependencies
[ -d packages ] && exit 0;
......@@ -20,3 +23,5 @@ echo http://archive.ubuntu.com/ubuntu/pool/main/libd/libdbi-perl/libdbi-perl_1.6
mkdir packages
for i in *.deb; do dpkg -x "$i" packages/; done
git clone --branch master --depth 1 https://github.com/Ensembl/ensembl.git
......@@ -101,5 +101,10 @@ def hive_setup_if_needed():
if os.environ.get("READTHEDOCS", None) == "True":
subprocess.call([os.environ["PWD"] + os.path.sep + "rtd_upgrade.sh"], stdout=sys.stdout, stderr=sys.stderr)
os.environ["EHIVE_ROOT_DIR"] = os.path.join(os.environ["PWD"], os.path.pardir, os.path.pardir)
os.environ["PERL5LIB"] = os.path.pathsep.join(os.path.join(os.environ["PWD"], "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/"])
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/"])
os.environ["ENSEMBL_CVS_ROOT_DIR"] = os.environ["HOME"]
doxygen_target = os.path.join(os.environ["EHIVE_ROOT_DIR"], "docs", "doxygen")
if not os.path.exists(doxygen_target):
mkdoc_path = os.path.join(os.environ["EHIVE_ROOT_DIR"], "scripts", "make_docs.pl")
subprocess.call([mkdoc_path, "-no_schema_desc"])
......@@ -96,7 +96,7 @@ sub generate_docs_scripts {
sub generate_docs_doxygen_perl {
print "Regenerating $ehrd/docs/doxygen ...\n\n";
print "Regenerating $ehrd/docs/doxygen/perl ...\n\n";
my $doxy_bin = `which doxygen`;
chomp $doxy_bin;
......@@ -108,15 +108,15 @@ sub generate_docs_doxygen_perl {
die "Cannot run the Ensembl-Doxygen Perl filter at '$doxy_filter', please make sure Ensembl core API is intalled properly.\n" unless(-x $doxy_filter);
my @cmds = (
"rm -rf $ehrd/docs/doxygen",
"rm -rf $ehrd/docs/doxygen/perl",
"doxygen -g -",
"echo 'PROJECT_NAME = ensembl-hive'",
"echo 'PROJECT_NUMBER = $code_ver'",
"echo 'OUTPUT_DIRECTORY = $ehrd/docs'",
"echo 'OUTPUT_DIRECTORY = $ehrd/docs/doxygen'",
"echo 'STRIP_FROM_PATH = $ehrd'",
"echo 'INPUT = $ehrd'",
"echo 'INPUT_FILTER = $doxy_filter'",
"echo 'HTML_OUTPUT = doxygen'",
"echo 'HTML_OUTPUT = perl'",
"echo 'EXTENSION_MAPPING = pm=C pl=C'",
"echo 'EXTRACT_ALL = YES'",
"echo 'FILE_PATTERNS = *.pm *.pl README.md'",
......
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