From b184bbcf01cb58e3ebdff869437d5fd4c9d8b522 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Tue, 26 May 2020 18:32:30 +0200
Subject: [PATCH] [conda] Allow for successive python builds

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

diff --git a/conda/meta.yaml b/conda/meta.yaml
index a41ac889..57732da1 100644
--- a/conda/meta.yaml
+++ b/conda/meta.yaml
@@ -12,10 +12,10 @@ build:
     - {{ pin_subpackage(name) }}
   script:
     - cd {{ environ.get('RECIPE_DIR') + '/..' }}
-    {% if environ.get('BUILD_EGG') %}
+    {% if environ.get('BUILD_EGG') and not path.exists('dist') %}
     - python setup.py sdist --formats=zip
     {% endif %}
-    - python setup.py install --single-version-externally-managed --record record.txt
+    - {{ PYTHON }} -m pip install --no-deps --ignore-installed .
     # installs the documentation source, readme to share/doc so it is available
     # during test time
     - install -d "${PREFIX}/share/doc/{{ name }}"
@@ -108,7 +108,9 @@ test:
     - bdt gitlab graph --help
     - bdt gitlab badges --help
     - sphinx-build -aEW ${PREFIX}/share/doc/{{ name }}/doc sphinx
+    {% if not path.exists('sphinx') %}
     - if [ -n "${CI_PROJECT_DIR}" ]; then mv sphinx "${CI_PROJECT_DIR}/"; fi
+    {% endif %}
 
 about:
   home: https://www.idiap.ch/software/bob/
-- 
GitLab