From 1dc5cf5faded2a99d5f44ae172479b12abbf8363 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Mon, 7 Jan 2019 09:25:19 +0100
Subject: [PATCH] [conda] Re-use project_dir

---
 conda/meta.yaml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/conda/meta.yaml b/conda/meta.yaml
index d246b348..3372ca02 100644
--- a/conda/meta.yaml
+++ b/conda/meta.yaml
@@ -1,4 +1,5 @@
 {% set name = 'bob.devtools' %}
+{% set project_dir = environ.get('RECIPE_DIR') + '/..' %}
 
 package:
   name: {{ name }}
@@ -11,12 +12,13 @@ build:
   run_exports:
     - {{ pin_subpackage(name) }}
   script:
-    - cd {{ environ.get('RECIPE_DIR') + '/..' }}
+    - cd {{ project_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 and license to share/doc
+    # so it is available during test time
     - install -d ${PREFIX}/share/doc/{{ name }}
     - install -m 644 -D README.rst ${PREFIX}/share/doc/{{ name }}
     - install -m 644 -D LICENSE ${PREFIX}/share/doc/{{ name }}
@@ -51,7 +53,7 @@ test:
     - bdt lasttag --help
     - bdt changelog --help
     - bdt release --help
-    - sphinx-build -aEW ${PREFIX}/share/doc/{{ name }}/doc {{ environ.get('RECIPE_DIR') + '/../sphinx' }}
+    - sphinx-build -aEW ${PREFIX}/share/doc/{{ name }}/doc {{ project_dir }}/sphinx
 
 about:
   home: https://www.idiap.ch/software/bob/
-- 
GitLab