Python3.6.15编译和安装
2022-03-29 22:27:41
标签: python
#!/bin/bash
# Python3.6.15编译和安装
software_path=(
"/opt/zlib-1.2.11"
"/opt/openssl-1.1.1m"
"/opt/sqlite-autoconf-3370200"
"/opt/ncurses-6.3"
"/opt/gettext-0.21"
)
for ipath in ${software_path[@]}
do
if [ -z
"$include_paths" ]
then
include_paths="-I${ipath}/include"
else
include_paths="${include_paths}
-I${ipath}/include"
fi
if [ -z "$lib_paths"
]
then
lib_paths="-L${ipath}/lib
-Wl,--rpath=${ipath}/lib"
else
lib_paths="${lib_paths} -L${ipath}/lib
-Wl,--rpath=${ipath}/lib"
fi
done
export CC=gcc
export CPPFLAGS="$include_paths"
export LDFLAGS="$lib_paths"
./configure \
--prefix=/opt/python3.6.15 \
--enable-shared \
--enable-optimizations \
--enable-loadable-sqlite-extensions \
--enable-ipv6 \
--with-assertions \
--with-lto \
--with-threads \
--with-doc-strings \
--with-fpectl \
&& make
#make install
Python3.6.15编译和安装
#!/bin/bash
# Python3.6.15编译和安装
software_path=(
"/opt/zlib-1.2.11"
"/opt/openssl-1.1.1m"
"/opt/sqlite-autoconf-3370200"
"/opt/ncurses-6.3"
"/opt/gettext-0.21"
)
for ipath in ${software_path[@]}
do
if [ -z "$include_paths" ]
then
include_paths="-I${ipath}/include"
else
include_paths="${include_paths} -I${ipath}/include"
fi
if [ -z "$lib_paths" ]
then
lib_paths="-L${ipath}/lib -Wl,--rpath=${ipath}/lib"
else
lib_paths="${lib_paths} -L${ipath}/lib -Wl,--rpath=${ipath}/lib"
fi
done
export CC=gcc
export CPPFLAGS="$include_paths"
export LDFLAGS="$lib_paths"
./configure \
--prefix=/opt/python3.6.15 \
--enable-shared \
--enable-optimizations \
--enable-loadable-sqlite-extensions \
--enable-ipv6 \
--with-assertions \
--with-lto \
--with-threads \
--with-doc-strings \
--with-fpectl \
&& make
#make install