62 lines
1.9 KiB
RPMSpec
62 lines
1.9 KiB
RPMSpec
# Change the brp-python-bytecompile script to use the AWIPS2 version of Python. #7237
|
|
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's/\/usr\/bin\/python/\/awips2\/python\/bin\/python/g')
|
|
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
|
|
%define _installed_python %(if [ -f /awips2/python/bin/python ]; then /awips2/python/bin/python -c 'import sys; print(".".join(map(str, sys.version_info[:3])))'; else echo 0; fi)
|
|
%define _installed_python_short %(if [ -f /awips2/python/bin/python ]; then /awips2/python/bin/python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))'; else echo 0; fi)
|
|
|
|
#
|
|
# AWIPS II Python ufpy Spec File
|
|
#
|
|
Name: awips2-python-ufpy
|
|
Summary: AWIPS II Python ufpy Distribution
|
|
Version: %{_component_version}
|
|
Release: %{_installed_python}.%{_component_release}%{?dist}
|
|
Group: AWIPSII
|
|
BuildRoot: %{_build_root}
|
|
BuildArch: noarch
|
|
URL: N/A
|
|
License: N/A
|
|
Distribution: N/A
|
|
Vendor: %{_build_vendor}
|
|
Packager: %{_build_site}
|
|
|
|
AutoReq: no
|
|
Requires: awips2-python = %{_installed_python}
|
|
Provides: awips2-python-ufpy = %{version}
|
|
|
|
BuildRequires: awips2-python
|
|
|
|
%description
|
|
AWIPS II Python ufpy Site-Package - 64-bit.
|
|
|
|
%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}
|
|
if [ $? -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
|
|
%install
|
|
mkdir -p %{_build_root}/awips2/python/lib/python%{_installed_python_short}/site-packages/ufpy
|
|
if [ $? -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
|
|
UFPY_SRC_DIR="%{_python_pkgs_dir}/ufpy"
|
|
cp -rv ${UFPY_SRC_DIR}/* \
|
|
%{_build_root}/awips2/python/lib/python%{_installed_python_short}/site-packages/ufpy
|
|
|
|
%clean
|
|
rm -rf %{_build_root}
|
|
|
|
%files
|
|
%defattr(644,awips,fxalpha,755)
|
|
%dir /awips2/python/lib/python%{_installed_python_short}/site-packages/ufpy
|
|
/awips2/python/lib/python%{_installed_python_short}/site-packages/ufpy/*
|