pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Provide PY_COMPILE_ALL and PY_COMPILE_O_ALL to compile...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bd308d47d951
branches:  trunk
changeset: 395508:bd308d47d951
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Wed Jul 08 13:55:58 2009 +0000

description:
Provide PY_COMPILE_ALL and PY_COMPILE_O_ALL to compile all Python
sources in a directory (tree) in pversion.mk. Adjust the various places
that called it locally.

diffstat:

 audio/solfege/Makefile              |  9 ++++-----
 databases/py-metakit/Makefile       |  6 ++----
 devel/ExmanIDE/Makefile             |  8 +++-----
 devel/py-at-spi/Makefile            |  4 ++--
 devel/py-setuptools/Makefile        |  7 +++----
 games/4stAttack/Makefile            |  6 +++---
 graphics/dia-python/Makefile        |  6 ++----
 lang/py-funge/Makefile              |  8 +++-----
 lang/python/pyversion.mk            |  6 +++++-
 mail/mailman/Makefile               |  6 ++----
 mail/tmda/Makefile                  |  5 ++---
 textproc/gnome-doc-utils/Makefile   |  6 ++----
 textproc/py-cmTemplate/Makefile     |  5 ++---
 time/gdeskcal/Makefile              |  5 ++---
 www/browser-bookmarks-menu/Makefile |  6 ++----
 www/zope/zopeversion.mk             |  4 +---
 16 files changed, 40 insertions(+), 57 deletions(-)

diffs (truncated from 377 to 300 lines):

diff -r 69121a5da013 -r bd308d47d951 audio/solfege/Makefile
--- a/audio/solfege/Makefile    Wed Jul 08 13:48:45 2009 +0000
+++ b/audio/solfege/Makefile    Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2009/04/07 05:26:59 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2009/07/08 13:55:58 joerg Exp $
 #
 
 DISTNAME=              solfege-3.14.1
@@ -26,7 +26,6 @@
 REPLACE_BASH=          lesson-files/bin/csound-play-harmonic-interval.sh
 
 PYTHON_PATCH_SCRIPTS=  *.py *.py.in */*.py */*.py.in
-PYCOMPILEALL=          ${BUILDLINK_PREFIX.${PYPACKAGE}}/${PYLIB}/compileall.py
 
 SUBST_CLASSES+=                sound
 SUBST_STAGE.sound=     do-configure
@@ -59,9 +58,9 @@
 .endif
 
 post-install:
-       ${PYTHONBIN} ${PYCOMPILEALL} ${PREFIX}/share/solfege/mpd \
-               ${PREFIX}/share/solfege/soundcard \
-               ${PREFIX}/share/solfege/src
+       ${PY_COMPILE_ALL} ${DESTDIR}${PREFIX}/share/solfege/mpd \
+               ${DESTDIR}${PREFIX}/share/solfege/soundcard \
+               ${DESTDIR}${PREFIX}/share/solfege/src
 
 PYTHON_VERSIONS_INCOMPATIBLE=  23
 .include "../../lang/python/application.mk"
diff -r 69121a5da013 -r bd308d47d951 databases/py-metakit/Makefile
--- a/databases/py-metakit/Makefile     Wed Jul 08 13:48:45 2009 +0000
+++ b/databases/py-metakit/Makefile     Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2009/02/11 21:00:49 joerg Exp $
+# $NetBSD: Makefile,v 1.23 2009/07/08 13:55:58 joerg Exp $
 #
 
 DISTNAME=      metakit-2.4.9.7
@@ -27,12 +27,10 @@
 MAKE_ENV+=     PYINC=${LOCALBASE}/${PYINC} PYSITELIB=${LOCALBASE}/${PYSITELIB}
 PY_PATCHPLIST= yes
 
-PYCOMPILEALL=  ${BUILDLINK_PREFIX.${PYPACKAGE}}/${PYLIB}/compileall.py
-
 INSTALLATION_DIRS+=    ${PYSITELIB}
 
 post-build:
