[csw-devel] SF.net SVN: gar:[5069] csw/mgar/pkg/python/trunk

valholla at users.sourceforge.net valholla at users.sourceforge.net
Wed May 27 19:36:25 CEST 2009


Revision: 5069
          http://gar.svn.sourceforge.net/gar/?rev=5069&view=rev
Author:   valholla
Date:     2009-05-27 17:36:24 +0000 (Wed, 27 May 2009)

Log Message:
-----------
use new pycompile class

Modified Paths:
--------------
    csw/mgar/pkg/python/trunk/Makefile
    csw/mgar/pkg/python/trunk/checksums
    csw/mgar/pkg/python/trunk/files/i.pycompile

Modified: csw/mgar/pkg/python/trunk/Makefile
===================================================================
--- csw/mgar/pkg/python/trunk/Makefile	2009-05-27 15:40:34 UTC (rev 5068)
+++ csw/mgar/pkg/python/trunk/Makefile	2009-05-27 17:36:24 UTC (rev 5069)
@@ -3,6 +3,7 @@
 CATEGORIES = lang
 
 SPKG_SOURCEURL = http://www.python.org/download/releases/$(GARVERSION)
+SPKG_CLASSES = none pycompile
 
 DESCRIPTION = A high-level scripting language.
 define BLURB
@@ -23,8 +24,6 @@
 # Previous Library for compatability
 DISTFILES += libpython2.5.so.1.0-isa-sparcv8
 DISTFILES += libpython2.5.so.1.0-isa-i386
-DISTFILES += CSWpython.postinstall CSWpython-tk.postinstall CSWidle.postinstall
-DISTFILES += CSWpython.space CSWpython-tk.space CSWidle.space
 
 # We define upstream file regex so we can be notifed of new upstream software release
 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2
@@ -37,7 +36,6 @@
 PATCHFILES += pyport.diff
 PATCHFILES += setup.diff
 PATCHFILES += site.diff
-#PATCHFILES += configure.diff
 PATCHFILES += python-config-in.diff
 
 # Test for sunaudiodev fails.
@@ -77,6 +75,9 @@
 CONFIGURE_ARGS += --with-system-ffi
 CONFIGURE_ARGS += LDFLAGS='-R/opt/csw/lib -L/opt/csw/lib'
 
+# use prototype filters to set the class 
+PROTOTYPE_FILTER = awk '$$$$3 ~/.*\.py$$$$/ { $$$$2 = "pycompile" } { print }'
+
 PACKAGES  = CSWidle CSWpython CSWpython-devel CSWpython-rt CSWpython-tk
 
 PKGFILES_CSWidle  = $(libdir)/.*/idlelib/.*
@@ -128,3 +129,9 @@
 	@gfind $(DESTDIR)$(libdir) -name "*.py[co]" -exec grm -f {} \;
 	@$(MAKECOOKIE)
 
+define CSWpython_postinstall
+#!/bin/sh
+echo "Cleaning up bytecode files..."
+find $(libdir)/python -name "*.py[co]" -exec grm -f {} \;
+exit 0
+endef

Modified: csw/mgar/pkg/python/trunk/checksums
===================================================================
--- csw/mgar/pkg/python/trunk/checksums	2009-05-27 15:40:34 UTC (rev 5068)
+++ csw/mgar/pkg/python/trunk/checksums	2009-05-27 17:36:24 UTC (rev 5069)
@@ -1,9 +1,3 @@
-4dbb004a4e26def221444577363146e3  download/CSWidle.postinstall
-e510b1d6436f7688050253c924e72c2d  download/CSWidle.space
-31f5596f66235a8641b25c3b6e3fc28f  download/CSWpython-tk.postinstall
-e889a5cfdbf807b253df2dce3d852429  download/CSWpython-tk.space
-55e25e8ec22e043715306ea03e6eed26  download/CSWpython.postinstall
-35d3380fc79c53da3580dc4ac60aa501  download/CSWpython.space
 245db9f1e0f09ab7e0faaa0cf7301011  download/Python-2.6.2.tar.bz2
 42dd6523beb94a805d5764ae1276091c  download/faqwiz.diff
 5664b3970307d7d39d8d4061e7dccbb0  download/libpython2.5.so.1.0-isa-i386

Modified: csw/mgar/pkg/python/trunk/files/i.pycompile
===================================================================
--- csw/mgar/pkg/python/trunk/files/i.pycompile	2009-05-27 15:40:34 UTC (rev 5068)
+++ csw/mgar/pkg/python/trunk/files/i.pycompile	2009-05-27 17:36:24 UTC (rev 5069)
@@ -11,21 +11,23 @@
 
 # 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
+PY_BINDIR=${PY_PREFIX}/bin
+PY_LIBDIR=${PY_PREFIX}/lib/python
 
+#DEBUG = 1  # Uncomment to enable debug
 if [ "${DEBUG}" ]; then
     echo PACKAGE: $PKGINST
 fi
 
-if [ -f ${PY_BINDIR}/python -a -x ${PY_BINDIR}/python ]; then
+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
+if [ ! -f ${PY_LIBDIR}/compileall.py ]; then
     echo "Could not find ${PY_LIBDIR}/compileall.py"
     echo "Check your Python installation."
     exit 2


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