Date: Fri, 22 Feb 2013 20:20:02 GMT From: nemysis <nemysis@gmx.ch> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/173351: [PATCH] games/4stattack: OptionsNG, Makefile simplified, added Desktop entries, icons, take maintainership Message-ID: <201302222020.r1MKK2F8095567@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/173351; it has been noted by GNATS. From: nemysis <nemysis@gmx.ch> To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/173351: [PATCH] games/4stattack: OptionsNG, Makefile simplified, added Desktop entries, icons, take maintainership Date: Fri, 22 Feb 2013 21:08:01 +0100 --MP_/Bpsgu.+z.MRZ=sl_/HyhDOF Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Restored pkg-plist Adjusted DESKTOP_ENTRIES= --MP_/Bpsgu.+z.MRZ=sl_/HyhDOF Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=4stattack.diff ===> Generating patch ===> Viewing diff with more diff -ruN --exclude=CVS /usr/ports/games/4stattack/Makefile ./Makefile --- /usr/ports/games/4stattack/Makefile 2013-01-14 17:55:29.000000000 +0100 +++ ./Makefile 2013-02-22 21:00:36.000000000 +0100 @@ -7,251 +7,70 @@ PORTNAME= 4stattack PORTVERSION= 2.1.4 -PORTREVISION= 7 -CATEGORIES= games +PORTREVISION= 8 +CATEGORIES= games python MASTER_SITES= SF/forcedattack/4stAttack/${PORTVERSION} -DISTNAME= 4stAttack-${PORTVERSION} +DISTNAME= 4stAttack-${DISTVERSION} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= nemysis@gmx.ch COMMENT= Connect four stones in a straight line LICENSE= GPLv2 -RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pygame/__init__.py:${PORTSDIR}/devel/py-game +RUN_DEPENDS= ${PYGAME} USE_PYTHON= yes -NO_BUILD= yes -PYC= PYTHON="${PYTHON_CMD}" ${SH} ${SCRIPTDIR}/py-compile +PORTDOCS= README.txt changelog.txt credits.txt + +INSTALLS_ICONS= yes +ICON_SIZES= 16x16 22x22 32x32 48x48 64x64 + +SUB_FILES= ${PORTNAME} + +DESKTOP_ENTRIES="4st Attack" "${COMMENT}" \ + "${PREFIX}/share/pixmaps/${PORTNAME}.png" \ + "${PORTNAME}" "Game;BoardGame;" false + +.include <bsd.port.options.mk> post-patch: - @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|; s|%%PYTHON%%|${PYTHON_CMD}|' \ - ${WRKSRC}/4stattack + @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|' ${WRKSRC}/themeresizer.sh + @for i in `${FIND} ${WRKSRC}/kde -name \forcedattack2.*`; do \ + ${MV} $$i `echo $$i | ${SED} -e 's/forcedattack2/${PORTNAME}/'`; done + @${FIND} ${WRKSRC} -name "*.bak" -delete -or -name "*.orig" -delete + +do-build: + @${PYTHON_CMD} -m compileall ${WRKSRC} + @${PYTHON_CMD} -O -m compileall ${WRKSRC} do-install: - ${MKDIR} ${PREFIX}/bin - ${INSTALL_SCRIPT} \ - ${WRKSRC}/4stattack \ - ${PREFIX}/bin - - ${MKDIR} ${DATADIR} - ${INSTALL_DATA} \ - ${WRKSRC}/4stattack.py \ - ${WRKSRC}/animator.py \ - ${WRKSRC}/board.py \ - ${WRKSRC}/chat.py \ - ${WRKSRC}/creditsscreen.py \ - ${WRKSRC}/endgamedialog.py \ - ${WRKSRC}/endscreen.py \ - ${WRKSRC}/game.py \ - ${WRKSRC}/gamelog.py \ - ${WRKSRC}/gamescreen.py \ - ${WRKSRC}/inisettings.py \ - ${WRKSRC}/multiplayerscreen.py \ - ${WRKSRC}/quit.py \ - ${WRKSRC}/rules.py \ - ${WRKSRC}/scoremap.py \ - ${WRKSRC}/setini.py \ - ${WRKSRC}/settings.ini \ - ${WRKSRC}/settingsscreen.py \ - ${WRKSRC}/startscreen.py \ - ${WRKSRC}/technical.ttf \ - ${WRKSRC}/testgui.py \ - ${WRKSRC}/testini.py \ - ${WRKSRC}/themeresizer.py \ - ${WRKSRC}/themeresizer.sh \ - ${WRKSRC}/version \ - ${DATADIR} - ${PYC} --basedir ${DATADIR} \ - ${DATADIR}/4stattack.py \ - ${DATADIR}/animator.py \ - ${DATADIR}/board.py \ - ${DATADIR}/chat.py \ - ${DATADIR}/creditsscreen.py \ - ${DATADIR}/endgamedialog.py \ - ${DATADIR}/endscreen.py \ - ${DATADIR}/game.py \ - ${DATADIR}/gamelog.py \ - ${DATADIR}/gamescreen.py \ - ${DATADIR}/inisettings.py \ - ${DATADIR}/multiplayerscreen.py \ - ${DATADIR}/quit.py \ - ${DATADIR}/rules.py \ - ${DATADIR}/scoremap.py \ - ${DATADIR}/setini.py \ - ${DATADIR}/settingsscreen.py \ - ${DATADIR}/startscreen.py \ - ${DATADIR}/testgui.py \ - ${DATADIR}/testini.py \ - ${DATADIR}/themeresizer.py - - ${MKDIR} ${DATADIR}/data/music - ${INSTALL_DATA} \ - ${WRKSRC}/data/music/4stattack.ogg \ - ${DATADIR}/data/music - - ${MKDIR} ${DATADIR}/data/themes/clean - ${INSTALL_DATA} \ - ${WRKSRC}/data/themes/clean/audio.ini \ - ${WRKSRC}/data/themes/clean/graphics.ini \ - ${DATADIR}/data/themes/clean - - ${MKDIR} ${DATADIR}/data/themes/clean/1024x768 - ${INSTALL_DATA} \ - ${WRKSRC}/data/themes/clean/1024x768/awaitingconnection.png \ - ${WRKSRC}/data/themes/clean/1024x768/back.png \ - ${WRKSRC}/data/themes/clean/1024x768/background.png \ - ${WRKSRC}/data/themes/clean/1024x768/chakie.png \ - ${WRKSRC}/data/themes/clean/1024x768/connecting-plain.png \ - ${WRKSRC}/data/themes/clean/1024x768/connecting.png \ - ${WRKSRC}/data/themes/clean/1024x768/credits.png \ - ${WRKSRC}/data/themes/clean/1024x768/cursor.png \ - ${WRKSRC}/data/themes/clean/1024x768/draw.png \ - ${WRKSRC}/data/themes/clean/1024x768/error-connecting.png \ - ${WRKSRC}/data/themes/clean/1024x768/frame.png \ - ${WRKSRC}/data/themes/clean/1024x768/frm_bl.png \ - ${WRKSRC}/data/themes/clean/1024x768/frm_br.png \ - ${WRKSRC}/data/themes/clean/1024x768/frm_left.png \ - ${WRKSRC}/data/themes/clean/1024x768/frm_right.png \ - ${WRKSRC}/data/themes/clean/1024x768/frm_tl.png \ - ${WRKSRC}/data/themes/clean/1024x768/frm_top.png \ - ${WRKSRC}/data/themes/clean/1024x768/frm_tr.png \ - ${WRKSRC}/data/themes/clean/1024x768/fullscreen.png \ - ${WRKSRC}/data/themes/clean/1024x768/graphics.png \ - ${WRKSRC}/data/themes/clean/1024x768/green-zebra.png \ - ${WRKSRC}/data/themes/clean/1024x768/grid.png \ - ${WRKSRC}/data/themes/clean/1024x768/hostagame.png \ - ${WRKSRC}/data/themes/clean/1024x768/joinagame.png \ - ${WRKSRC}/data/themes/clean/1024x768/keepplaying.png \ - ${WRKSRC}/data/themes/clean/1024x768/korruptor.png \ - ${WRKSRC}/data/themes/clean/1024x768/locations.ini \ - ${WRKSRC}/data/themes/clean/1024x768/logo.png \ - ${WRKSRC}/data/themes/clean/1024x768/multiplayer.png \ - ${WRKSRC}/data/themes/clean/1024x768/music.png \ - ${WRKSRC}/data/themes/clean/1024x768/ok.png \ - ${WRKSRC}/data/themes/clean/1024x768/playervscpu.png \ - ${WRKSRC}/data/themes/clean/1024x768/programming.png \ - ${WRKSRC}/data/themes/clean/1024x768/pygame.png \ - ${WRKSRC}/data/themes/clean/1024x768/quit.png \ - ${WRKSRC}/data/themes/clean/1024x768/quitgame.png \ - ${WRKSRC}/data/themes/clean/1024x768/radio-off.png \ - ${WRKSRC}/data/themes/clean/1024x768/radio-on.png \ - ${WRKSRC}/data/themes/clean/1024x768/radio.png \ - ${WRKSRC}/data/themes/clean/1024x768/selector.png \ - ${WRKSRC}/data/themes/clean/1024x768/selector1.png \ - ${WRKSRC}/data/themes/clean/1024x768/selector2.png \ - ${WRKSRC}/data/themes/clean/1024x768/settings.png \ - ${WRKSRC}/data/themes/clean/1024x768/slm-text.png \ - ${WRKSRC}/data/themes/clean/1024x768/slm.png \ - ${WRKSRC}/data/themes/clean/1024x768/start.png \ - ${WRKSRC}/data/themes/clean/1024x768/stone_1.png \ - ${WRKSRC}/data/themes/clean/1024x768/stone_2.png \ - ${WRKSRC}/data/themes/clean/1024x768/thanks.png \ - ${WRKSRC}/data/themes/clean/1024x768/wannaquit.png \ - ${WRKSRC}/data/themes/clean/1024x768/won_1.png \ - ${WRKSRC}/data/themes/clean/1024x768/won_2.png \ - ${DATADIR}/data/themes/clean/1024x768 - - ${MKDIR} ${DATADIR}/gui - ${INSTALL_DATA} \ - ${WRKSRC}/gui/__init__.py \ - ${WRKSRC}/gui/button.py \ - ${WRKSRC}/gui/canvas.py \ - ${WRKSRC}/gui/checkbox.py \ - ${WRKSRC}/gui/dialog.py \ - ${WRKSRC}/gui/editfield.py \ - ${WRKSRC}/gui/fader.py \ - ${WRKSRC}/gui/image.py \ - ${WRKSRC}/gui/label.py \ - ${WRKSRC}/gui/messagebox.py \ - ${WRKSRC}/gui/progress.py \ - ${WRKSRC}/gui/widget.py \ - ${WRKSRC}/gui/widget_manager.py \ - ${DATADIR}/gui - ${PYC} --basedir ${DATADIR}/gui \ - ${DATADIR}/gui/__init__.py \ - ${DATADIR}/gui/button.py \ - ${DATADIR}/gui/canvas.py \ - ${DATADIR}/gui/checkbox.py \ - ${DATADIR}/gui/dialog.py \ - ${DATADIR}/gui/editfield.py \ - ${DATADIR}/gui/fader.py \ - ${DATADIR}/gui/image.py \ - ${DATADIR}/gui/label.py \ - ${DATADIR}/gui/messagebox.py \ - ${DATADIR}/gui/progress.py \ - ${DATADIR}/gui/widget.py \ - ${DATADIR}/gui/widget_manager.py - - ${MKDIR} ${DATADIR}/gui/dialogs - ${INSTALL_DATA} \ - ${WRKSRC}/gui/dialogs/dialog \ - ${WRKSRC}/gui/dialogs/end_game.py \ - ${WRKSRC}/gui/dialogs/info_map.py \ - ${WRKSRC}/gui/dialogs/info_scenario.py \ - ${WRKSRC}/gui/dialogs/info_units.py \ - ${WRKSRC}/gui/dialogs/main_dialog.py \ - ${WRKSRC}/gui/dialogs/new_game.py \ - ${WRKSRC}/gui/dialogs/select_scenario.py \ - ${WRKSRC}/gui/dialogs/setup_client.py \ - ${WRKSRC}/gui/dialogs/setup_network.py \ - ${WRKSRC}/gui/dialogs/setup_players.py \ - ${WRKSRC}/gui/dialogs/start_game.py \ - ${WRKSRC}/gui/dialogs/wait_client.py \ - ${DATADIR}/gui/dialogs - ${PYC} --basedir ${DATADIR}/gui/dialogs \ - ${DATADIR}/gui/dialogs/end_game.py \ - ${DATADIR}/gui/dialogs/info_map.py \ - ${DATADIR}/gui/dialogs/info_scenario.py \ - ${DATADIR}/gui/dialogs/info_units.py \ - ${DATADIR}/gui/dialogs/main_dialog.py \ - ${DATADIR}/gui/dialogs/new_game.py \ - ${DATADIR}/gui/dialogs/select_scenario.py \ - ${DATADIR}/gui/dialogs/setup_client.py \ - ${DATADIR}/gui/dialogs/setup_network.py \ - ${DATADIR}/gui/dialogs/setup_players.py \ - ${DATADIR}/gui/dialogs/start_game.py \ - ${DATADIR}/gui/dialogs/wait_client.py - - ${MKDIR} ${DATADIR}/players - ${INSTALL_DATA} \ - ${WRKSRC}/players/__init__.py \ - ${WRKSRC}/players/agressive.py \ - ${WRKSRC}/players/connectscore.py \ - ${WRKSRC}/players/human.py \ - ${WRKSRC}/players/minmax.py \ - ${WRKSRC}/players/multiplayer.py \ - ${WRKSRC}/players/multiplayer_receiver.py \ - ${WRKSRC}/players/multiplayer_sender.py \ - ${WRKSRC}/players/neuralai.py \ - ${WRKSRC}/players/player.py \ - ${WRKSRC}/players/randomai.py \ - ${WRKSRC}/players/strategic.py \ - ${WRKSRC}/players/treeai.py \ - ${WRKSRC}/players/weighted.py \ - ${DATADIR}/players - ${PYC} --basedir ${DATADIR}/players \ - ${DATADIR}/players/__init__.py \ - ${DATADIR}/players/agressive.py \ - ${DATADIR}/players/connectscore.py \ - ${DATADIR}/players/human.py \ - ${DATADIR}/players/minmax.py \ - ${DATADIR}/players/multiplayer.py \ - ${DATADIR}/players/multiplayer_receiver.py \ - ${DATADIR}/players/multiplayer_sender.py \ - ${DATADIR}/players/neuralai.py \ - ${DATADIR}/players/player.py \ - ${DATADIR}/players/randomai.py \ - ${DATADIR}/players/strategic.py \ - ${DATADIR}/players/treeai.py \ - ${DATADIR}/players/weighted.py + ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin/ + +.for d in data gui players + @(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${DATADIR}) +.endfor + +.for p in *.py *.pyc *.pyo + @(cd ${WRKSRC} && ${INSTALL_SCRIPT} ${p} ${DATADIR}) +.endfor + +.for d in *.ini ini.txt *.ttf *.sh version + @(cd ${WRKSRC} && ${INSTALL_DATA} ${d} ${DATADIR}) +.endfor + +post-install: +.for s in ${ICON_SIZES} + ${MKDIR} ${PREFIX}/share/icons/hicolor/${s}/apps + ${INSTALL_DATA} ${WRKSRC}/kde/icons/${s}/${PORTNAME}.png \ + ${PREFIX}/share/icons/hicolor/${s}/apps/${PORTNAME}.png +.endfor + ${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png ${PREFIX}/share/pixmaps/ -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} \ - ${WRKSRC}/changelog.txt \ - ${WRKSRC}/credits.txt \ - ${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR} .endif + ${LN} -sf ${DOCSDIR}/credits.txt ${DATADIR} .include <bsd.port.mk> diff -ruN --exclude=CVS /usr/ports/games/4stattack/files/4stattack.in ./files/4stattack.in --- /usr/ports/games/4stattack/files/4stattack.in 1970-01-01 01:00:00.000000000 +0100 +++ ./files/4stattack.in 2012-11-03 21:01:24.000000000 +0100 @@ -0,0 +1,11 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +if [ ! -f ~/.4stattackrc ]; then + cp "%%DATADIR%%"/settings.ini ~/.4stattackrc +fi + +cd "%%DATADIR%%" +exec /usr/bin/env python ./4stattack.py -ini ~/.4stattackrc "${@}" diff -ruN --exclude=CVS /usr/ports/games/4stattack/files/patch-4stattack ./files/patch-4stattack --- /usr/ports/games/4stattack/files/patch-4stattack 2013-01-14 17:55:29.000000000 +0100 +++ ./files/patch-4stattack 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ ---- 4stattack.orig Mon Jan 26 08:08:08 2004 -+++ 4stattack Mon Jan 26 08:28:42 2004 -@@ -1,9 +1,6 @@ - #!/bin/sh --FAHOME=/usr/share/forcedattack2 -+FAHOME=%%DATADIR%% - if [ ! -f ~/.4stattackrc ]; then -- cp $FAHOME/settings.ini ~/.4stattackrc -+ install -m 644 $FAHOME/settings.ini ~/.4stattackrc - fi --if [ -x $FAHOME/4stattack.py ]; then -- $FAHOME/4stattack.py -ini ~/.4stattackrc --fi -- -+cd $FAHOME && %%PYTHON%% 4stattack.py -ini ~/.4stattackrc diff -ruN --exclude=CVS /usr/ports/games/4stattack/pkg-descr ./pkg-descr --- /usr/ports/games/4stattack/pkg-descr 2013-01-14 17:55:29.000000000 +0100 +++ ./pkg-descr 2012-11-03 21:05:23.000000000 +0100 @@ -1,6 +1,5 @@ -4st Attack is a game in which you have to try to out-smart your -opponent. The goal of the game is to connect four of stones in a -straight line. This can be horizontaly, vertically and even -diagonnally. +4st Attack is a game in which you have to try to out-smart your opponent. +The goal of the game is to connect four of stones in a straight line +This can be horizontaly, vertically and even diagonnally. WWW: http://forcedattack.sourceforge.net/ diff -ruN --exclude=CVS /usr/ports/games/4stattack/pkg-plist ./pkg-plist --- /usr/ports/games/4stattack/pkg-plist 2013-01-14 17:55:29.000000000 +0100 +++ ./pkg-plist 2013-02-22 20:56:39.000000000 +0100 @@ -11,6 +11,7 @@ %%DATADIR%%/chat.py %%DATADIR%%/chat.pyc %%DATADIR%%/chat.pyo +%%DATADIR%%/credits.txt %%DATADIR%%/creditsscreen.py %%DATADIR%%/creditsscreen.pyc %%DATADIR%%/creditsscreen.pyo @@ -160,6 +161,7 @@ %%DATADIR%%/gui/widget_manager.py %%DATADIR%%/gui/widget_manager.pyc %%DATADIR%%/gui/widget_manager.pyo +%%DATADIR%%/ini.txt %%DATADIR%%/inisettings.py %%DATADIR%%/inisettings.pyc %%DATADIR%%/inisettings.pyo @@ -228,6 +230,7 @@ %%DATADIR%%/startscreen.pyc %%DATADIR%%/startscreen.pyo %%DATADIR%%/technical.ttf +%%DATADIR%%/test.ini %%DATADIR%%/testgui.py %%DATADIR%%/testgui.pyc %%DATADIR%%/testgui.pyo @@ -239,15 +242,30 @@ %%DATADIR%%/themeresizer.pyo %%DATADIR%%/themeresizer.sh %%DATADIR%%/version -%%PORTDOCS%%%%DOCSDIR%%/changelog.txt -%%PORTDOCS%%%%DOCSDIR%%/credits.txt -@dirrm %%DATADIR%%/data/music +share/icons/hicolor/16x16/apps/4stattack.png +share/icons/hicolor/22x22/apps/4stattack.png +share/icons/hicolor/32x32/apps/4stattack.png +share/icons/hicolor/48x48/apps/4stattack.png +share/icons/hicolor/64x64/apps/4stattack.png +share/pixmaps/4stattack.png +@dirrmtry share/icons/hicolor/64x64/apps +@dirrmtry share/icons/hicolor/64x64 +@dirrmtry share/icons/hicolor/48x48/apps +@dirrmtry share/icons/hicolor/48x48 +@dirrmtry share/icons/hicolor/32x32/apps +@dirrmtry share/icons/hicolor/32x32 +@dirrmtry share/icons/hicolor/22x22/apps +@dirrmtry share/icons/hicolor/22x22 +@dirrmtry share/icons/hicolor/16x16/apps +@dirrmtry share/icons/hicolor/16x16 +@dirrmtry share/icons/hicolor +@dirrmtry share/icons +@dirrm %%DATADIR%%/players +@dirrm %%DATADIR%%/gui/dialogs +@dirrm %%DATADIR%%/gui @dirrm %%DATADIR%%/data/themes/clean/1024x768 @dirrm %%DATADIR%%/data/themes/clean @dirrm %%DATADIR%%/data/themes +@dirrm %%DATADIR%%/data/music @dirrm %%DATADIR%%/data -@dirrm %%DATADIR%%/gui/dialogs -@dirrm %%DATADIR%%/gui -@dirrm %%DATADIR%%/players @dirrm %%DATADIR%% -%%PORTDOCS%%@dirrm %%DOCSDIR%% diff -ruN --exclude=CVS /usr/ports/games/4stattack/scripts/py-compile ./scripts/py-compile --- /usr/ports/games/4stattack/scripts/py-compile 2013-01-14 17:55:29.000000000 +0100 +++ ./scripts/py-compile 1970-01-01 01:00:00.000000000 +0100 @@ -1,92 +0,0 @@ -#!/bin/sh - -# py-compile - Compile a Python program -# Copyright 2000, 2001 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# called as "py-compile [--basedir DIR] PY_FILES ... - -if [ -z "$PYTHON" ]; then - PYTHON=python -fi - -basedir= - -case "$1" in - --basedir) - basedir=$2 - shift 2 - ;; - --help) - echo "Usage: py-compile [--basedir DIR] PY_FILES ..." - echo "Byte compile some python scripts. This should be performed" - echo "after they have been moved to the final installation location" - exit 0 - ;; - --version) - echo "py-compile version 0.0" - exit 0 - ;; -esac - -if [ $# = 0 ]; then - echo "No files given to $0" 1>&2 - exit 1 -fi - -# if basedir was given, then it should be prepended to filenames before -# byte compilation. -if [ -z "$basedir" ]; then - trans="path = file" -else - trans="path = os.path.join('$basedir', file)" -fi - -$PYTHON -c " -import sys, os, string, py_compile - -files = '''$*''' -print 'Byte-compiling python modules...' -for file in string.split(files): - $trans - if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): - continue - print file, - sys.stdout.flush() - py_compile.compile(path) -print" || exit $? - -# this will fail for python < 1.5, but that doesn't matter ... -$PYTHON -O -c " -import sys, os, string, py_compile - -files = '''$*''' -print 'Byte-compiling python modules (optimised versions) ...' -for file in string.split(files): - $trans - if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): - continue - print file, - sys.stdout.flush() - py_compile.compile(path) -print" 2>/dev/null || : - ===> Done --MP_/Bpsgu.+z.MRZ=sl_/HyhDOF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302222020.r1MKK2F8095567>