[csw-devel] SF.net SVN: gar:[4954] csw/mgar/pkg/python/trunk
valholla at users.sourceforge.net
valholla at users.sourceforge.net
Tue May 19 18:52:40 CEST 2009
Revision: 4954
http://gar.svn.sourceforge.net/gar/?rev=4954&view=rev
Author: valholla
Date: 2009-05-19 16:52:40 +0000 (Tue, 19 May 2009)
Log Message:
-----------
add postinstall to compile modules
Modified Paths:
--------------
csw/mgar/pkg/python/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/python/trunk/files/CSWpython.postinstall
Modified: csw/mgar/pkg/python/trunk/Makefile
===================================================================
--- csw/mgar/pkg/python/trunk/Makefile 2009-05-19 16:51:15 UTC (rev 4953)
+++ csw/mgar/pkg/python/trunk/Makefile 2009-05-19 16:52:40 UTC (rev 4954)
@@ -23,6 +23,7 @@
# Previous Library for compatability
DISTFILES += libpython2.5.so.1.0-isa-sparcv8
DISTFILES += libpython2.5.so.1.0-isa-i386
+DISTFILES += CSWpython.postinstall
# We define upstream file regex so we can be notifed of new upstream software release
UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2
Added: csw/mgar/pkg/python/trunk/files/CSWpython.postinstall
===================================================================
--- csw/mgar/pkg/python/trunk/files/CSWpython.postinstall (rev 0)
+++ csw/mgar/pkg/python/trunk/files/CSWpython.postinstall 2009-05-19 16:52:40 UTC (rev 4954)
@@ -0,0 +1,22 @@
+#!/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}
+
+for file in `find ${PY_LIBDIR} -name "*.py[co]" -print`
+do
+ installf ${PKGINST} ${file}
+done
+installf -f ${PKGINST}
+
+exit 0
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