[csw-devel] SF.net SVN: gar:[5019] csw/mgar/pkg/python/trunk/files
valholla at users.sourceforge.net
valholla at users.sourceforge.net
Sat May 23 06:00:12 CEST 2009
Revision: 5019
http://gar.svn.sourceforge.net/gar/?rev=5019&view=rev
Author: valholla
Date: 2009-05-23 04:00:12 +0000 (Sat, 23 May 2009)
Log Message:
-----------
classfile to replace post/pre scripts
Added Paths:
-----------
csw/mgar/pkg/python/trunk/files/i.pycompile
csw/mgar/pkg/python/trunk/files/r.pycompile
Removed Paths:
-------------
csw/mgar/pkg/python/trunk/files/CSWidle.postinstall
csw/mgar/pkg/python/trunk/files/CSWidle.preremove
csw/mgar/pkg/python/trunk/files/CSWidle.space
csw/mgar/pkg/python/trunk/files/CSWpython-tk.postinstall
csw/mgar/pkg/python/trunk/files/CSWpython-tk.preremove
csw/mgar/pkg/python/trunk/files/CSWpython-tk.space
csw/mgar/pkg/python/trunk/files/CSWpython.postinstall
csw/mgar/pkg/python/trunk/files/CSWpython.preremove
csw/mgar/pkg/python/trunk/files/CSWpython.space
Deleted: csw/mgar/pkg/python/trunk/files/CSWidle.postinstall
===================================================================
--- csw/mgar/pkg/python/trunk/files/CSWidle.postinstall 2009-05-22 21:50:47 UTC (rev 5018)
+++ csw/mgar/pkg/python/trunk/files/CSWidle.postinstall 2009-05-23 04:00:12 UTC (rev 5019)
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-PATH=/usr/bin:/usr/sbin
-PY_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
-PY_BINDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/bin
-PY_LIBDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/lib/python
-
-# Compile .py libraries to .pyc files
-${PY_BINDIR}/python -Wi -tt ${PY_LIBDIR}/compileall.py \
- -d ${PY_LIBDIR}/idlelib -f -x 'bad_coding|badsyntax' ${PY_LIBDIR}/idlelib
-# Compile .py libraries to .pyo files
-${PY_BINDIR}/python -Wi -tt -O ${PY_LIBDIR}/compileall.py \
- -d ${PY_LIBDIR}/idlelib -f -x 'bad_coding|badsyntax' ${PY_LIBDIR}/idlelib
-
-exit 0
Deleted: csw/mgar/pkg/python/trunk/files/CSWidle.preremove
===================================================================
--- csw/mgar/pkg/python/trunk/files/CSWidle.preremove 2009-05-22 21:50:47 UTC (rev 5018)
+++ csw/mgar/pkg/python/trunk/files/CSWidle.preremove 2009-05-23 04:00:12 UTC (rev 5019)
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-PATH=/usr/bin:/usr/sbin
-PY_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
-PY_BINDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/bin
-PY_LIBDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/lib/python
-
-# Cleanup .pyc and .pyo files
-pkgchk -v $PKGINST 2>&1 |grep \.py$ | xargs -i rm -f {}c {}o
-
-exit 0
Deleted: csw/mgar/pkg/python/trunk/files/CSWidle.space
===================================================================
--- csw/mgar/pkg/python/trunk/files/CSWidle.space 2009-05-22 21:50:47 UTC (rev 5018)
+++ csw/mgar/pkg/python/trunk/files/CSWidle.space 2009-05-23 04:00:12 UTC (rev 5019)
@@ -1 +0,0 @@
-$BASEDIR 200
Deleted: csw/mgar/pkg/python/trunk/files/CSWpython-tk.postinstall
===================================================================
--- csw/mgar/pkg/python/trunk/files/CSWpython-tk.postinstall 2009-05-22 21:50:47 UTC (rev 5018)
+++ csw/mgar/pkg/python/trunk/files/CSWpython-tk.postinstall 2009-05-23 04:00:12 UTC (rev 5019)
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-PATH=/usr/bin:/usr/sbin
-PY_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
-PY_BINDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/bin
-PY_LIBDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/lib/python
-
-# Compile .py libraries to .pyc files
-${PY_BINDIR}/python -Wi -tt ${PY_LIBDIR}/compileall.py \
- -d ${PY_LIBDIR}/lib-tk -f -x 'bad_coding|badsyntax' ${PY_LIBDIR}/lib-tk
-# Compile .py libraries to .pyo files
-${PY_BINDIR}/python -Wi -tt -O ${PY_LIBDIR}/compileall.py \
- -d ${PY_LIBDIR}/lib-tk -f -x 'bad_coding|badsyntax' ${PY_LIBDIR}/lib-tk
-
-exit 0
Deleted: csw/mgar/pkg/python/trunk/files/CSWpython-tk.preremove
===================================================================
--- csw/mgar/pkg/python/trunk/files/CSWpython-tk.preremove 2009-05-22 21:50:47 UTC (rev 5018)
+++ csw/mgar/pkg/python/trunk/files/CSWpython-tk.preremove 2009-05-23 04:00:12 UTC (rev 5019)
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-PATH=/usr/bin:/usr/sbin
-PY_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
-PY_BINDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/bin
-PY_LIBDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/lib/python
-
-# Cleanup .pyc and .pyo files
-pkgchk -v $PKGINST 2>&1 |grep \.py$ | xargs -i rm -f {}c {}o
-
-exit 0
Deleted: csw/mgar/pkg/python/trunk/files/CSWpython-tk.space
===================================================================
--- csw/mgar/pkg/python/trunk/files/CSWpython-tk.space 2009-05-22 21:50:47 UTC (rev 5018)
+++ csw/mgar/pkg/python/trunk/files/CSWpython-tk.space 2009-05-23 04:00:12 UTC (rev 5019)
@@ -1 +0,0 @@
-$BASEDIR 50
Deleted: csw/mgar/pkg/python/trunk/files/CSWpython.postinstall
===================================================================
--- csw/mgar/pkg/python/trunk/files/CSWpython.postinstall 2009-05-22 21:50:47 UTC (rev 5018)
+++ csw/mgar/pkg/python/trunk/files/CSWpython.postinstall 2009-05-23 04:00:12 UTC (rev 5019)
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-PATH=/usr/bin:/usr/sbin
-PY_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
-PY_BINDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/bin
-PY_LIBDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/lib/python
-
-find ${PY_LIBDIR} -name "*.py[co]" -exec rm -f {} \;
-# Compile .py libraries to .pyc files
-${PY_BINDIR}/python -Wi -tt ${PY_LIBDIR}/compileall.py \
- -d ${PY_LIBDIR} -f -x 'bad_coding|badsyntax' ${PY_LIBDIR}
-# Compile .py libraries to .pyo files
-${PY_BINDIR}/python -Wi -tt -O ${PY_LIBDIR}/compileall.py \
- -d ${PY_LIBDIR} -f -x 'bad_coding|badsyntax' ${PY_LIBDIR}
-
-exit 0
Deleted: csw/mgar/pkg/python/trunk/files/CSWpython.preremove
===================================================================
--- csw/mgar/pkg/python/trunk/files/CSWpython.preremove 2009-05-22 21:50:47 UTC (rev 5018)
+++ csw/mgar/pkg/python/trunk/files/CSWpython.preremove 2009-05-23 04:00:12 UTC (rev 5019)
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-PATH=/usr/bin:/usr/sbin
-PY_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
-PY_BINDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/bin
-PY_LIBDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/lib/python
-
-# Cleanup .pyc and .pyo files
-pkgchk -v $PKGINST 2>&1 |grep \.py$ | xargs -i rm -f {}c {}o
-
-exit 0
Deleted: csw/mgar/pkg/python/trunk/files/CSWpython.space
===================================================================
--- csw/mgar/pkg/python/trunk/files/CSWpython.space 2009-05-22 21:50:47 UTC (rev 5018)
+++ csw/mgar/pkg/python/trunk/files/CSWpython.space 2009-05-23 04:00:12 UTC (rev 5019)
@@ -1 +0,0 @@
-$BASEDIR 3600
Added: csw/mgar/pkg/python/trunk/files/i.pycompile
===================================================================
--- csw/mgar/pkg/python/trunk/files/i.pycompile (rev 0)
+++ csw/mgar/pkg/python/trunk/files/i.pycompile 2009-05-23 04:00:12 UTC (rev 5019)
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# i.pycompile - Class action script for compiling pyo and pyc files
+#
+# $Id$
+#
+# Written by Mike Watters
+#
+# 2009-05-25 First Release
+#
+
+# Force Path for the script to use
+PATH=/usr/bin:/usr/sbin:/opt/csw/bin
+PY_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
+PY_BINDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/bin
+PY_LIBDIR=${PKG_INSTALL_ROOT}${PY_PREFIX}/lib/python
+
+if [ "${DEBUG}" ]; then
+ echo PACKAGE: $PKGINST
+fi
+
+if [ -f ${PY_BINDIR}/python -a -x ${PY_BINDIR}/python ]; then
+ echo "Could not find or execute ${PY_BINDIR}/python"
+ echo "Check your Python installation."
+ exit 2
+fi
+
+if [ -f ${PY_LIBDIR}/compileall.py ]; then
+ echo "Could not find ${PY_LIBDIR}/compileall.py"
+ echo "Check your Python installation."
+ exit 2
+fi
+
+echo "Compiling py files to normal bytecode ..."
+# Compile .py libraries to .pyc files
+${PY_BINDIR}/python -Wi -tt ${PY_LIBDIR}/compileall.py \
+ -d ${PY_LIBDIR} -x 'bad_coding|badsyntax' ${PY_LIBDIR}
+
+echo "Compiling py files to optimized bytecode ..."
+# Compile .py libraries to .pyo files
+${PY_BINDIR}/python -Wi -tt -O ${PY_LIBDIR}/compileall.py \
+ -d ${PY_LIBDIR} -x 'bad_coding|badsyntax' ${PY_LIBDIR}
+
+exit 0
Property changes on: csw/mgar/pkg/python/trunk/files/i.pycompile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: csw/mgar/pkg/python/trunk/files/r.pycompile
===================================================================
--- csw/mgar/pkg/python/trunk/files/r.pycompile (rev 0)
+++ csw/mgar/pkg/python/trunk/files/r.pycompile 2009-05-23 04:00:12 UTC (rev 5019)
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# r.pycompile - Class action script for removing pyo and pyc files
+#
+# $Id$
+#
+# Written by Mike Watters
+#
+# 2009-05-25 First Release
+#
+
+# Force Path for the script to use
+PATH=/usr/bin:/usr/sbin:/opt/csw/bin
+DEBUG= # clear to disable debug, set to anything to enable
+
+if [ "${DEBUG}" ]; then
+ echo PACKAGE: $PKGINST
+fi
+
+echo "Removing pyo and pyc files for package <$PKGINST> ..."
+pkgchk -v $PKGINST 2>&1 |grep \.py$ | xargs -i rm -f {}c {}o
+
+exit 0
Property changes on: csw/mgar/pkg/python/trunk/files/r.pycompile
___________________________________________________________________
Added: svn:keywords
+ Id
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list