[Bf-committers] Bundle Python 3.0 for Blender 2.5 (proposal)

Campbell Barton ideasman42 at gmail.com
Fri Dec 5 05:11:06 CET 2008


Hey All, this proposal covers 2 topics
* Distribute Blender with python on all OS's (I'd suggest this
irrespective of py version used)
* Move to Python 3.0 for blender 2.5 (relies on a bundling python)

I'm able to do most of the tasks for these changes, however platform
maintainers would need to help out for a bundled python.

With 2.5 we can postpone these decisions for a while, but it would be
good to cover some issues on the ML before discussing in IRC.

= Distributing Blender With Python, has some pro's and cons =
Pro's
* We can include modules bundled scripts use so that users are not
faced with error messages when they try a python tool.
* No need to distribute blender for versions py 2.3, 2.4, 2.5, 2.6....
and later 3.0 - We alredy are having to do both 32 and 64bit Blender
builds. Many users wont know what python version is installed on their
system.
* A reliable python means we can use it for more important aspects of
Blender 2.5 (something Ton has suggested)
* No conflicts with the system python - there have been bug reports
where the system python was crashing blender.
* Opens up opportunity to include modules that are not apart of python
distribution (some of the math/array modules could be useful in
blender)

Cons
* Extra Filesize - (between 1 and 3meg to the compressed archive,
basic libs+sys/struct/math/os are around 0.5meg, but we'll want more
modules then that)
* Using external modules means you'll still need the same version of
python installed that blender was built with. (see notes*)
* Blender will be fixed running its own Python lib and will be
excluded from system fixes/security updates. (typical sysadmin
argument).

Comments...
* Win32 already does most of this, just dosnt include modules some
scripts require.
* Blender already includes FFMpeg and some other significant libs on
most OS's, IMHO blender.org distribution should work out of the box
with minimal hassles for non-technical users.
* Openoffice and some games include python, searched for python
problems with these apps and didnt find complaints, common with
Blender.
* I have made self contained blender/python packages for Linux and
Solaris - its not that difficult.
* Using the system python can stay as a build option. Linux packages
can use system python still. People who want to use PyGame or PIL are
most likely developing python scripts and can use a build from
graphicall or build blender themselves.
* staticly linked python VS including libpython*.so option can be
decided per OS.
* We can include python in libs (or extern? Id prefer not), if
building with 3.0 is an issue.

For anyone thinking system python isnt an issue, a search for...
  "import site" python version
Gives 498 posts on blenderartist, see the bottom of this mail for a
list of some from the first 2 search pages.



= Python 3.0 =
As mentioned before Blender 2.5 will inevitably break scripts, even if
we keep the existing api's.
I'm making new python API's in 2.5 will be Py3.0 compatible, so the
eventual switch wont be any trouble whenever it happens (if we done
use BPy2.4x api).
>From using the python 3.0 C/api, its not that big a deal to move to
it, just monkey-work and testing (estimate 3-5 days at a guess for the
2.4x api maybe a day or 2 for the BGE api)

Comments...
* Python 3.0 was released the other day, so there is some time for it
to mature (important fixes/speedups etc) by the time it gets into a
blender 2.5 release.
* With a bundled python we can make the move to 3.0 without
distribution problems.
* Switching to 3.0 now means we can avoid going over all scripts a second time.
* Easier for people who have their own scripts if we don't break
python compatibility between releases 2.5 & 2.5x.

-----


*** Some python problems from a search on blender artist doe out of
touch dev's who insist this isn't an issue :) ***
starting point - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=141582
python error importing .dae - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=142248
Blender install - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=140751
Creating paper models - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=101194
Blender 2.48a and my opensuse 11 64 bit - Blender Artists Forums	
  http://blenderartists.org/forum/showthread.php?t=139925
How do I get or install python 2.5 or the most current? - Blender
Artists Forums	
http://blenderartists.org/forum/showthread.php?t=109553
Python Scripts don't load - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=138578
Importing from Lightwave - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=135111
python problem biiig!!!! - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=133687
Python on a Mac - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=133043
Can't start blender on vista - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=132209
Want to run two versions of blender on one machine - Blender Artists
Forums	        http://blenderartists.org/forum/showthread.php?t=132226
Fail to import .x - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=130758
Why? Import Wavefront .OBJ not working... - Blender Artists Forums	
    http://blenderartists.org/forum/showthread.php?t=127819
Does anyone know how to Import a lightwave 3-D oblect into blender? -
Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=105785
Python 2.4/2.5 for mac ? - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=118648
Blender crashes when i try to import .nif files. - Blender Artists
Forums	        http://blenderartists.org/forum/showthread.php?t=113530
Open Flight import/export problems - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=108330
LWO import still broken in 2.45 and request - Blender Artists Forums	
      http://blenderartists.org/forum/showthread.php?t=109235
How to set your PYTHONPATH 101 - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=7412
Python? - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=108150
OS X 10.4.10, Python 2.5, Blender 2.45 for intel Mac, app won't run -
Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=107231
Importing (OBJ) Wavefront-Crashing - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=104786
Missing Python - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=103689
need help on python 2.5 - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=102569
Help Installing Blender on Debian Linux - Blender Artists Forums	
  http://blenderartists.org/forum/showthread.php?t=100812
Installing Python Scripts? - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=99679
Strange import error - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=99025
Blender doesn't recognize my Py install - Blender Artists Forums	
  http://blenderartists.org/forum/showthread.php?t=97710
Problem with Python in Version 2.44 - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=96795
-v traceback question - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=96548
Help, Blender wont run - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=96106
Import modules - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=93649
Blender scripts do not work on 64 bits - Blender Artists Forums	
 http://blenderartists.org/forum/showthread.php?t=95113
What m I doing wrong??? - Blender Artists Forums	
http://blenderartists.org/forum/showthread.php?t=93451
No Python?! - Blender Artists Forums 	
http://blenderartists.org/forum/showthread.php?t=90485

-- 
- Campbell


More information about the Bf-committers mailing list