cycler 0.10.0

Former-commit-id: 3b4f8b1d86
This commit is contained in:
mjames-upc 2016-03-18 19:51:05 -06:00
parent e2adf2842d
commit 301fe5f432
2 changed files with 116 additions and 0 deletions

Binary file not shown.

View file

@ -0,0 +1,116 @@
%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 _version 0.10.0
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
%define _python_build_loc %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#
# AWIPS II Python cycler Spec File
#
Name: awips2-python-cycler
Summary: AWIPS II Python cycler Distribution
Version: %{_version}
Release: 2
Group: AWIPSII
BuildRoot: %{_build_root}
BuildArch: %{_build_arch}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Unidata
Packager: Michael James
AutoReq: no
requires: awips2-python
provides: awips2-python-cycler
%description
AWIPS II Python cycler 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
CYCLER_SRC_DIR="%{_python_pkgs_dir}/cycler"
CYCLER_TAR="cycler-%{_version}.tar.gz"
cp -v ${CYCLER_SRC_DIR}/${CYCLER_TAR} \
%{_python_build_loc}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_python_build_loc}
tar -xvf ${CYCLER_TAR}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
rm -fv ${CYCLER_TAR}
if [ ! -d cycler-%{_version} ]; then
file cycler-%{_version}
exit 1
fi
source /etc/profile.d/awips2.sh
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
cd cycler-%{_version}
/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
CYCLER_SRC_DIR="%{_python_pkgs_dir}/cycler"
pushd . > /dev/null
cd %{_python_build_loc}/cycler-%{_version}
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/*