[Bf-committers] Moving to Python 3.2.x

Dave Plater dplater at webafrica.org.za
Mon Mar 7 20:45:28 CET 2011

On 03/07/2011 01:35 PM, Campbell Barton wrote:
> This means getting the path to includes & libs isn't so simple
> anymore, for linux it may be best to search for all possibly
> combinations of d/m/u to detect the python version, but for now these
> need to be set manually.
This rpm macro gets the abi suffix :
%global py3_abi_kind %(python3-config --abiflags)
this one gets the version :
%global python3_ver %(python3 -c "import sys; v=sys.version_info[:2];
print('%%d.%%d'%%v)" 2>/dev/null || echo PYTHON-NOT-FOUND)
and this is how it's used :
   -DPYTHON_LIBRARY=%{_libdir}/libpython%{python3_ver}%{py3_abi_kind}.so \

With this blender builds with both 3.1 and 3.2

Dave P

More information about the Bf-committers mailing list