From fd77c14a8cfe35197475dc69ed5df06cf0e50cc5 Mon Sep 17 00:00:00 2001 From: Andre Anjos Date: Tue, 19 Feb 2019 13:49:33 +0100 Subject: [PATCH] [conda] Allow package to be tested outside of source checkout (see bob/bob.devtools#5) --- conda/meta.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 57a19502..2ff2debf 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,5 +1,4 @@ {% set name = 'beat.core' %} -{% set project_dir = environ.get('RECIPE_DIR') + '/..' %} package: name: {{ name }} @@ -12,11 +11,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 doc "${PREFIX}/share/doc/{{ name }}/" requirements: host: @@ -56,8 +59,9 @@ test: - python -c "from beat.core.test.utils import pull_docker_test_images as f; f()" - worker --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] @@ -66,3 +70,4 @@ about: license: AGPLv3 summary: Core modules and definitions for the BEAT platform license_family: AGPL + license_file: ../LICENSE.AGPL -- 2.21.0