diff --git a/edexOsgi/com.raytheon.uf.edex.cots.feature/feature.xml b/edexOsgi/com.raytheon.uf.edex.cots.feature/feature.xml
index a2703ebe3c..120bc20d5e 100644
--- a/edexOsgi/com.raytheon.uf.edex.cots.feature/feature.xml
+++ b/edexOsgi/com.raytheon.uf.edex.cots.feature/feature.xml
@@ -89,13 +89,6 @@
install-size="0"
version="0.0.0"/>
-
-
/dev/null
-cd %{_build_root}/build-python
+cd %{_python_build_loc}
tar -xvf ${PYCAIRO_TAR}
if [ $? -ne 0 ]; then
exit 1
fi
-popd > /dev/null
-%build
-pushd . > /dev/null
-cd %{_build_root}/build-python/pycairo-1.2.2
-./configure --prefix=%{_build_root}/awips2/python
+cd pycairo-1.2.2
+./configure --prefix=/awips2/python
if [ $? -ne 0 ]; then
exit 1
fi
@@ -70,16 +72,15 @@ popd > /dev/null
%install
pushd . > /dev/null
-cd %{_build_root}/build-python/pycairo-1.2.2
-make install
+cd %{_python_build_loc}/pycairo-1.2.2
+make install prefix=%{_build_root}/awips2/python
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null
-rm -rf %{_build_root}/build-python
-
%clean
+rm -rf %{_python_build_loc}
rm -rf ${RPM_BUILD_ROOT}
%files
@@ -87,4 +88,4 @@ rm -rf ${RPM_BUILD_ROOT}
%dir /awips2/python/lib
/awips2/python/lib/*
%dir /awips2/python/include
-/awips2/python/include/*
\ No newline at end of file
+/awips2/python/include/*
diff --git a/rpms/python.site-packages/Installer.pygtk/component.spec b/rpms/python.site-packages/Installer.pygtk/component.spec
index 1a6f58eade..549250d389 100644
--- a/rpms/python.site-packages/Installer.pygtk/component.spec
+++ b/rpms/python.site-packages/Installer.pygtk/component.spec
@@ -1,6 +1,7 @@
%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 pygtk Spec File
@@ -37,29 +38,30 @@ fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
-mkdir -p %{_build_root}/build-python
+if [ -d %{_python_build_loc} ]; then
+ rm -rf %{_python_build_loc}
+fi
+mkdir -p %{_python_build_loc}
+%build
PYGTK_SRC_DIR="%{_python_pkgs_dir}/pygtk"
PYGTK_TAR="pygtk-2.8.6.tar.gz"
cp -v ${PYGTK_SRC_DIR}/${PYGTK_TAR} \
- %{_build_root}/build-python
+ %{_python_build_loc}
if [ $? -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
-cd %{_build_root}/build-python
+cd %{_python_build_loc}
tar -xvf ${PYGTK_TAR}
if [ $? -ne 0 ]; then
exit 1
fi
-popd > /dev/null
-%build
-pushd . > /dev/null
-cd %{_build_root}/build-python/pygtk-2.8.6
-./configure --prefix=%{_build_root}/awips2/python
+cd pygtk-2.8.6
+./configure --prefix=/awips2/python
if [ $? -ne 0 ]; then
exit 1
fi
@@ -71,17 +73,16 @@ popd > /dev/null
%install
pushd . > /dev/null
-cd %{_build_root}/build-python/pygtk-2.8.6
-make install
+cd %{_python_build_loc}/pygtk-2.8.6
+make install prefix=%{_build_root}/awips2/python
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null
-rm -rf %{_build_root}/build-python
-
%clean
rm -rf ${RPM_BUILD_ROOT}
+rm -rf %{_python_build_loc}
%files
%defattr(644,awips,fxalpha,755)
@@ -93,4 +94,4 @@ rm -rf ${RPM_BUILD_ROOT}
/awips2/python/share/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/python/bin
-/awips2/python/bin/*
\ No newline at end of file
+/awips2/python/bin/*
diff --git a/rpms/python.site-packages/Installer.shapely/component.spec b/rpms/python.site-packages/Installer.shapely/component.spec
index 4b929f7087..95bdceed2f 100644
--- a/rpms/python.site-packages/Installer.shapely/component.spec
+++ b/rpms/python.site-packages/Installer.shapely/component.spec
@@ -1,6 +1,7 @@
%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 shapely Spec File
@@ -44,7 +45,14 @@ fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
+if [ -d %{_build_root}/build-python ]; then
+ rm -rf %{_build_root}/build-python
+fi
mkdir -p %{_build_root}/build-python
+if [ -d %{_python_build_loc} ]; then
+ rm -rf %{_python_build_loc}
+fi
+mkdir -p %{_python_build_loc}
PYTHON_RPM_DIR="%{_baseline_workspace}/rpms/python.site-packages"
INSTALL_SETUPTOOLS_SH="${PYTHON_RPM_DIR}/deploy.builder/install-setuptools.sh"
@@ -56,12 +64,13 @@ if [ $? -ne 0 ]; then
fi
rm -rf %{_build_root}/build-python
-mkdir -p %{_build_root}/build-python
-mkdir -p %{_build_root}/awips2/python/lib
-mkdir -p %{_build_root}/awips2/python/bin
-mkdir -p %{_build_root}/awips2/python/include
%build
+
+%install
+_python_staging=%{_python_build_loc}/awips2/python
+
+mkdir -p %{_python_staging}
# build geos
__GEOS_TAR=geos-3.3.6.tar.bz2
__GEOS_UNTARRED=geos-3.3.6
@@ -69,18 +78,18 @@ PYTHON_RPM_DIR="%{_baseline_workspace}/rpms/python.site-packages"
INSTALLER_SHAPELY_DIR="${PYTHON_RPM_DIR}/Installer.shapely"
cp ${INSTALLER_SHAPELY_DIR}/${__GEOS_TAR} \
- %{_build_root}/build-python
+ %{_python_build_loc}
if [ $? -ne 0 ]; then
exit 1
fi
-cd %{_build_root}/build-python
+cd %{_python_build_loc}
tar -xvf ${__GEOS_TAR}
if [ $? -ne 0 ]; then
exit 1
fi
cd ${__GEOS_UNTARRED}
-./configure --prefix=%{_build_root}/awips2/python
+./configure --prefix=/awips2/python
if [ $? -ne 0 ]; then
exit 1
fi
@@ -88,7 +97,7 @@ make
if [ $? -ne 0 ]; then
exit 1
fi
-make install
+make install prefix=${_python_staging}
if [ $? -ne 0 ]; then
exit 1
fi
@@ -100,11 +109,11 @@ __SHAPELY_TAR=Shapely-1.2.16.tar.gz
__SHAPELY_UNTARRED=Shapely-1.2.16
cp %{_python_pkgs_dir}/${__SHAPELY}/${__SHAPELY_TAR} \
- %{_build_root}/build-python
+ %{_python_build_loc}
if [ $? -ne 0 ]; then
exit 1
fi
-cd %{_build_root}/build-python
+cd %{_python_build_loc}
tar -xvf ${__SHAPELY_TAR}
if [ $? -ne 0 ]; then
@@ -120,21 +129,23 @@ if [ $? -ne 0 ]; then
exit 1
fi
/awips2/python/bin/python setup.py install \
- --root=%{_build_root} \
+ --root=%{_python_build_loc} \
--prefix=/awips2/python
if [ $? -ne 0 ]; then
exit 1
fi
-
-rm -rf %{_build_root}/build-python
+mkdir -p %{_build_root}/awips2
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+cp -rf %{_python_build_loc}/awips2/* %{_build_root}/awips2
if [ $? -ne 0 ]; then
exit 1
fi
-%install
-
%clean
rm -rf %{_build_root}
+rm -rf %{_python_build_loc}
%files
%defattr(644,awips,fxalpha,755)
@@ -143,4 +154,4 @@ rm -rf %{_build_root}
%dir /awips2/python/lib
/awips2/python/lib/*
%dir /awips2/python/include
-/awips2/python/include/*
\ No newline at end of file
+/awips2/python/include/*