From 8d79a1c65f7891b3ff2a853ca936414e5fbfa951 Mon Sep 17 00:00:00 2001
From: Doug Hellmann <doug@doughellmann.com>
Date: Tue, 21 Nov 2017 17:14:12 -0500
Subject: [PATCH] have ensure-reno create .venv in $HOME

The build-releasenotes task looks for $HOME/.venv but ensure-reno is
creating .venv in the source directory. Create the virtualenv in the
expected location.

Change-Id: I8ef5663ff81ac224785ff0583f7eee40dd561c2e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
---
 roles/ensure-reno/tasks/main.yaml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/roles/ensure-reno/tasks/main.yaml b/roles/ensure-reno/tasks/main.yaml
index 3f0b5561..9f661c94 100644
--- a/roles/ensure-reno/tasks/main.yaml
+++ b/roles/ensure-reno/tasks/main.yaml
@@ -33,8 +33,10 @@
       "
 
       UPPER_CONSTRAINTS="{{ upper_constraints }}"
-      python -m virtualenv .venv
-      VENV=.venv/bin
+      # NOTE(dhellmann): Place the virtualenv in $HOME because
+      # that's where the build-releasenotes task expects to find it.
+      python -m virtualenv $HOME/.venv
+      VENV=$HOME/.venv/bin
       $VENV/pip install sphinx $UPPER_CONSTRAINTS
       $VENV/pip install openstackdocstheme $UPPER_CONSTRAINTS
       $VENV/pip install reno $UPPER_CONSTRAINTS