[Slackbuilds-users] eric ide

Audrius Kažukauskas 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
> 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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20120819/efd5968e/attachment.asc>


More information about the SlackBuilds-users mailing list