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"
|
2013-07-10 15:20:54 -05:00
|
|
|
%define _python_build_loc %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
2012-08-21 15:27:03 -05:00
|
|
|
|
2012-01-20 13:38:00 -06:00
|
|
|
#
|
2012-08-21 15:27:03 -05:00
|
|
|
# AWIPS II Python werkzeug Spec File
|
2012-01-20 13:38:00 -06:00
|
|
|
#
|
|
|
|
Name: awips2-python-werkzeug
|
2012-08-21 15:27:03 -05:00
|
|
|
Summary: AWIPS II Python werkzeug Distribution
|
2016-06-27 14:17:07 -05:00
|
|
|
Version: 3.1.2
|
|
|
|
Release: 3%{?dist}
|
2012-01-20 13:38:00 -06:00
|
|
|
Group: AWIPSII
|
2012-08-21 15:27:03 -05:00
|
|
|
BuildRoot: %{_build_root}
|
2013-07-10 15:20:54 -05:00
|
|
|
BuildArch: noarch
|
2012-01-20 13:38:00 -06:00
|
|
|
URL: N/A
|
|
|
|
License: N/A
|
|
|
|
Distribution: N/A
|
2016-10-13 17:53:40 -05:00
|
|
|
Vendor: %{_build_vendor}
|
2015-12-03 09:59:15 -06:00
|
|
|
Packager: %{_build_site}
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
AutoReq: no
|
2016-11-18 09:24:02 -07:00
|
|
|
Requires: awips2-python
|
2015-11-19 13:21:11 -06:00
|
|
|
Provides: awips2-python-werkzeug = %{version}
|
|
|
|
|
|
|
|
BuildRequires: awips2-python
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
%description
|
2013-07-10 15:20:54 -05:00
|
|
|
AWIPS II Python werkzeug Site-Package
|
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}
|
2013-07-10 15:20:54 -05:00
|
|
|
if [ -d %{_python_build_loc} ]; then
|
|
|
|
rm -rf %{_python_build_loc}
|
|
|
|
fi
|
|
|
|
mkdir -p %{_python_build_loc}
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
%build
|
2012-08-21 15:27:03 -05:00
|
|
|
WERKZEUG_SRC_DIR="%{_python_pkgs_dir}/werkzeug"
|
|
|
|
cp -rv ${WERKZEUG_SRC_DIR}/* \
|
2013-07-10 15:20:54 -05:00
|
|
|
%{_python_build_loc}
|
2012-08-21 15:27:03 -05:00
|
|
|
RC=$?
|
|
|
|
if [ ${RC} -ne 0 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
pushd . > /dev/null
|
2013-07-10 15:20:54 -05:00
|
|
|
cd %{_python_build_loc}
|
2012-08-21 15:27:03 -05:00
|
|
|
/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
|
|
|
|
|
|
|
%install
|
2012-08-21 15:27:03 -05:00
|
|
|
pushd . > /dev/null
|
2013-07-10 15:20:54 -05:00
|
|
|
cd %{_python_build_loc}
|
2012-08-21 15:27:03 -05:00
|
|
|
/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
|
|
|
|
exit 1
|
2012-01-20 13:38:00 -06:00
|
|
|
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
|
|
|
%pre
|
2012-01-20 13:38:00 -06:00
|
|
|
|
|
|
|
%post
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
|
|
|
%postun
|
2012-08-21 15:27:03 -05:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{_build_root}
|
2013-07-10 15:20:54 -05:00
|
|
|
rm -rf %{_python_build_loc}
|
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
|
2013-07-10 15:20:54 -05:00
|
|
|
/awips2/python/lib/python2.7/site-packages/*
|