<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><span id="result_box" class=""
        lang="en"><span class="hps">Sorry.<br>
          <br>
          I changed</span> <span class="hps">in my machine</span> <span
          class="hps">a few days</span> <span class="hps">the </span><span
          class="hps">definition</span> <span class="hps">of the
          variable</span> <span class="hps">PYTHON_VERSION</span> <span
          class="hps">for</span> <span class="hps">the line:</span></span><br>
      <br>
      PYTHON_VERSION=`python --version 2>&1 | sed 's/.*
      \([1-9]\.[0-9]*\)\.[0-9]*$/\1/'`<br>
      <br>
      is fine now.<br>
    </div>
    <blockquote cite="mid:20120819110006.GA4355@kiras" type="cite">
      <pre wrap="">On Sun, 2012-08-19 at 05:05:48 -0400, B Watson wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">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.
</pre>
      </blockquote>
      <pre wrap="">
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.

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SlackBuilds-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:SlackBuilds-users@slackbuilds.org">SlackBuilds-users@slackbuilds.org</a>
<a class="moz-txt-link-freetext" href="http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users">http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a>
Archives - <a class="moz-txt-link-freetext" href="http://lists.slackbuilds.org/pipermail/slackbuilds-users/">http://lists.slackbuilds.org/pipermail/slackbuilds-users/</a>
FAQ - <a class="moz-txt-link-freetext" href="http://slackbuilds.org/faq/">http://slackbuilds.org/faq/</a>

</pre>
    </blockquote>
    <br>
  </body>
</html>