forked from equinor/resdata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sh
28 lines (25 loc) · 923 Bytes
/
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
# Define custom utilities
# Test for macOS with [ -n "$IS_OSX" ]
function pre_build {
# Any stuff that you need to do before you start building the wheels
# Runs in the root directory of this repository.
if [ -n "$IS_OSX" ]; then
brew install zlib
else
yum install -y zlib-devel
fi
}
function run_tests {
# Runs tests on installed distribution from an empty directory
# pytest adds every directory up-to and including python/ into sys.path,
# meaning that "import ecl" will import python/ecl and not the installed
# one. This doesn't work because the libecl.so library only exists in
# site-packages, so we copy directories required by the tests out into its
# own temporary directory.
mkdir -p {.git,python}
ln -s {..,$PWD}/bin
ln -s {..,$PWD}/lib
ln -s {..,$PWD}/test-data
cp -R {..,$PWD}/python/tests
python -m pytest python/tests
}