-       cd ${WRKSRC}/python && ${PYTHONBIN} ${PYCOMPILEALL} .
+       cd ${WRKSRC}/python && ${PY_COMPILE_ALL} .
 
 post-install:
        ${INSTALL_DATA} ${WRKSRC}/python/metakit.pyc ${DESTDIR}${PREFIX}/${PYSITELIB}
diff -r 69121a5da013 -r bd308d47d951 devel/ExmanIDE/Makefile
--- a/devel/ExmanIDE/Makefile   Wed Jul 08 13:48:45 2009 +0000
+++ b/devel/ExmanIDE/Makefile   Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2009/02/09 22:56:22 joerg Exp $
+# $NetBSD: Makefile,v 1.14 2009/07/08 13:55:58 joerg Exp $
 
 DISTNAME=      ExmanIDE-0.9.4
 PKGREVISION=   5
@@ -32,8 +32,6 @@
 SUBST_FILES.py=                ExmanIDE
 SUBST_SED.py=          -e 's,python \$$0\.pyw,${PYTHONBIN} ${PREFIX}/share/${PKGBASE}/ExmanIDE.pyw,g'
 
-PYCOMPILEALL=  ${BUILDLINK_PREFIX.${PYPACKAGE}}/${PYLIB}/compileall.py
-
 INSTALLATION_DIRS=      bin share/ExmanIDE
 
 do-install:
@@ -41,8 +39,8 @@
        cd ${WRKSRC} && pax -rwppm '-s|.*/CVS.*$$||'    \
                '-s|.*/ExmanIDE$$||' '-s|.*/.xvpics.*$$||' \
                . ${DESTDIR}${PREFIX}/share/ExmanIDE
-       ${PYTHONBIN} ${PYCOMPILEALL} ${DESTDIR}${PREFIX}/share/ExmanIDE
-       ${PYTHONBIN} -O ${PYCOMPILEALL} ${DESTDIR}${PREFIX}/share/ExmanIDE
+       ${PY_COMPILE_ALL} ${DESTDIR}${PREFIX}/share/ExmanIDE
+       ${PY_COMPILE_O_ALL} ${DESTDIR}${PREFIX}/share/ExmanIDE
 
 .include "../../lang/python/application.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 69121a5da013 -r bd308d47d951 devel/py-at-spi/Makefile
--- a/devel/py-at-spi/Makefile  Wed Jul 08 13:48:45 2009 +0000
+++ b/devel/py-at-spi/Makefile  Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2009/03/16 22:22:07 jmcneill Exp $
+# $NetBSD: Makefile,v 1.9 2009/07/08 13:55:58 joerg Exp $
 #
 
 DISTNAME=              at-spi-1.26.0
