Commit b6dabb21 authored by André Anjos's avatar André Anjos 💬

Merge branch 'conda-test' into 'master'

Allow package to be tested outside of source checkout (see bob/bob.devtools#5)

See merge request !60
parents edaa7642 11fac576
Pipeline #27326 passed with stages
in 5 minutes and 39 seconds
{% set name = 'beat.cmdline' %}
{% set project_dir = environ.get('RECIPE_DIR') + '/..' %}
package:
name: {{ name }}
......@@ -23,11 +22,15 @@ build:
run_exports:
- {{ pin_subpackage(name) }}
script:
- cd {{ project_dir }}
- cd {{ environ.get('RECIPE_DIR') + '/..' }}
{% if environ.get('BUILD_EGG') %}
- python setup.py sdist --formats=zip
{% endif %}
- python setup.py install --single-version-externally-managed --record record.txt
# installs the documentation source, readme to share/doc so it is available
# during test time
- install -d "${PREFIX}/share/doc/{{ name }}"
- cp -R README.rst requirements.txt doc "${PREFIX}/share/doc/{{ name }}/"
requirements:
host:
......@@ -74,9 +77,9 @@ test:
- beat plotterparameters --help
- beat toolchains --help
- beat experiments --help
- nosetests --with-coverage --cover-package={{ name }} -sv {{ name }}
- sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx
- sphinx-build -aEb doctest {{ project_dir }}/doc sphinx
- sphinx-build -aEW ${PREFIX}/share/doc/{{ name }}/doc sphinx
- if [ -n "${CI_PROJECT_DIR}" ]; then mv sphinx "${CI_PROJECT_DIR}/"; fi
- sphinx-build -aEb doctest ${PREFIX}/share/doc/{{ name }}/doc sphinx
- conda inspect linkages -p $PREFIX {{ name }} # [not win]
- conda inspect objects -p $PREFIX {{ name }} # [osx]
......@@ -85,3 +88,4 @@ about:
license: AGPLv3
summary: Command-line client for the BEAT platform
license_family: AGPL
license_file: ../LICENSE.AGPL
......@@ -26,8 +26,6 @@
###############################################################################
import os
import sys
import glob
import pkg_resources
......@@ -88,7 +86,7 @@ autosummary_generate = True
numfig = True
# If we are on OSX, the 'dvipng' path maybe different
dvipng_osx = '/opt/local/libexec/texlive/binaries/dvipng'
dvipng_osx = '/Library/TeX/texbin/dvipng'
if os.path.exists(dvipng_osx): pngmath_dvipng = dvipng_osx
# Add any paths that contain templates here, relative to this directory.
......@@ -259,24 +257,20 @@ autodoc_default_flags = [
'show-inheritance',
]
if not 'BOB_DOCUMENTATION_SERVER' in os.environ:
# notice we need to overwrite this for BEAT projects - defaults from Bob are
# not OK
os.environ['BOB_DOCUMENTATION_SERVER'] = "https://www.idiap.ch/software/beat/docs/beat/%(name)s/%(version)s/|https://www.idiap.ch/software/beat/docs/beat/%(name)s/master/"
# For inter-documentation mapping:
doc_server = [
'http://www.idiap.ch/software/beat/docs/beat/%(name)s/%(version)s/',
'http://www.idiap.ch/software/beat/docs/beat/%(name)s/master/',
'http://www.idiap.ch/software/beat/docs/beat/%(name)s/1.6.x/',
'http://www.idiap.ch/software/beat/docs/beat/%(name)s/1.5.x/',
]
doc_server = '|'.join(doc_server)
from bob.extension.utils import link_documentation, load_requirements
sphinx_requirements = "extra-intersphinx.txt"
if os.path.exists(sphinx_requirements):
intersphinx_mapping = link_documentation(
additional_packages=['python','numpy'] + \
load_requirements(sphinx_requirements),
server=doc_server,
)
load_requirements(sphinx_requirements))
else:
intersphinx_mapping = link_documentation(server=doc_server)
intersphinx_mapping = link_documentation()
# We want to remove all private (i.e. _. or __.__) members
# that are not in the list of accepted functions
......@@ -295,7 +289,6 @@ def member_function_test(app, what, name, obj, skip, options):
return skip
return False
# Excludes the "Usage" docstrings from these modules to appear in the API
# documentation
exclude_docstrings = {
......
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