-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcheck-build-2.7.13.sh
executable file
·68 lines (66 loc) · 2.32 KB
/
check-build-2.7.13.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
#!/bin/bash -e
. /etc/profile.d/modules.sh
module load ci
module add bzip2
module add sqlite
module add readline
module add ncurses
module add openssl/1.0.2j
module add gcc/${GCC_VERSION}
echo "checking $NAME"
cd ${WORKSPACE}/Python-${VERSION}/build-${BUILD_NUMBER}
# Python site packages are separated out by major version numbers, so we extract that to use it later
# in the PYTHONPATH
VERSION_MAJOR=${VERSION:0:3} # Should be 2.7 or 3.4 or similar
if make test 2> tests.out
then : tests have passed
else : tests have failed see test.out
fi
echo $?
# "Warning
# make install can overwrite or masquerade the python binary. make altinstall is therefore recommended instead of make install since it
# only installs exec_prefix/bin/pythonversion.
# see : https://docs.python.org/2/using/unix.html#building-python
make install
# alt install seemd to have not installed the binaries.
mkdir -p modules
(
cat <<MODULE_FILE
#%Module1.0
## $NAME modulefile
##
proc ModulesHelp { } {
puts stderr " This module does nothing but alert the user"
puts stderr " that the [module-info name] module is not available"
}
conflict python
module add gcc/${GCC_VERSION}
module add bzip2
module add sqlite
module add readline
module add ncurses
module add openssl/1.0.2j
module-whatis "$NAME $VERSION. compiled for GCC ${GCC_VERSION}"
setenv PYTHON_VERSION $VERSION
setenv PYTHON_DIR /data/ci-build/$::env(SITE)/$::env(OS)/$::env(ARCH)/$NAME/$VERSION-gcc-${GCC_VERSION}
setenv PYTHONHOME $::env(PYTHON_DIR)
setenv PYTHONPATH $::env(PYTHON_DIR)/lib/python${VERSION_MAJOR}
prepend-path PATH $::env(PYTHON_DIR)/bin
prepend-path LD_LIBRARY_PATH $::env(PYTHON_DIR)/lib
prepend-path CFLAGS "-I$::env(PYTHON_DIR)/include"
prepend-path LDFLAGS "-L$::env(PYTHON_DIR)/lib"
MODULE_FILE
) > modules/$VERSION-gcc-${GCC_VERSION}
mkdir -p $LIBRARIES/$NAME
cp modules/$VERSION-gcc-${GCC_VERSION} $LIBRARIES/$NAME
module avail ${NAME}
module add python/$VERSION-gcc-${GCC_VERSION}
echo "Our python is"
which python
python${VERSION_MAJOR} --version
## run some checks
echo "checking easy_install and pip"
which easy_install-${VERSION_MAJOR}
which pip${VERSION_MAJOR}
pip${VERSION_MAJOR} install -U pip
pip${VERSION_MAJOR} install -r ${WORKSPACE}/requirements.txt