@@ -22,7 +22,7 @@
 
 do-install:
        ${INSTALL_DATA} ${WRKSRC}/pyatspi/*.py ${DESTDIR}${PYATSPIDIR}
-       ${PYTHONBIN} ${PREFIX}/${PYLIB}/compileall.py ${DESTDIR}${PYATSPIDIR}
+       ${PY_COMPILE_ALL} ${DESTDIR}${PYATSPIDIR}
 
 .include "../../lang/python/extension.mk"
 .include "../../devel/at-spi/buildlink3.mk"
diff -r 69121a5da013 -r bd308d47d951 devel/py-setuptools/Makefile
--- a/devel/py-setuptools/Makefile      Wed Jul 08 13:48:45 2009 +0000
+++ b/devel/py-setuptools/Makefile      Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2009/05/28 21:24:44 zafer Exp $
+# $NetBSD: Makefile,v 1.11 2009/07/08 13:55:59 joerg Exp $
 #
 
 EGG_VERSION=           0.6c9
@@ -20,7 +20,6 @@
 PY_PATCHPLIST= yes
 PLIST_SUBST+=  EGG_NAME=${EGG_NAME}
 PLIST_SUBST+=  PYVERSSUFFIX=${PYVERSSUFFIX} PYPKGPREFIX=${PYPKGPREFIX}
-PYCOMPILEALL=  ${BUILDLINK_PREFIX.${PYPACKAGE}}/${PYLIB}/compileall.py
 
 CHECK_FILES_SKIP+=     ${PREFIX}/${PYSITELIB}/easy-install.pth
 
@@ -47,8 +46,8 @@
        ${SED} -e 's,@PYTHON@,${PYTHONBIN},' \
               -e 's,@PKGVERSION@,${EGG_VERSION},' \
               ${FILESDIR}/easy_install.py > ${WRKDIR}/easy_install.py
-       ${PYTHONBIN} ${PYCOMPILEALL} -f -d ${TARGET_NAME} ${WRKSRC}
-       ${PYTHONBIN} -O ${PYCOMPILEALL} -f -d ${TARGET_NAME} ${WRKSRC}
+       ${PY_COMPILE_ALL} -f -d ${TARGET_NAME} ${WRKSRC}
+       ${PY_COMPILE_O_ALL} -f -d ${TARGET_NAME} ${WRKSRC}
 
 do-install:
        ${INSTALL_SCRIPT} ${WRKDIR}/easy_install.py \
diff -r 69121a5da013 -r bd308d47d951 games/4stAttack/Makefile
--- a/games/4stAttack/Makefile  Wed Jul 08 13:48:45 2009 +0000
+++ b/games/4stAttack/Makefile  Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2008/05/26 02:13:19 joerg Exp $
+# $NetBSD: Makefile,v 1.9 2009/07/08 13:55:59 joerg Exp $
 #
 
 DISTNAME=              4stAttack-2.1.4
@@ -25,8 +25,8 @@
        ${MV} ${WRKSRC}/4stattack ${WRKSRC}/4stattack.pre
        ${SED} -e "s,@FAHOME@,${PREFIX}/share/${PKGBASE}," \
                ${WRKSRC}/4stattack.pre > ${WRKSRC}/4stattack
-       ${PYTHONBIN} ${PREFIX}/${PYLIB}/compileall.py ${WRKSRC}
-       ${PYTHONBIN} -O ${PREFIX}/${PYLIB}/compileall.py ${WRKSRC}
+       ${PY_COMPILE_ALL} ${WRKSRC}
+       ${PY_COMPILE_O_ALL} ${WRKSRC}
 
 do-install:
        ${INSTALL_SCRIPT} ${WRKSRC}/4stattack ${DESTDIR}${PREFIX}/bin
diff -r 69121a5da013 -r bd308d47d951 graphics/dia-python/Makefile
--- a/graphics/dia-python/Makefile      Wed Jul 08 13:48:45 2009 +0000
+++ b/graphics/dia-python/Makefile      Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2009/02/09 22:56:24 joerg Exp $
+# $NetBSD: Makefile,v 1.12 2009/07/08 13:55:59 joerg Exp $
 #
 
 DIA_SUBPKG=            -python
@@ -17,10 +17,8 @@
 BUILD_DIRS+=           ${WRKSRC}/plug-ins/python
 INSTALL_DIRS+=         ${WRKSRC}/plug-ins/python
 
-PYCOMPILEALL=  ${BUILDLINK_PREFIX.${PYPACKAGE}}/${PYLIB}/compileall.py
-
 post-install:
-       ${PYTHONBIN} ${PYCOMPILEALL} ${DESTDIR}${PREFIX}/share/dia
+       ${PY_COMPILE_ALL} ${DESTDIR}${PREFIX}/share/dia
 
 .include "../../lang/python/application.mk"
 .include "../../x11/py-gtk2/buildlink3.mk"
diff -r 69121a5da013 -r bd308d47d951 lang/py-funge/Makefile
--- a/lang/py-funge/Makefile    Wed Jul 08 13:48:45 2009 +0000
+++ b/lang/py-funge/Makefile    Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2008/06/12 02:14:33 joerg Exp $
+# $NetBSD: Makefile,v 1.9 2009/07/08 13:55:59 joerg Exp $
 
 DISTNAME=      pyfunge-0.2-beta1
 PKGNAME=       ${PYPKGPREFIX}-funge-0.2beta1
@@ -22,16 +22,14 @@
 WRKSRC?=       ${WRKDIR}/PyFunge
 PLIST_SUBST+=  PYSITELIB=${PYSITELIB:Q}
 
-PYCOMPILEALL=  ${BUILDLINK_PREFIX.${PYPACKAGE}}/${PYLIB}/compileall.py
-
 INSTALLATION_DIRS=     ${PYSITELIB}/PyFunge share/doc/${PKGBASE}
 
 do-install:
        ${INSTALL_DATA} ${WRKSRC}/README.ko ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
        cd ${WRKSRC} && pax -rwppm '-s|.*/README.ko||' \
                . ${DESTDIR}${PREFIX}/${PYSITELIB}/PyFunge
