This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sh
62 lines (52 loc) · 1.68 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
# Define custom utilities
# Test for OSX with [ -n "$IS_OSX" ]
CFITSIO_VERSION=${CFITSIO_VERSION:-3370}
function build_cfitsio {
if [ -e cfitsio-stamp ]; then return; fi
if [ -n "$IS_OSX" ]; then
brew install cfitsio
else
# cannot use build_simple because cfitsio has no dash between name and version
local cfitsio_name_ver=cfitsio${CFITSIO_VERSION}
fetch_unpack https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/${cfitsio_name_ver}.tar.gz
(cd cfitsio \
&& ./configure --prefix=$BUILD_PREFIX \
&& make shared && make install)
fi
touch cfitsio-stamp
}
function pre_build {
# Any stuff that you need to do before you start building the wheels
# Runs in the root directory of this repository.
build_cfitsio
if [ -n "$IS_OSX" ]; then
install_pkg_config
fi
# Use c99 for NAN
export CFLAGS="-std=c99"
}
function pip_opts {
# Extra options for pip
if [ -n "$IS_OSX" ]; then
local suffix=scipy_installers
else
local suffix=manylinux
fi
echo "--only-binary matplotlib --find-links https://nipy.bic.berkeley.edu/$suffix"
}
function run_tests {
# Install cfitsio to run the combine tests
if [ -n "$IS_OSX" ]; then
# brew install cfitsio
echo "skip"
else
# Docker image uses trusty, so cfitsio 3.340
sudo apt-get install -y libcfitsio3-dev
fi
echo "backend : agg" > matplotlibrc
# Runs tests on installed distribution from an empty directory
MPDAF_INSTALL_DIR=$(dirname $(python -c 'import mpdaf; print(mpdaf.__file__)'))
echo $MPDAF_INSTALL_DIR
python --version
pytest $MPDAF_INSTALL_DIR
}