From 110b54688a8ade419918f2ab74d3f5722b7fe032 Mon Sep 17 00:00:00 2001 From: mjames-upc Date: Thu, 17 Aug 2017 08:48:00 -0600 Subject: [PATCH] new awips2-python-gfe rpm build --- .../gfe/userPython/gfeConfig/EditTopo.py | 20 ------ .../gfe/userPython/gfeConfig/NewTerrain.py | 20 ------ .../gfe/userPython/gfeConfig/gfeConfig.py | 22 +------ .../gfe/userPython/gfeConfig/imageTest1.py | 19 ------ .../base/gfe/textproducts/library/__init__.py | 19 ------ .../gfe/textproducts/preferences/__init__.py | 19 ------ .../templates/product/__init__.py | 2 + .../templates/utility/__init__.py | 2 + .../Installer.gfe/__init__.py | 2 + .../Installer.gfe/component.spec | 63 ++++++++++++------- 10 files changed, 48 insertions(+), 140 deletions(-) create mode 100644 edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/product/__init__.py create mode 100644 edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/utility/__init__.py create mode 100644 rpms/python.site-packages/Installer.gfe/__init__.py diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/EditTopo.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/EditTopo.py index 3d9f83a6d3..fc0fe92940 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/EditTopo.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/EditTopo.py @@ -1,23 +1,3 @@ -## -# This software was developed and / or modified by Raytheon Company, -# pursuant to Contract DG133W-05-CQ-1067 with the US Government. -# -# U.S. EXPORT CONTROLLED TECHNICAL DATA -# This software product contains export-restricted data whose -# export/transfer/disclosure is restricted by U.S. law. Dissemination -# to non-U.S. persons whether in the United States or abroad requires -# an export license or other authorization. -# -# Contractor Name: Raytheon Company -# Contractor Address: 6825 Pine Street, Suite 340 -# Mail Stop B8 -# Omaha, NE 68106 -# 402.291.0100 -# -# See the AWIPS II Master Rights File ("Master Rights File.pdf") for -# further licensing information. -## -# -*-python-*- # ---------------------------------------------------------------------------- # This software is in the public domain, furnished "as is", without technical # support, and with no warranty, express or implied, as to its usefulness for diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/NewTerrain.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/NewTerrain.py index 2cdf28225c..8e3e22db90 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/NewTerrain.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/NewTerrain.py @@ -1,23 +1,3 @@ -## -# This software was developed and / or modified by Raytheon Company, -# pursuant to Contract DG133W-05-CQ-1067 with the US Government. -# -# U.S. EXPORT CONTROLLED TECHNICAL DATA -# This software product contains export-restricted data whose -# export/transfer/disclosure is restricted by U.S. law. Dissemination -# to non-U.S. persons whether in the United States or abroad requires -# an export license or other authorization. -# -# Contractor Name: Raytheon Company -# Contractor Address: 6825 Pine Street, Suite 340 -# Mail Stop B8 -# Omaha, NE 68106 -# 402.291.0100 -# -# See the AWIPS II Master Rights File ("Master Rights File.pdf") for -# further licensing information. -## -# -*-python-*- # ---------------------------------------------------------------------------- # This software is in the public domain, furnished "as is", without technical # support, and with no warranty, express or implied, as to its usefulness for diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/gfeConfig.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/gfeConfig.py index 02e6474151..03a9873e40 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/gfeConfig.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/gfeConfig.py @@ -1,23 +1,3 @@ -## -# This software was developed and / or modified by Raytheon Company, -# pursuant to Contract DG133W-05-CQ-1067 with the US Government. -# -# U.S. EXPORT CONTROLLED TECHNICAL DATA -# This software product contains export-restricted data whose -# export/transfer/disclosure is restricted by U.S. law. Dissemination -# to non-U.S. persons whether in the United States or abroad requires -# an export license or other authorization. -# -# Contractor Name: Raytheon Company -# Contractor Address: 6825 Pine Street, Suite 340 -# Mail Stop B8 -# Omaha, NE 68106 -# 402.291.0100 -# -# See the AWIPS II Master Rights File ("Master Rights File.pdf") for -# further licensing information. -## -# -*-python-*- # NOTE: THIS FILE SHOULD NOT BE MODIFIED BY THE USER. INSTEAD, REFER TO # THE BASE,SITE,USER and GFE CONFIGURATION DOCUMENTATION ON HOW TO # OVERRIDE ENTRIES IN THIS FILE. @@ -222,7 +202,7 @@ PublishTimes = ['Today', 'Tonight', 'Tomorrow', 'Tomorrow Night', 'Day 3', # Defines the initial loaded set of map backgrounds. The name of each # background should match the name (without ".xml") of a map file in the # CAVE/Bundles/maps directory under the Localization perspective. -MapBackgrounds_default = ['States','CWA'] +MapBackgrounds_default = ['statesCounties','CWA_All'] # Specific Colors for a map background # The user may specify a specific color to be used for a map background, diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/imageTest1.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/imageTest1.py index d5f022039f..7a7d7c2ebe 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/imageTest1.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/gfeConfig/imageTest1.py @@ -1,22 +1,3 @@ -## -# This software was developed and / or modified by Raytheon Company, -# pursuant to Contract DG133W-05-CQ-1067 with the US Government. -# -# U.S. EXPORT CONTROLLED TECHNICAL DATA -# This software product contains export-restricted data whose -# export/transfer/disclosure is restricted by U.S. law. Dissemination -# to non-U.S. persons whether in the United States or abroad requires -# an export license or other authorization. -# -# Contractor Name: Raytheon Company -# Contractor Address: 6825 Pine Street, Suite 340 -# Mail Stop B8 -# Omaha, NE 68106 -# 402.291.0100 -# -# See the AWIPS II Master Rights File ("Master Rights File.pdf") for -# further licensing information. -## # Test file for ifpIMAGE from gfeConfig import * diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/library/__init__.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/library/__init__.py index f0606a3053..a32d83b83b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/library/__init__.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/library/__init__.py @@ -1,21 +1,2 @@ -## -# This software was developed and / or modified by Raytheon Company, -# pursuant to Contract DG133W-05-CQ-1067 with the US Government. -# -# U.S. EXPORT CONTROLLED TECHNICAL DATA -# This software product contains export-restricted data whose -# export/transfer/disclosure is restricted by U.S. law. Dissemination -# to non-U.S. persons whether in the United States or abroad requires -# an export license or other authorization. -# -# Contractor Name: Raytheon Company -# Contractor Address: 6825 Pine Street, Suite 340 -# Mail Stop B8 -# Omaha, NE 68106 -# 402.291.0100 -# -# See the AWIPS II Master Rights File ("Master Rights File.pdf") for -# further licensing information. -## # Don't remove this file. This file indicates to python that this directory # should be included in the module search path. diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/preferences/__init__.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/preferences/__init__.py index f0606a3053..a32d83b83b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/preferences/__init__.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/preferences/__init__.py @@ -1,21 +1,2 @@ -## -# This software was developed and / or modified by Raytheon Company, -# pursuant to Contract DG133W-05-CQ-1067 with the US Government. -# -# U.S. EXPORT CONTROLLED TECHNICAL DATA -# This software product contains export-restricted data whose -# export/transfer/disclosure is restricted by U.S. law. Dissemination -# to non-U.S. persons whether in the United States or abroad requires -# an export license or other authorization. -# -# Contractor Name: Raytheon Company -# Contractor Address: 6825 Pine Street, Suite 340 -# Mail Stop B8 -# Omaha, NE 68106 -# 402.291.0100 -# -# See the AWIPS II Master Rights File ("Master Rights File.pdf") for -# further licensing information. -## # Don't remove this file. This file indicates to python that this directory # should be included in the module search path. diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/product/__init__.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/product/__init__.py new file mode 100644 index 0000000000..a32d83b83b --- /dev/null +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/product/__init__.py @@ -0,0 +1,2 @@ +# Don't remove this file. This file indicates to python that this directory +# should be included in the module search path. diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/utility/__init__.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/utility/__init__.py new file mode 100644 index 0000000000..a32d83b83b --- /dev/null +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/templates/utility/__init__.py @@ -0,0 +1,2 @@ +# Don't remove this file. This file indicates to python that this directory +# should be included in the module search path. diff --git a/rpms/python.site-packages/Installer.gfe/__init__.py b/rpms/python.site-packages/Installer.gfe/__init__.py new file mode 100644 index 0000000000..a32d83b83b --- /dev/null +++ b/rpms/python.site-packages/Installer.gfe/__init__.py @@ -0,0 +1,2 @@ +# Don't remove this file. This file indicates to python that this directory +# should be included in the module search path. diff --git a/rpms/python.site-packages/Installer.gfe/component.spec b/rpms/python.site-packages/Installer.gfe/component.spec index 4aeb01fbda..df2347c9aa 100644 --- a/rpms/python.site-packages/Installer.gfe/component.spec +++ b/rpms/python.site-packages/Installer.gfe/component.spec @@ -9,7 +9,7 @@ Name: awips2-python-gfe Summary: AWIPS II Python GFE Files Version: %{_component_version} -Release: 1 +Release: %{_component_release} Group: AWIPSII BuildRoot: %{_build_root} BuildArch: %{_build_arch} @@ -49,42 +49,61 @@ if [ $? -ne 0 ]; then exit 1 fi -cp -rv %{_baseline_workspace}/com.raytheon.uf.common.localization.python/utility/common_static/base/python/* \ - %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/ -cp -rv %{_baseline_workspace}/com.raytheon.edex.plugin.gfe/utility/common_static/base/python/gfe/*.py \ - %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/ -cp -rv %{_baseline_workspace}/com.raytheon.edex.plugin.gfe/utility/common_static/base/python/*.py \ - %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/ -cp -rv %{_baseline_workspace}/com.raytheon.uf.common.python/utility/common_static/base/python/*.py \ - %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/ -cp -rv %{_baseline_workspace}/com.raytheon.uf.common.status/utility/common_static/base/python/*.py \ - %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/ +# Copy source files to site-packages/gfe/ +pysrc=(%{_baseline_workspace}/deploy.edex.awips2/esb/data/utility/common_static/base/python/ +%{_baseline_workspace}/com.raytheon.viz.textworkstation/localization/textws/python/ +%{_baseline_workspace}/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/python/ +%{_baseline_workspace}/com.raytheon.uf.common.localization.python/utility/common_static/base/python/ +%{_baseline_workspace}/rpms/awips2.core/Installer.localization/utility/common_static/configured/OAX/gfe/python/ +%{_baseline_workspace}/com.raytheon.uf.common.python/utility/common_static/base/python/ +%{_baseline_workspace}/com.raytheon.uf.common.status/utility/common_static/base/python/ +%{_baseline_workspace}/com.raytheon.uf.edex.activetable/utility/common_static/base/vtec/ +%{_baseline_workspace}/com.raytheon.uf.common.time/utility/common_static/base/python/time/ +%{_baseline_workspace}/com.raytheon.uf.edex.dataaccess/utility/common_static/base/python/dataaccess/ +%{_baseline_workspace}/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/python/) -mkdir -p %{_build_root}/awips2/python/lib/python2.7/site-packages/vtec -if [ $? -ne 0 ]; then - exit 1 -fi -cp -rv %{_baseline_workspace}/com.raytheon.uf.edex.activetable/utility/common_static/base/vtec/*.py \ - %{_build_root}/awips2/python/lib/python2.7/site-packages/vtec +for dir in "${pysrc[@]}"; do + echo ${dir} + cp ${dir}*.py %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/ +done + +# Copy entire directories to site-packages/gfe/ (each requires __init__.py) +pydirs=(%{_baseline_workspace}/com.raytheon.viz.gfe/localization/gfe/userPython/utilities/ +%{_baseline_workspace}/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/python/isc/ +%{_baseline_workspace}/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/textproducts/ +%{_baseline_workspace}/com.raytheon.uf.tools.gfesuite/cli/src/activeTable/) + +for dir in "${pydirs[@]}"; do + cp -R ${dir} %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/ +done + +mv %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/textproducts/templates/product/*.py %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/ +mv %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/textproducts/templates/utility/*.py %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/ + +cp %{_baseline_workspace}/rpms/python.site-packages/Installer.gfe/__init__.py %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/activeTable/ +cp %{_baseline_workspace}/rpms/python.site-packages/Installer.gfe/__init__.py %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/isc/ +cp %{_baseline_workspace}/rpms/python.site-packages/Installer.gfe/__init__.py %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/utilities/ + +find %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe -name "*.pyc" | xargs rm -rf %pre if [ -d /awips2/python/lib/python2.7/site-packages/gfe ]; then rm -rf /awips2/python/lib/python2.7/site-packages/gfe fi -if [ -d /awips2/python/lib/python2.7/site-packages/vtec ]; then - rm -rf /awips2/python/lib/python2.7/site-packages/vtec -fi %post %preun %postun +if [ -d /awips2/python/lib/python2.7/site-packages/gfe ]; then + rm -rf /awips2/python/lib/python2.7/site-packages/gfe +fi %clean rm -rf %{_build_root} %files %defattr(644,awips,fxalpha,755) -%dir /awips2/python/lib/python2.7/site-packages -/awips2/python/lib/python2.7/site-packages/* +%dir /awips2/python/lib/python2.7/site-packages/gfe +/awips2/python/lib/python2.7/site-packages/gfe*