-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake-Python
More file actions
executable file
·70 lines (58 loc) · 1.72 KB
/
Copy pathmake-Python
File metadata and controls
executable file
·70 lines (58 loc) · 1.72 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/zsh
if [[ $# -ne 3 ]] && [[ $# -ne 4 ]]; then
echo "Usage: $0 PACKAGE_VERSION TARGETED_HOST CHECK [INSTALL_PIP=no]"
exit 2
fi
name=Python
_install_pip="${4}"
if [[ x${_install_pip} = x ]]; then
_install_pip=no
fi
check_arguments=( test )
check_jobs=1
ban_out_of_source_build=yes
templib=`mktemp -d || exit 1` || exit 1
echo 'GROUP ( /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a )' \
> "${templib}/libssl.so"
echo 'GROUP ( /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a )' \
> "${templib}/libcrypto.so"
echo 'GROUP ( /usr/local/lib/libzstd.a )' > "${templib}/libzstd.so"
echo 'GROUP ( /usr/local/lib/libgdbm.a )' > "${templib}/libgdbm.so"
echo 'GROUP ( /usr/local/lib/libgdbm.a /usr/local/lib/libgdbm_compat.a )' \
> "${templib}/libgdbm_compat.so"
export LIBRARY_PATH="${templib}:/usr/local/lib"
environment_variables=(
EXTRA_USR_LOCAL_CFLAGS='-O3'
)
configure_arguments=(
-C
--enable-optimizations
--with-lto=full
--with-readline=readline
--with-openssl=/usr/local
)
if [[ "${_install_pip}" = no ]] || [[ "${_install_pip}" = false ]]; then
configure_arguments+=( --with-ensurepip=no )
else
configure_arguments+=( --with-ensurepip=install )
fi
source shared/basic.zsh
#
# Make a link from python3 to python, etc.
#
(cd "${abs_destdir}"/usr/local/bin &&
ln -s python3 python &&
ln -s pydoc3 pydoc &&
ln -s idle3 idle &&
ln -s python3-config python-config) || ${bail_out}
if [[ "${_install_pip}" = no ]] || [[ "${_install_pip}" = false ]]; then
:
else
(cd "${abs_destdir}"/usr/local/bin &&
ln -s pip3 pip) || ${bail_out}
fi
#
# Remake the tarball.
#
make_package "${bin_tarball}" "${abs_destdir}" || ${bail_out}
rm -R -f "${templib}" || exit 1