convention for compiling .py on MacPorts?
Jack Howarth
howarth at bromo.med.uc.edu
Thu Oct 15 15:41:33 PDT 2009
One change that might be useful to the pymol package would be to
compile the python scripts upon installation. In fink, we can do
this with...
PostInstScript: <<
update-alternatives --install %p/bin/pymol pymol %p/lib/pymol-py%type_pkg[python]/bin/pymol %type_pkg[python]
%p/bin/python%type_raw[python] -O %p/lib/python%type_raw[python]/compileall.py -q %p/lib/%n/modules
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
update-alternatives --remove pymol %p/lib/pymol-py%type_pkg[python]/bin/pymol
fi
PACKAGE=%N
dpkg --listfiles $PACKAGE |
/usr/bin/awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
xargs rm -f >&2
<<
Do any MacPorts packages that use python compile their scripts and is
there an accepted convention for doing this in MacPorts?
Jack
More information about the macports-dev
mailing list