Date: Thu, 4 Nov 2010 13:50:12 GMT From: wen heping <wenheping@gmail.com> To: freebsd-python@FreeBSD.org Subject: Re: ports/146957: Mk/bsd.python.mk: PYTHONOPTIMIZE=1 in environ(7) breaks plist Message-ID: <201011041350.oA4DoCsN075708@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/146957; it has been noted by GNATS. From: wen heping <wenheping@gmail.com> To: bug-followup@FreeBSD.org, swell.k@gmail.com Cc: Subject: Re: ports/146957: Mk/bsd.python.mk: PYTHONOPTIMIZE=1 in environ(7) breaks plist Date: Thu, 4 Nov 2010 21:44:08 +0800 Hi, When set PYTHONOPTIMIZE=1, that enable python use the optimize mode, just as run python with -O args. And when python run with -O args, it compile .py source file directly to .pyo file but without .pyc file. It will lead to the pkg-plist error that you mentioned. So it is not a bug in bsd.python.mk. Maybe we can resolve it by: 1) Add a pkg-plist variable PYTHONOPT in bsd.python.mk: PLIST_SUB+= PYTHONOPT=${PYTHONOPT} 2) set PYTHONOPT='' when PYTHONOPTIMIZE is not defined and set it to "@comment" when it is defined. 3) Add %%PYTHONOPT%% to all lines ended with .pyc in pkg-plist file But I do not think it is a good way to resolv it and currently I could not find a simple way to resolv it. Maybe the best way is just let it be? :) wen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011041350.oA4DoCsN075708>