#!/bin/bash -xe

# Working variables
WHEELHOUSE_DIR=$1
PROJECT=openstack/requirements
WORKING_DIR=`pwd`/$PROJECT

# Extract and iterate over all the branch names.
BRANCHES=`git --git-dir=$WORKING_DIR/.git branch -r | grep '^  origin/[^H]'`
for BRANCH in $BRANCHES; do
    git --git-dir=$WORKING_DIR/.git show $BRANCH:upper-constraints.txt \
        2>/dev/null > /tmp/upper-constraints.txt  || true
    python -m pip --verbose wheel -r /tmp/upper-constraints.txt -w $WHEELHOUSE_DIR || true
    python3 -m pip --verbose wheel -r /tmp/upper-constraints.txt -w $WHEELHOUSE_DIR || true
done

#!/bin/bash -xe

# Working variables
WHEELHOUSE_DIR=$1
PROJECT=openstack/requirements
WORKING_DIR=`pwd`/$PROJECT

# Extract and iterate over all the branch names.
BRANCHES=`git --git-dir=$WORKING_DIR/.git branch -r | grep '^  origin/[^H]'`
for BRANCH in $BRANCHES; do
    git --git-dir=$WORKING_DIR/.git show $BRANCH:upper-constraints.txt \
        2>/dev/null > /tmp/upper-constraints.txt  || true
    rm -rf build_env
    virtualenv build_env
    build_env/bin/pip --verbose wheel -r /tmp/upper-constraints.txt -w $WHEELHOUSE_DIR || true
    rm -rf build_env
    virtualenv -p python3 build_env
    build_env/bin/pip --verbose wheel -r /tmp/upper-constraints.txt -w $WHEELHOUSE_DIR || true
done

Use virtualenv isolation when building wheels
Use virtualenv isolation when building wheels

Run each round of wheel building in a fresh virtualenv. This solves
needing to have pip installed into the system python3 module search
path.

Change-Id: I7c58826e12bd5747930510af0c5c8c4134c9b815
Closes-Bug: #2000593