# # AWIPS II Python scipy Site-Package Spec File # Name: awips2-python-scipy Summary: AWIPS II Python scipy Site-Package Version: 0.8.0 Release: 2 Group: AWIPSII BuildRoot: /tmp URL: N/A License: N/A Vendor: Raytheon Packager: Bryan Kowal AutoReq: no requires: awips2-python provides: awips2-python-numpy provides: awips2-python-scipy %define _docdir python.scipy %description AWIPS II Python scipy Site-Package - Installs the AWIPS II Python scipy Site-Package in the Python installation. # Turn off the brp-python-bytecompile script %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') %prep # Verify That The User Has Specified A BuildRoot. if [ "${RPM_BUILD_ROOT}" = "/tmp" ] then echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter." echo "Unable To Continue ... Terminating" exit 1 fi mkdir -p ${RPM_BUILD_ROOT} %build SITE_PACKAGE_SRC_DIR="pythonPackages/scipy" export BLAS=/awips2/python/lib export LAPACK=/awips2/python/lib cd ${WORKSPACE_DIR}/${SITE_PACKAGE_SRC_DIR} ${PYTHON_EXE} setup.py build SC="$?" if [ "${SC}" = "1" ]; then exit 1 fi %install SITE_PACKAGE_SRC_DIR="pythonPackages/scipy" GNU_PY_FILE="deploy.builder/pre-reqs/gnu.py" export BLAS=/awips2/python/lib export LAPACK=/awips2/python/lib #Overwrite the existing gnu.py File so that we will be able to #do a 32-bit file. In the future, this will be conditional ... rm -f /awips2/python/lib/.site-packages/numpy/distutils/fcompiler/gnu.py cp ${WORKSPACE_DIR}/Installer.rpm/python.site-packages/${GNU_PY_FILE} \ /awips2/python/lib/.site-packages/numpy/distutils/fcompiler/ cd ${WORKSPACE_DIR}/${SITE_PACKAGE_SRC_DIR} ${PYTHON_EXE} setup.py install --root=${RPM_BUILD_ROOT} \ --prefix=/awips2/python SC="$?" if [ "${SC}" = "1" ]; then exit 1 fi %pre if [ -d /usr/share/doc/awips2/%{_docdir} ]; then rm -rf /usr/share/doc/awips2/%{_docdir} fi PYTHON_INSTALL="/awips2/python" echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m" echo -e "\e[1;34m\| Installing the AWIPS II Python scipy Site-Package...\e[m" echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m" echo -e "\e[1;34m Python Install Root = ${PYTHON_INSTALL}\e[m" %post PYTHON_INSTALL="/awips2/python" PYTHON_PACKAGE_DIR=${PYTHON_INSTALL}/lib/python2.7/site-packages # chmod all "test*.py" files so that it will be possible to successfully run the unit # tests to prove that the install was successful. cd ${PYTHON_PACKAGE_DIR}/scipy find . -name "test*.py" -exec chmod -x {} \; echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m" echo -e "\e[1;32m\| AWIPS II Python scipy Site-Package Installation - COMPLETE\e[m" echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m" %preun %postun # Remove the component directory from site-packages echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m" echo -e "\e[1;34m\| The AWIPS II Python scipy Site-Package Has Been Successfully Removed\e[m" echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m" echo "" %files %defattr(644,awips,fxalpha,755) /awips2/python/lib/python2.7/site-packages/*