forked from equinor/dlisio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sh
executable file
·76 lines (66 loc) · 2.23 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/sh
function run_tests {
set -x
python -c "import dlisio; print(dlisio.__version__)"
}
function pre_build {
if [ -d build-centos5 ]; then return; fi
# the cmakes available in yum for centos5 are too old (latest 2.11.x), so
# fetch a newer version pypi. Files newer than 3.13.3 are not available
# for manylinux1, so pin that. However, cmake < 3.14 is not packaged for python 3.9
python -m pip install \
"cmake < 3.14; python_version < '3.9'" \
"cmake; python_version >= '3.9'" \
pybind11 scikit-build
# On linux multibuild runs in a container, only copying with it the root
# directory of the repo. Thus, the system installed layered-file-protocols
# (and fmtlib) is no longer available and must be re-installed in the
# container.
if [ -z "$IS_OSX" ]; then
pushd fmt/build;
rm -rf *;
cmake -DFMT_TEST=OFF -DFMT_DOC=OFF ..;
make;
make install;
popd;
fi
if [ -z "$IS_OSX" ]; then
pushd layered-file-protocols/build;
rm -rf *;
cmake -DBUILD_SHARED_LIBS=ON \
-DLFP_FMT_HEADER_ONLY=ON \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF ..;
make;
make install;
popd;
fi
if [ -z "$IS_OSX" ]; then
pushd variant/build;
rm -rf *;
cmake -DCMAKE_BUILD_TYPE=Release ..;
make;
make install;
popd;
fi
mkdir build-centos5
pushd build-centos5
cmake --version
cmake .. -DBUILD_PYTHON=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_NAME_DIR=/usr/local/lib \
-DBUILD_SHARED_LIBS=ON
if [ -n "$IS_OSX" ]; then
sudo make install;
else
make install;
fi
popd
# clean dirty files from python/, otherwise it picks up the one built
# outside docker and symbols will be too recent for auditwheel.
# setuptools_scm really *really* expects a .git-directory. As the wheel
# building process does its work in /tmp, setuptools_scm crashes because it
# cannot find the .git dir. Leave version.py so that setuptools can obtain
# the version from it
git clean -dxf python --exclude python/dlisio/version.py
}