docker_build_wrap.sh 1.06 KB
Newer Older
1
2
#!/bin/bash
# Depends on:
3
#   BUILD_COMMANDS
4
#   PYTHON_VERSION
5
#   CONFIG_PATH (can be empty)
6
#   BUILD_COMMIT (may be used by config.sh)
7
#   UNICODE_WIDTH  (can be empty)
8
#   BUILD_DEPENDS  (may be used by config.sh, can be empty)
9
10
11
12
13
14
15
16
set -e

# Unicode width, default 32
UNICODE_WIDTH=${UNICODE_WIDTH:-32}

# Location of wheels, default "wheelhouse"
WHEEL_SDIR=${WHEEL_SDIR:-wheelhouse}

17
18
19
# Location of `config.sh` file, default "./config.sh"
CONFIG_PATH=${CONFIG_PATH:-config.sh}

20
# Always pull in common and library builder utils
21
MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}")
22
# These routines also source common_utils.sh
23
source $MULTIBUILD_DIR/manylinux_utils.sh
24
source $MULTIBUILD_DIR/library_builders.sh
25

xoviat's avatar
xoviat committed
26
27
28
29
if [ "$USE_CCACHE" == "1" ]; then
    activate_ccache
fi

30
31
32
33
34
35
36
37
# Set PATH for chosen Python, Unicode width
export PATH="$(cpython_path $PYTHON_VERSION $UNICODE_WIDTH)/bin:$PATH"

# Change into root directory of repo
cd /io

# Configuration for this package, possibly overriding `build_wheel` defined in
# `common_utils.sh` via `manylinux_utils.sh`.
38
source "$CONFIG_PATH"
39

40
$BUILD_COMMANDS