Merge branch '17-new-python-variants' into 'master'
Resolve "new Python variants" Closes #32 and #17 See merge request Pmodules/buildblocks!19
This commit is contained in:
@@ -1,14 +1,52 @@
|
||||
#!/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::set_sha256sum 'Python-2.7.12.tgz:3cb522d17463dfa69a155ab18cffa399b358c966c0363d6c8b5b3bf1384da4b6'
|
||||
pbuild::set_sha256sum 'Python-2.7.14.tgz:304c9b202ea6fbd0a4a8e0ad3733715fbd4749f2204a9173a58ec53c32ea73e8'
|
||||
pbuild::set_sha256sum 'Python-2.7.16.tgz:01da813a3600876f03f46db11cc5c408175e99f03af2ba942ef324389a83bad5'
|
||||
pbuild::set_sha256sum 'Python-3.6.3.tgz:ab6193af1921b30f587b302fe385268510e80187ca83ca82d2bfe7ab544c6f91'
|
||||
pbuild::set_sha256sum 'Python-3.7.3.tgz:d62e3015f2f89c970ac52343976b406694931742fbde2fed8d1ce8ebb4e1f8ff'
|
||||
pbuild::set_sha256sum 'Python-3.7.4.tgz:d63e63e14e6d29e17490abbe6f7d17afb3db182dbd801229f14e55f4157c4ba3'
|
||||
|
||||
pbuild::add_to_group 'Programming'
|
||||
|
||||
pbuild::pre_configure() {
|
||||
pbuild::add_configure_args "LDFLAGS=-L${OPENSSL_LIBRARY_DIR}"
|
||||
pbuild::add_configure_args "CPPFLAGS=-fPIC -I${OPENSSL_INCLUDE_DIR} -I${OPENSSL_INCLUDE_DIR}/openssl"
|
||||
local -a cflags=()
|
||||
local -a ldflags=()
|
||||
|
||||
cflags+=("-fPIC")
|
||||
cflags+=("-I${XZ_INCLUDE_DIR}")
|
||||
|
||||
ldflags+=("-L${XZ_LIBRARY_DIR}")
|
||||
|
||||
if (( V_MAJOR == 2 || (V_MAJOR == 3 && V_MINOR <= 6) )); then
|
||||
cflags+=("-I${OPENSSL_INCLUDE_DIR}" "-I${OPENSSL_INCLUDE_DIR}/openssl")
|
||||
ldflags+=("-L${OPENSSL_LIBRARY_DIR}")
|
||||
else
|
||||
pbuild::add_configure_args "--with-openssl=${OPENSSL_DIR}"
|
||||
pbuild::add_configure_args "--enable-optimizations"
|
||||
fi
|
||||
pbuild::add_configure_args "CFLAGS=${cflags[*]}"
|
||||
pbuild::add_configure_args "LDFLAGS=${ldflags[*]}"
|
||||
pbuild::add_configure_args "--enable-shared"
|
||||
}
|
||||
|
||||
pbuild::pre_configure_Linux() {
|
||||
pbuild::add_configure_args "--with-tcltk-includes=-I${TCLTK_INCLUDE_DIR}"
|
||||
pbuild::add_configure_args "--with-tcltk-libs=-L${TCLTK_LIBRARY_DIR} -ltcl8.6 -ltk8.6"
|
||||
}
|
||||
|
||||
pbuild::post_install_Linux() {
|
||||
install "${OPENSSL_LIBRARY_DIR}"/libcrypto.so.* "${PREFIX}/lib"
|
||||
install "${OPENSSL_LIBRARY_DIR}"/libssl.so.* "${PREFIX}/lib"
|
||||
install "${TCLTK_LIBRARY_DIR}"/libtcl*.so "${PREFIX}/lib"
|
||||
install "${TCLTK_LIBRARY_DIR}"/libtk*.so "${PREFIX}/lib"
|
||||
install "${XZ_LIBRARY_DIR}"/liblzma.so.* "${PREFIX}/lib"
|
||||
install /usr/lib64/libffi.so.* "${PREFIX}/lib"
|
||||
}
|
||||
|
||||
pbuild::post_install() {
|
||||
export LD_LIBRARY_PATH+=":${PREFIX}/lib"
|
||||
export LDFLAGS="-L${OPENSSL_LIBRARY_DIR}"
|
||||
@@ -20,14 +58,30 @@ pbuild::post_install() {
|
||||
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
|
||||
#pip${V_MAJOR} install pandas
|
||||
|
||||
std::info "Building sympy\n"
|
||||
pip${V_MAJOR} install sympy
|
||||
|
||||
std::info "Building nose\n"
|
||||
pip${V_MAJOR} install nose
|
||||
#pip${V_MAJOR} install mpi4py
|
||||
|
||||
std::info "Building h5py\n"
|
||||
pip${V_MAJOR} install h5py
|
||||
|
||||
std::info "Building pandas\n"
|
||||
pip${V_MAJOR} install pandas
|
||||
}
|
||||
|
||||
|
||||
|
||||
27
Programming/Python/files/test_tkinter
Executable file
27
Programming/Python/files/test_tkinter
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info >= (3,6):
|
||||
from tkinter import *
|
||||
else:
|
||||
from Tkinter import *
|
||||
|
||||
class App:
|
||||
def __init__(self, master):
|
||||
frame = Frame(master)
|
||||
frame.pack()
|
||||
self.button = Button(frame,
|
||||
text="QUIT",
|
||||
command=frame.quit)
|
||||
self.button.pack(side=LEFT)
|
||||
self.slogan = Button(frame,
|
||||
text="Hello",
|
||||
command=self.write_slogan)
|
||||
self.slogan.pack(side=LEFT)
|
||||
def write_slogan(self):
|
||||
print ("Tkinter is easy to use!")
|
||||
|
||||
root = Tk()
|
||||
app = App(root)
|
||||
root.mainloop()
|
||||
@@ -1,6 +0,0 @@
|
||||
Python/2.7.11 stable openssl/1.0.2j Tcl/8.6.4 Tk/8.6.4
|
||||
Python/2.7.12 stable openssl/1.0.2j Tcl/8.6.4 Tk/8.6.4
|
||||
Python/2.7.14 stable openssl/1.0.2o Tcl/8.6.4 Tk/8.6.4
|
||||
Python/2.7.16 stable openssl/1.0.2r Tcl/8.6.9 Tk/8.6.9
|
||||
Python/3.6.3 stable openssl/1.0.2m Tcl/8.6.4 Tk/8.6.4
|
||||
Python/3.7.3 unstable openssl/1.0.2r Tcl/8.6.9 Tk/8.6.9
|
||||
5
Programming/Python/files/variants.macos10.14
Normal file
5
Programming/Python/files/variants.macos10.14
Normal file
@@ -0,0 +1,5 @@
|
||||
Python/2.7.11 stable openssl/1.0.2j Tcl/8.6.4 Tk/8.6.4
|
||||
Python/2.7.12 stable openssl/1.0.2j Tcl/8.6.4 Tk/8.6.4
|
||||
Python/2.7.14 stable openssl/1.0.2o Tcl/8.6.4 Tk/8.6.4
|
||||
Python/2.7.16 stable openssl/1.0.2r b:xz/5.2.4
|
||||
Python/3.7.4 stable openssl/1.0.2r b:xz/5.2.4
|
||||
9
Programming/Python/files/variants.rhel6
Normal file
9
Programming/Python/files/variants.rhel6
Normal file
@@ -0,0 +1,9 @@
|
||||
Python/2.7.11 stable openssl/1.0.2j Tcl/8.6.4 Tk/8.6.4
|
||||
Python/2.7.12 stable openssl/1.0.2j Tcl/8.6.4 Tk/8.6.4
|
||||
Python/2.7.14 stable openssl/1.0.2o Tcl/8.6.4 Tk/8.6.4
|
||||
Python/2.7.16 stable b:openssl/1.0.2r b:TclTk/8.6.9 b:xz/5.2.4
|
||||
Python/3.4.0 deprecated openssl/1.0.2m Tcl/8.6.4 Tk/8.6.4
|
||||
Python/3.4.3 stable openssl/1.0.2m Tcl/8.6.4 Tk/8.6.4
|
||||
Python/3.6.3 stable b:openssl/1.0.2r b:TclTk/8.6.9 b:xz/5.2.4
|
||||
Python/3.7.3 stable b:openssl/1.0.2r b:TclTk/8.6.9 b:xz/5.2.4
|
||||
Python/3.7.4 stable b:openssl/1.0.2r b:TclTk/8.6.9 b:xz/5.2.4
|
||||
@@ -12,7 +12,15 @@ approach to object-oriented programming. Python’s elegant syntax
|
||||
and dynamic typing, together with its interpreted nature, make it
|
||||
an ideal language for scripting and rapid application development
|
||||
in many areas on most platforms.
|
||||
|
||||
The module provides (plain) Python plus the following Python modules:
|
||||
numpy
|
||||
scipy
|
||||
matplotlub
|
||||
ipython
|
||||
sympy
|
||||
nose
|
||||
h5py
|
||||
pandas
|
||||
"
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user