-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
/
config.sh
executable file
·50 lines (45 loc) · 1.49 KB
/
config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Define custom utilities
function pre_build {
# Any stuff that you need to do before you start building the wheels
# Runs in the root directory of this repository.
:
}
function pip_opts {
[ -n "$MANYLINUX_URL" ] && echo "--find-links $MANYLINUX_URL"
echo "-v"
}
function build_wheel_cmd {
set -x
local cmd=${1:-pip_wheel_cmd}
local wheelhouse=$(abspath ${WHEEL_SDIR:-wheelhouse})
start_spinner
if [ -n "$(is_function "pre_build")" ]; then pre_build; fi
stop_spinner
if [ -n "$BUILD_DEPENDS" ]; then
pip install $(pip_opts) $BUILD_DEPENDS
fi
pip --version
pip freeze
$cmd $wheelhouse
repair_wheelhouse $wheelhouse
set +x
}
function run_tests {
# Runs tests on installed distribution from an empty directory
set -x
pip freeze
pytest -rfxEXs --durations=20 --disable-warnings --showlocals --pyargs gensim
set +x
}
#
# We do this here because we want to upgrade pip before the wheel gets installed.
# docker_test_wrap.sh sources this file before the wheel install. The sourcing
# happens from multiple places, and some of the Python versions can be really
# ancient (e.g. when working outside a virtual environment, using the default
# Python install).
#
# We don't use pip to do the actual upgrade because something appears broken
# with the default pip on the Python 3.10 multibuild image. This is really
# dodgy, but I couldn't work out a better way to get this done.
#
python continuous_integration/upgrade_pip_py310.py