Browse code

remove wheel cache code

Thanks to lifeless, pip now implicitly has a wheel cache so that it
builds a wheel before every install, and uses that cache. All our
clever attempts at manually doing wheelhouse things is actually
bypassing the existing cache and making things take longer.

We should remove all of this code and just let pip do this thing,
which is does very well, and get out of the way.

Change-Id: Ia140dc34638d893b92f66d1ba20efd9522c5923b
(cherry picked from commit 9013bb0c24623ce8d064b561d4fd331e370762e1)

Sean Dague authored on 2015/11/05 02:31:39
Showing 6 changed files
... ...
@@ -13,7 +13,6 @@
13 13
 
14 14
 # Duplicated from stackrc for now
15 15
 DEST=/opt/stack
16
-WHEELHOUSE=$(DEST)/.wheelhouse
17 16
 
18 17
 all:
19 18
 	echo "This just saved you from a terrible mistake!"
... ...
@@ -25,9 +24,6 @@ stack:
25 25
 unstack:
26 26
 	./unstack.sh
27 27
 
28
-wheels:
29
-	WHEELHOUSE=$(WHEELHOUSE) tools/build-wheels.sh
30
-
31 28
 docs:
32 29
 	tox -edocs
33 30
 
... ...
@@ -57,7 +53,7 @@ clean:
57 57
 
58 58
 # Clean out the cache too
59 59
 realclean: clean
60
-	rm -rf files/cirros*.tar.gz files/Fedora*.qcow2 $(WHEELHOUSE)
60
+	rm -rf files/cirros*.tar.gz files/Fedora*.qcow2
61 61
 
62 62
 # Repo stuffs
63 63
 
... ...
@@ -206,7 +206,6 @@ Tools
206 206
 
207 207
 * `tools/build\_docs.sh <tools/build_docs.sh.html>`__
208 208
 * `tools/build\_venv.sh <tools/build_venv.sh.html>`__
209
-* `tools/build\_wheels.sh <tools/build_wheels.sh.html>`__
210 209
 * `tools/create-stack-user.sh <tools/create-stack-user.sh.html>`__
211 210
 * `tools/create\_userrc.sh <tools/create_userrc.sh.html>`__
212 211
 * `tools/fixup\_stuff.sh <tools/fixup_stuff.sh.html>`__
213 212
deleted file mode 100644
... ...
@@ -1,11 +0,0 @@
1
-# Once we can prebuild wheels before a devstack run, uncomment the skipped libraries
2
-cryptography
3
-# lxml # still install from from packages
4
-# netifaces # still install from packages
5
-#numpy    # slowest wheel by far, stop building until we are actually using the output
6
-posix-ipc
7
-# psycopg # still install from packages
8
-pycrypto
9
-pyOpenSSL
10
-PyYAML
11
-xattr
... ...
@@ -712,12 +712,6 @@ source $TOP_DIR/tools/fixup_stuff.sh
712 712
 # Install required infra support libraries
713 713
 install_infra
714 714
 
715
-# Pre-build some problematic wheels
716
-if [[ -n ${WHEELHOUSE:-} && ! -d ${WHEELHOUSE:-} ]]; then
717
-    source $TOP_DIR/tools/build_wheels.sh
718
-fi
719
-
720
-
721 715
 # Extras Pre-install
722 716
 # ------------------
723 717
 # Phase: pre-install
... ...
@@ -138,11 +138,6 @@ USE_VENV=$(trueorfalse False USE_VENV)
138 138
 # requirmenets files here, in a comma-separated list
139 139
 ADDITIONAL_VENV_PACKAGES=${ADITIONAL_VENV_PACKAGES:-""}
140 140
 
141
-# Configure wheel cache location
142
-export WHEELHOUSE=${WHEELHOUSE:-$DEST/.wheelhouse}
143
-export PIP_WHEEL_DIR=${PIP_WHEEL_DIR:-$WHEELHOUSE}
144
-export PIP_FIND_LINKS=${PIP_FIND_LINKS:-file://$WHEELHOUSE}
145
-
146 141
 # This can be used to turn database query logging on and off
147 142
 # (currently only implemented for MySQL backend)
148 143
 DATABASE_QUERY_LOGGING=$(trueorfalse False DATABASE_QUERY_LOGGING)
149 144
deleted file mode 100755
... ...
@@ -1,86 +0,0 @@
1
-#!/usr/bin/env bash
2
-#
3
-# **tools/build_wheels.sh** - Build a cache of Python wheels
4
-#
5
-# build_wheels.sh [package [...]]
6
-#
7
-# System package prerequisites listed in ``files/*/devlibs`` will be installed
8
-#
9
-# Builds wheels for all virtual env requirements listed in
10
-# ``venv-requirements.txt`` plus any supplied on the command line.
11
-#
12
-# Assumes:
13
-# - ``tools/install_pip.sh`` has been run and a suitable ``pip/setuptools`` is available.
14
-
15
-# If ``TOP_DIR`` is set we're being sourced rather than running stand-alone
16
-# or in a sub-shell
17
-if [[ -z "$TOP_DIR" ]]; then
18
-
19
-    set -o errexit
20
-    set -o nounset
21
-
22
-    # Keep track of the DevStack directory
23
-    TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
24
-    FILES=$TOP_DIR/files
25
-
26
-    # Import common functions
27
-    source $TOP_DIR/functions
28
-
29
-    GetDistro
30
-
31
-    source $TOP_DIR/stackrc
32
-
33
-    trap err_trap ERR
34
-
35
-fi
36
-
37
-# Get additional packages to build
38
-MORE_PACKAGES="$@"
39
-
40
-# Exit on any errors so that errors don't compound
41
-function err_trap {
42
-    local r=$?
43
-    set +o xtrace
44
-
45
-    rm -rf $TMP_VENV_PATH
46
-
47
-    exit $r
48
-}
49
-
50
-# Get system prereqs
51
-install_package $(get_packages devlibs)
52
-
53
-# Get a modern ``virtualenv``
54
-pip_install virtualenv
55
-
56
-# Prepare the workspace
57
-TMP_VENV_PATH=$(mktemp -d tmp-venv-XXXX)
58
-virtualenv $TMP_VENV_PATH
59
-
60
-# Install modern pip and wheel
61
-PIP_VIRTUAL_ENV=$TMP_VENV_PATH pip_install -U pip wheel
62
-
63
-# BUG: cffi has a lot of issues. It has no stable ABI, if installed
64
-# code is built with a different ABI than the one that's detected at
65
-# load time, it tries to compile on the fly for the new ABI in the
66
-# install location (which will probably be /usr and not
67
-# writable). Also cffi is often included via setup_requires by
68
-# packages, which have different install rules (allowing betas) than
69
-# pip has.
70
-#
71
-# Because of this we must pip install cffi into the venv to build
72
-# wheels.
73
-PIP_VIRTUAL_ENV=$TMP_VENV_PATH pip_install_gr cffi
74
-
75
-# ``VENV_PACKAGES`` is a list of packages we want to pre-install
76
-VENV_PACKAGE_FILE=$FILES/venv-requirements.txt
77
-if [[ -r $VENV_PACKAGE_FILE ]]; then
78
-    VENV_PACKAGES=$(grep -v '^#' $VENV_PACKAGE_FILE)
79
-fi
80
-
81
-for pkg in ${VENV_PACKAGES,/ } ${MORE_PACKAGES}; do
82
-    $TMP_VENV_PATH/bin/pip wheel $pkg
83
-done
84
-
85
-# Clean up wheel workspace
86
-rm -rf $TMP_VENV_PATH