58 lines
1.8 KiB
Plaintext
Executable File
58 lines
1.8 KiB
Plaintext
Executable File
#!/usr/bin/env modbuild
|
|
|
|
pbuild::set_download_url "https://www.python.org/ftp/python/${V_PKG}/$P-${V_PKG}.tgz"
|
|
|
|
pbuild::set_sha256sum 'Python-3.7.3.tgz:d62e3015f2f89c970ac52343976b406694931742fbde2fed8d1ce8ebb4e1f8ff'
|
|
|
|
pbuild::add_to_group 'Programming'
|
|
|
|
if (( V_MAJOR == 2 )); then
|
|
pbuild::add_configure_args "LDFLAGS=-L${OPENSSL_LIBRARY_DIR}"
|
|
pbuild::add_configure_args "CPPFLAGS=-fPIC -I${OPENSSL_INCLUDE_DIR} -I${OPENSSL_INCLUDE_DIR}/openssl"
|
|
pbuild::add_configure_args "--enable-shared"
|
|
elif (( V_MAJOR == 3 )) && (( V_MINOR <= 6 )); then
|
|
pbuild::add_configure_args "LDFLAGS=-L${OPENSSL_LIBRARY_DIR}"
|
|
pbuild::add_configure_args "CPPFLAGS=-fPIC -I${OPENSSL_INCLUDE_DIR} -I${OPENSSL_INCLUDE_DIR}/openssl"
|
|
pbuild::add_configure_args "--enable-shared"
|
|
else
|
|
pbuild::add_configure_args "--enable-shared"
|
|
pbuild::add_configure_args "--with-openssl=${OPENSSL_DIR}"
|
|
pbuild::add_configure_args "--enable-optimizations"
|
|
fi
|
|
|
|
pbuild::post_install() {
|
|
export LD_LIBRARY_PATH+=":${PREFIX}/lib"
|
|
export LDFLAGS="-L${OPENSSL_LIBRARY_DIR}"
|
|
export CPPFLAGS="-I${OPENSSL_INCLUDE_DIR} -I${OPENSSL_INCLUDE_DIR}/openssl"
|
|
export LD_LIBRARY_PATH+=":${PREFIX}/lib"
|
|
ln -fs "${PREFIX}/bin/python${V%%.*}" "${PREFIX}/bin/python"
|
|
ln -fs "${PREFIX}/include/python${V%.*}m" "${PREFIX}/include/python"
|
|
ln -fs "${PREFIX}/include/python${V%.*}m" "${PREFIX}/include/python${V%.*}"
|
|
PATH+=":${PREFIX}/bin"
|
|
cd "${BUILDBLOCK_DIR}"
|
|
"${PREFIX}/bin/python" 'get-pip.py'
|
|
|
|
std::info "Building numpy\n"
|
|
pip${V_MAJOR} install numpy
|
|
|
|
std::info "Building scipy\n"
|
|
pip${V_MAJOR} install scipy
|
|
|
|
std::info "Building matplotlub\n"
|
|
pip${V_MAJOR} install matplotlib
|
|
|
|
std::info "Building ipython\n"
|
|
pip${V_MAJOR} install ipython
|
|
|
|
std::info "Building sympy\n"
|
|
pip${V_MAJOR} install sympy
|
|
|
|
std::info "Building nose\n"
|
|
pip${V_MAJOR} install nose
|
|
|
|
std::info "Building h5py\n"
|
|
pip${V_MAJOR} install h5py
|
|
}
|
|
|
|
|