Better way to get Python version

Bug #384712 reported by Juho Vepsäläinen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ARchitecture library
Fix Released
Medium
Stani

Bug Description

This patch makes it possible to extract the version of Python installed in the system making it unnecessary to tweak the installation files should the version used be other than 2.5 (I use 2.6).

Tags: patch
Revision history for this message
Juho Vepsäläinen (bebraw) wrote :
Revision history for this message
Stani (stani) wrote :

Hey Juho, thanks a lot! I've changed the print syntax to "print(sys.version)". As this works already in python2.5

$ bzr diff
=== added file 'linux/get_python_version'
--- linux/get_python_version 1970-01-01 00:00:00 +0000
+++ linux/get_python_version 2009-06-08 10:42:20 +0000
@@ -0,0 +1,3 @@
+#!/bin/bash
+echo `python -c 'import sys; print(sys.version[:3])'`
+

=== modified file 'linux/install'
--- linux/install 2009-04-02 02:39:15 +0000
+++ linux/install 2009-06-08 10:39:06 +0000
@@ -1,5 +1,5 @@
 #!/bin/bash
-PY_VERSION=2.5
+PY_VERSION=`./get_python_version`
 BLENDER_SCRIPTS=~/.blender/scripts
 sudo apt-get install ipython python-imaging python-cairo python-psyco
 cd ..

=== modified file 'linux/update_blender_scripts'
--- linux/update_blender_scripts 2009-04-02 02:39:15 +0000
+++ linux/update_blender_scripts 2009-06-08 10:39:07 +0000
@@ -1,5 +1,5 @@
 #!/bin/bash
-PY_VERSION=2.5
+PY_VERSION=`./get_python_version`
 BLENDER_SCRIPTS=~/.blender/scripts
 #install symlinks
 cd ../blender/scripts

Changed in ar:
assignee: nobody → stani (stani)
importance: Undecided → Medium
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.