-       ${PYTHONBIN} ${PYCOMPILEALL} ${DESTDIR}${PREFIX}/${PYSITELIB}/PyFunge
-       ${PYTHONBIN} -O ${PYCOMPILEALL} ${DESTDIR}${PREFIX}/${PYSITELIB}/PyFunge
+       ${PY_COMPILE_ALL} ${DESTDIR}${PREFIX}/${PYSITELIB}/PyFunge
+       ${PY_COMPILE_O_ALL} ${DESTDIR}${PREFIX}/${PYSITELIB}/PyFunge
 
 .include "../../lang/python/extension.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 69121a5da013 -r bd308d47d951 lang/python/pyversion.mk
--- a/lang/python/pyversion.mk  Wed Jul 08 13:48:45 2009 +0000
+++ b/lang/python/pyversion.mk  Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pyversion.mk,v 1.72 2009/07/02 09:37:12 joerg Exp $
+# $NetBSD: pyversion.mk,v 1.73 2009/07/08 13:55:59 joerg Exp $
 
 # This file determines which Python version is used as a dependency for
 # a package.
@@ -156,6 +156,10 @@
 .endif
 
 PYTHONBIN=     ${LOCALBASE}/bin/python${PYVERSSUFFIX}
+PY_COMPILE_ALL= \
+       ${PYTHONBIN} ${PREFIX}/lib/python${PYVERSSUFFIX}/compileall.py -q
+PY_COMPILE_O_ALL= \
+       ${PYTHONBIN} -O ${PREFIX}/lib/python${PYVERSSUFFIX}/compileall.py -q
 
 .if exists(${PYTHONBIN})
 PYINC!=        ${PYTHONBIN} -c "import distutils.sysconfig; \
diff -r 69121a5da013 -r bd308d47d951 mail/mailman/Makefile
--- a/mail/mailman/Makefile     Wed Jul 08 13:48:45 2009 +0000
+++ b/mail/mailman/Makefile     Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.58 2009/06/03 06:55:07 adam Exp $
+# $NetBSD: Makefile,v 1.59 2009/07/08 13:55:59 joerg Exp $
 
 DISTNAME=      mailman-2.1.12
 CATEGORIES=    mail www
@@ -95,8 +95,6 @@
 SUBST_SED.paths+=      -e 's,@MAILMAN_DATADIR@,${MAILMAN_DATADIR},g'
 SUBST_STAGE.paths=     post-patch
 
-PYCOMPILEALL=  ${BUILDLINK_PREFIX.${PYPACKAGE}}/${PYLIB}/compileall.py
-
 # mailman depends a lot on it and will bitch if changed.
 CHECK_PERMS=   no
 
