[Slackbuilds-users] eric ide
audrius at neutrino.lt
Sun Aug 19 11:00:06 UTC 2012
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
> # 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
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: not available
More information about the SlackBuilds-users