On Sun, 2012-08-19 at 05:05:48 -0400, B Watson wrote: > While you're at it, use something like this (code taken from my > ecasound.SlackBuild): > > # Figure out the version number part of the python lib dir: > PYVER=$( python -c 'import sys; print "%d.%d" % sys.version_info[0:2]' ) > > PYVER will be "2.6" or "2.7" or whatever. Then in your > ./configure or cmake or whatever, use something like > --with-python-modules=/usr/lib$LIBDIRSUFFIX/python$PYVER > > Then when Slack 14.1 comes out, with python 2.8, your script wouldn't > need changing (at least, it wouldn't need that part changed). > > Disclaimer: IANAPP (I am not a Python programmer). If someone who is a > Python programmer has a better (more elegant) snippet of code to do the > same job, feel free to correct me.
This is fine, that's what Slackware's subversion SlackBuild is doing as well. You can omit 0 to shorten it by one character (sys.version_info[:2]), otherwise both ways are correct. -- Audrius Kažukauskas http://neutrino.lt/
pgpFF4UYXl0C0.pgp
Description: PGP signature
_______________________________________________ SlackBuilds-users mailing list SlackBuilds-users@slackbuilds.org http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - http://slackbuilds.org/faq/