@@ -126,7 +124,7 @@
        ${CHOWN} -R root:${MAILMAN_GROUP} ${EXECDIR}
        ${CHMOD} -R g+w ${EXECDIR}
        ${CHMOD} g+s ${EXECDIR}/cgi-bin/*
-       ${PYTHONBIN} ${PYCOMPILEALL} ${PREFIX}/lib/mailman/bin ${PREFIX}/lib/mailman/cron ${PREFIX}/lib/mailman/scripts
+       ${PY_COMPILE_ALL} ${PREFIX}/lib/mailman/bin ${PREFIX}/lib/mailman/cron ${PREFIX}/lib/mailman/scripts
 
 .include "../../lang/python/application.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 69121a5da013 -r bd308d47d951 mail/tmda/Makefile
--- a/mail/tmda/Makefile        Wed Jul 08 13:48:45 2009 +0000
+++ b/mail/tmda/Makefile        Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.43 2009/02/09 22:56:25 joerg Exp $
+# $NetBSD: Makefile,v 1.44 2009/07/08 13:56:00 joerg Exp $
 #
 
 DISTNAME=      tmda-1.1.12
@@ -14,7 +14,6 @@
 
 PYTHON_PATCH_SCRIPTS=  ${TMDA_PROGRAMS}
 PY_PATCHPLIST=         yes
-PYCOMPILEALL=          ${BUILDLINK_PREFIX.${PYPACKAGE}}/${PYLIB}/compileall.py
 
 PKG_SYSCONFSUBDIR=     ${PKGBASE}
 
@@ -91,7 +90,7 @@
        cp -Rp ${WRKSRC}/doc/html/* ${PREFIX}/${HTMLDIR}
 
 post-install:
-       ${PYTHONBIN} ${PYCOMPILEALL} ${PREFIX}/${PYSITELIB}/TMDA \
+       ${PY_COMPILE_ALL} ${PREFIX}/${PYSITELIB}/TMDA \
                ${PREFIX}/${PYSITELIB}/TMDA/Queue \
                ${PREFIX}/${PYSITELIB}/TMDA/pythonlib/email \
                ${PREFIX}/${PYSITELIB}/TMDA/pythonlib/email/mime
diff -r 69121a5da013 -r bd308d47d951 textproc/gnome-doc-utils/Makefile
--- a/textproc/gnome-doc-utils/Makefile Wed Jul 08 13:48:45 2009 +0000
+++ b/textproc/gnome-doc-utils/Makefile Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2009/05/13 21:32:37 wiz Exp $
+# $NetBSD: Makefile,v 1.41 2009/07/08 13:56:00 joerg Exp $
 #
 
 DISTNAME=      gnome-doc-utils-0.16.1
@@ -37,10 +37,8 @@
 BUILDLINK_DEPMETHOD.libxslt=   build
 BUILDLINK_DEPMETHOD.libxml2=   build
 
-PYCOMPILEALL=  ${BUILDLINK_PREFIX.${PYPACKAGE}}/${PYLIB}/compileall.py
-
 post-install:
-       ${PYTHONBIN} ${PYCOMPILEALL} ${DESTDIR}${PREFIX}/share/xml2po
+       ${PY_COMPILE_ALL} ${DESTDIR}${PREFIX}/share/xml2po
 
 .include "../../lang/python/application.mk"
 .include "../../textproc/libxml2/buildlink3.mk"
diff -r 69121a5da013 -r bd308d47d951 textproc/py-cmTemplate/Makefile
--- a/textproc/py-cmTemplate/Makefile   Wed Jul 08 13:48:45 2009 +0000
+++ b/textproc/py-cmTemplate/Makefile   Wed Jul 08 13:55:58 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2008/06/12 02:14:52 joerg Exp $
+# $NetBSD: Makefile,v 1.4 2009/07/08 13:56:00 joerg Exp $
 #
 
 DISTNAME=              cmTemplate-0.3.2



Home | Main Index | Thread Index | Old Index