2012-08-21 15:27:03 -05:00
|
|
|
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
|
|
|
|
%define _build_arch %(uname -i)
|
|
|
|
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
|
|
|
|
|
2012-01-20 13:38:00 -06:00
|
|
|
#
|
2012-08-21 15:27:03 -05:00
|
|
|
# AWIPS II Python scientific Spec File
|
2012-01-20 13:38:00 -06:00
|
|
|
#
|
|
|
|
Name: awips2-python-scientific
|
2012-08-21 15:27:03 -05:00
|
|
|
Summary: AWIPS II Python scientific Distribution
|
2012-01-20 13:38:00 -06:00
|
|
|
Version: 2.8
|
2012-08-21 15:27:03 -05:00
|
|
|
Release: 3
|
2012-01-20 13:38:00 -06:00
|
|
|
Group: AWIPSII
|
2012-08-21 15:27:03 -05:00
|
|
|
BuildRoot: %{_build_root}
|
|
|
|
BuildArch: %{_build_arch}
|
2012-01-20 13:38:00 -06:00
|
|
|
URL: N/A
|
|
|
|
License: N/A
|
|
|
|
Distribution: N/A
|
|
|
|
Vendor: Raytheon
|
|
|
|
Packager: Bryan Kowal
|
|
|
|
|
|
|
|
AutoReq: no
|
|
|
|
requires: awips2-python
|
|
|
|
provides: awips2-python-scientific
|
|
|
|
|
|
|
|
%description
|
2012-08-21 15:27:03 -05:00
|
|
|
AWIPS II Python scientific Site-Package - 64-bit.
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
%prep
|
|
|
|
# Verify That The User Has Specified A BuildRoot.
|
2012-08-21 15:27:03 -05:00
|
|
|
if [ "%{_build_root}" = "" ]
|
2012-01-20 13:38:00 -06:00
|
|
|
then
|
2012-08-21 15:27:03 -05:00
|
|
|
echo "A Build Root has not been specified."
|
2012-01-20 13:38:00 -06:00
|
|
|
echo "Unable To Continue ... Terminating"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
rm -rf %{_build_root}
|
|
|
|
mkdir -p %{_build_root}
|
|
|
|
mkdir -p %{_build_root}/build-python
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
%build
|
2012-08-21 15:27:03 -05:00
|
|
|
SCIENTIFIC_SRC_DIR="%{_python_pkgs_dir}/scientific"
|
2012-01-20 13:38:00 -06:00
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
cp -rv ${SCIENTIFIC_SRC_DIR}/* \
|
|
|
|
%{_build_root}/build-python
|
|
|
|
RC=$?
|
|
|
|
if [ ${RC} -ne 0 ]; then
|
2012-01-20 13:38:00 -06:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
pushd . > /dev/null
|
|
|
|
cd %{_build_root}/build-python
|
|
|
|
export LD_LIBRARY_PATH=/awips2/python/lib
|
|
|
|
/awips2/python/bin/python setup.py build
|
|
|
|
RC=$?
|
|
|
|
if [ ${RC} -ne 0 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
popd > /dev/null
|
2012-01-20 13:38:00 -06:00
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
%install
|
2012-01-20 13:38:00 -06:00
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
pushd . > /dev/null
|
|
|
|
cd %{_build_root}/build-python
|
|
|
|
export LD_LIBRARY_PATH=/awips2/python/lib
|
|
|
|
/awips2/python/bin/python setup.py install \
|
|
|
|
--root=%{_build_root} \
|
2012-01-20 13:38:00 -06:00
|
|
|
--prefix=/awips2/python
|
2012-08-21 15:27:03 -05:00
|
|
|
RC=$?
|
|
|
|
if [ ${RC} -ne 0 ]; then
|
2012-01-20 13:38:00 -06:00
|
|
|
exit 1
|
|
|
|
fi
|
2012-08-21 15:27:03 -05:00
|
|
|
popd > /dev/null
|
2012-01-20 13:38:00 -06:00
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
rm -rf %{_build_root}/build-python
|
2012-01-20 13:38:00 -06:00
|
|
|
|
2012-08-21 15:27:03 -05:00
|
|
|
%clean
|
|
|
|
rm -rf %{_build_root}
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(644,awips,fxalpha,755)
|
2012-08-21 15:27:03 -05:00
|
|
|
%dir /awips2/python/lib/python2.7/site-packages
|
2012-01-20 13:38:00 -06:00
|
|
|
/awips2/python/lib/python2.7/site-packages/*
|
2012-08-21 15:27:03 -05:00
|
|
|
%dir /awips2/python/include
|
2012-01-20 13:38:00 -06:00
|
|
|
/awips2/python/include/*
|
|
|
|
%defattr(755,awips,fxalpha,755)
|
2012-08-21 15:27:03 -05:00
|
|
|
%dir /awips2/python/bin
|
|
|
|
/awips2/python/bin/*
|