-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigure.sh
More file actions
51 lines (41 loc) · 1.42 KB
/
configure.sh
File metadata and controls
51 lines (41 loc) · 1.42 KB
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
#!/usr/bin/bash
# Will exit the Bash script the moment any command will itself exit with a non-zero status, thus an error.
set -e
EXTRACT_PATH=$1
BUILD_PATH=$2
INSTALL_PATH=${REZ_BUILD_INSTALL_PATH}
PYTHON_VERSION=${REZ_BUILD_PROJECT_VERSION}
# We print the arguments passed to the Bash script.
echo -e "\n"
echo -e "================="
echo -e "=== CONFIGURE ==="
echo -e "================="
echo -e "\n"
echo -e "[CONFIGURE][ARGS] EXTRACT PATH: ${EXTRACT_PATH}"
echo -e "[CONFIGURE][ARGS] BUILD PATH: ${BUILD_PATH}"
echo -e "[CONFIGURE][ARGS] INSTALL PATH: ${INSTALL_PATH}"
echo -e "[CONFIGURE][ARGS] PYTHON VERSION: ${PYTHON_VERSION}"
# We check if the arguments variables we need are correctly set.
# If not, we abort the process.
if [[ -z ${EXTRACT_PATH} || -z ${BUILD_PATH} || -z ${INSTALL_PATH} || -z ${PYTHON_VERSION} ]]; then
echo -e "\n"
echo -e "[CONFIGURE][ARGS] One or more of the argument variables are empty. Aborting..."
echo -e "\n"
exit 1
fi
# We run the configuration script of Python.
echo -e "\n"
echo -e "[CONFIGURE] Running the configuration script from Python-${PYTHON_VERSION}..."
echo -e "\n"
mkdir -p ${BUILD_PATH}
cd ${BUILD_PATH}
${EXTRACT_PATH}/configure \
--prefix=${INSTALL_PATH} \
CFLAGS="-fPIC" \
CXXFLAGS="-fPIC" \
--enable-ipv6 \
--enable-unicode=ucs4 \
--with-ensurepip=install
echo -e "\n"
echo -e "[CONFIGURE] Finished configuring Python-${PYTHON_VERSION}!"
echo -e "\n"