Former-commit-id:401ee156b8
[formerly337b138200
] [formerly70a6f1936e
] [formerly401ee156b8
[formerly337b138200
] [formerly70a6f1936e
] [formerly71ae71c850
[formerly70a6f1936e
[formerly c32b2b2037c84cc074e7dc5a5a13b93223640d7d]]]] Former-commit-id:71ae71c850
Former-commit-id:41a54a5ca6
[formerly8bd818de09
] [formerly 2a75dd3165e6ee0eb548ce9cbb694967018bb4bf [formerly5526a8999d
]] Former-commit-id: 163b900bd16bb48d13431ad4d1511ea0204fdfed [formerlyf88a635a58
] Former-commit-id:bfa9d638cc
132 lines
2.6 KiB
RPMSpec
132 lines
2.6 KiB
RPMSpec
%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"
|
|
%define _python_build_loc %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
#
|
|
# AWIPS II Python numpy Spec File
|
|
#
|
|
Name: awips2-python-numpy
|
|
Summary: AWIPS II Python numpy Distribution
|
|
Version: 1.5.0
|
|
Release: 3.el6.p1
|
|
Group: AWIPSII
|
|
BuildRoot: %{_build_root}
|
|
BuildArch: %{_build_arch}
|
|
URL: N/A
|
|
License: N/A
|
|
Distribution: N/A
|
|
Vendor: Raytheon
|
|
Packager: Bryan Kowal
|
|
|
|
AutoReq: no
|
|
requires: awips2-python
|
|
requires: awips2-python-nose
|
|
provides: awips2-python-numpy
|
|
|
|
%description
|
|
AWIPS II Python numpy Site-Package
|
|
|
|
%prep
|
|
# Verify That The User Has Specified A BuildRoot.
|
|
if [ "%{_build_root}" = "" ]
|
|
then
|
|
echo "A Build Root has not been specified."
|
|
echo "Unable To Continue ... Terminating"
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf %{_build_root}
|
|
mkdir -p %{_build_root}
|
|
if [ -d %{_python_build_loc} ]; then
|
|
rm -rf %{_python_build_loc}
|
|
fi
|
|
mkdir -p %{_python_build_loc}
|
|
|
|
%build
|
|
NUMPY_SRC_DIR="%{_python_pkgs_dir}/numpy"
|
|
NUMPY_TAR="numpy-1.5.0.tar.gz"
|
|
NUMPY_PATCH="numpy.patch1"
|
|
cp -v ${NUMPY_SRC_DIR}/${NUMPY_TAR} \
|
|
%{_python_build_loc}
|
|
RC=$?
|
|
if [ ${RC} -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
cp -v %{_baseline_workspace}/rpms/python.site-packages/Installer.numpy/src/${NUMPY_PATCH} \
|
|
%{_python_build_loc}
|
|
RC=$?
|
|
if [ ${RC} -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
|
|
pushd . > /dev/null
|
|
cd %{_python_build_loc}
|
|
tar -xvf ${NUMPY_TAR}
|
|
RC=$?
|
|
if [ ${RC} -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
rm -fv ${NUMPY_TAR}
|
|
if [ ! -d numpy-1.5.0 ]; then
|
|
file numpy-1.5.0
|
|
exit 1
|
|
fi
|
|
source /etc/profile.d/awips2Python.sh
|
|
RC=$?
|
|
if [ ${RC} -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
cd numpy-1.5.0
|
|
# Apply the patch
|
|
patch -p1 -i ../${NUMPY_PATCH}
|
|
RC=$?
|
|
if [ ${RC} -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
/awips2/python/bin/python setup.py clean
|
|
RC=$?
|
|
if [ ${RC} -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
/awips2/python/bin/python setup.py build
|
|
RC=$?
|
|
if [ ${RC} -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
popd > /dev/null
|
|
|
|
%install
|
|
NUMPY_SRC_DIR="%{_python_pkgs_dir}/numpy"
|
|
|
|
pushd . > /dev/null
|
|
cd %{_python_build_loc}/numpy-1.5.0
|
|
export LD_LIBRARY_PATH=/awips2/python/lib
|
|
/awips2/python/bin/python setup.py install \
|
|
--root=%{_build_root} \
|
|
--prefix=/awips2/python
|
|
RC=$?
|
|
if [ ${RC} -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
popd > /dev/null
|
|
|
|
%pre
|
|
|
|
%post
|
|
|
|
%preun
|
|
|
|
%postun
|
|
|
|
%clean
|
|
rm -rf %{_build_root}
|
|
rm -rf %{_python_build_loc}
|
|
|
|
%files
|
|
%defattr(644,awips,fxalpha,755)
|
|
%dir /awips2/python/lib/python2.7/site-packages
|
|
/awips2/python/lib/python2.7/site-packages/*
|
|
%defattr(755,awips,fxalpha,755)
|
|
%dir /awips2/python/bin
|
|
/awips2/python/bin/*
|