blender module build script

Here is a place for your projects which are not officially supported by the Porteus Team. For example: your own kernel patched with extra features; desktops not included in the standard ISO like Gnome; base modules that are different than the standard ISO, etc...
User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

blender module build script

Post#1 by ncmprhnsbl » 07 Sep 2019, 05:26

here is a script that fetches and makes a module for porteus-5.0 and porteus-4.0 from the latest stable blender binary release or nightly daily development release(64bit only, 32bit offers only the latest stable) or from a binary tar.bz2 placed in /tmp or a (POSIX) dir of your choice.
Suitable binary tar.bz2 s include those from blender.community/c/graphicall/
If python3.7 is present, most of the bundled python is removed, which blender is tricked into using via links. If not, bundled python is included.
the bundled python is now at 3.10 (slackware is at 3.9) so bundled python is included.
Opengl stuff is also left out.
Unused language packs are also removed.
A module is here: update-blender-20230116.xzm md5sum: d40f5512bc520c8c1b7ced6973b4f7fe
contents:

Code: Select all

update-blender-20221023
└── usr
    └── local
        └── bin
            └── update-blender
to use: open a terminal and type "update-blender"
options are: -h (shows usage info)
-v (shows version number(date))
and -d (which makes all build operations done in current directory instead of /tmp(must be POSIX ie.not fat or ntfs... useful for limited RAM)

update-blender:

Code: Select all

#!/bin/bash
## update-blender
## A script to make a module for porteus-5.0 from the latest stable blender binary release
## or from a binary tar.xz placed in /tmp or a (POSIX) dir of your choice
## suitable binary tar.xz include the development builds from builder.blender.org/download/ or blender.community/c/graphicall/
##
## Use at your own risk!! Possible negative outcomes: wasted bandwidth and an useless module. The puppies may survive.
##
## by ncmprhnsbl  forum.porteus.org
SVER=20230116

# Source porteus-functions
. /usr/share/porteus/porteus-functions
get_colors

txtbld=$(tput bold)
txtred=${txtbld}$(tput setaf 1)
txtgreen=${txtbld}$(tput setaf 2)
txtwhite=${txtbld}$(tput setaf 7)
txtcyan=${txtbld}$(tput setaf 6)
rst=$(tput sgr0)
function bold(){ echo -e $txtbld "$1" $rst; }
function green() { echo -e $txtgreen "$1" $rst; }
function red(){ echo $txtred "$1" $rst; }
function cyan(){ echo $txtcyan "$1" $rst; }

saypass(){ echo "[${txtgreen}PASS$rst] $1"; }
sayfail(){ echo "[${txtred}FAIL$rst] $1"; }

# Check for root
if [ `whoami` != "root" ]; then
	   if [ `whoami` != "root" ]; then
      echo "Please enter root's password below"
      su - -c "update-blender $1"
      exit
   fi
fi

## Variables
URL1=https://download.blender.org/release/
URL2=https://builder.blender.org/download/
PORTVER=`cat /etc/porteus-version | cut -d- -f2`
PYTHVER=`/usr/bin/python --version |  cut -d" " -f2 | awk -F. '{print$1$2}'`


# functions set work directory(default is /tmp) to current work directory
set_tmp() {
WRKDIR=/tmp
}

set_pwd() {
WRKDIR=`pwd`
}

# echo usage
show_help() {
        echo " update-blender: "
        echo " This script will download the latest stable release of blender "
        echo " and create a porteus module. "
        echo " A predownloaded tarball can also be used by placing it in /tmp"
        echo " or your chosen directory(-d) which needs to be POSIX compatible."
        echo
	echo " options:  -d : do operations in the present directory, instead of /tmp . "
	echo "           -h : show this usage. "
	echo "           -v : show script version. "
}

# echo script version
show_version() {
	echo " update-blender version: $SVER "
}

while getopts ":-d:-h:-v:" o; do
case "$1" in

    -d)
       set_pwd;;

    -h)
      show_help
      exit 0;;

    -v)
      show_version
      exit 0;;

     *)
      show_help
      exit 1;;

esac
done
case "$1" in

    "")
      set_tmp;;

esac

# tell us where the work will be done
echo "Work will be done in: $WRKDIR "

## Check if there's enough working space
[ `df -l --output=avail $WRKDIR | tail -1` -lt 384000 ] && { red "There's not enough space to run this script"; exit 1; }

case `uname -m` in
	x86_64)
	ARCH=x86_64
	SUFFIX=x64
	SARCH=x86_64
	;;
	*)
	ARCH=i686
	SUFFIX=
	SARCH=i586
	;;
esac


## functions for setting locale
array_menu(){
echo
echo "$1"
echo "$2"
select LOCALE in ${ARESULT[@]}; do
    if [ -z "$LOCALE" ]; then
        bold "English locale chosen." && echo
			else
		bold "$LOCALE locale chosen"
    fi
    break
done
}

get_locale(){
# Set locales in array
for a in ab ar ca cs de eo en-US es es_ES eu fa fr ha he hi hr hu id it ja ko ky nl pl pt pt-BR ru sk sr sr@latin sv th tr uk vi zh-CN zh-TW; do
	ARESULT+=( $a )
done
array_menu "Choose a locale from the list."
unset ARESULT
}

array_menu2(){
echo
echo "$1"
echo "$2"
select CHOICE1 in ${RESULT2[@]}; do
    if [ -z "$CHOICE1" ]; then
        bold "? release chosen." && echo
			else
		bold "$CHOICE1 release chosen"
    fi
    break
done
}

get_release_type(){
array_menu2 "Please choose a release from the menu."
case $CHOICE1 in
	stable) URL=$URL1 BPY=310;;
    daily-alpha) URL=$URL2 BPY=310;;
	daily-beta) URL=$URL2 BPY=310;;
	*)
	echo "Invalid choice"
	$FUNCNAME
	;;
esac
}

cleanup(){
echo
rm -rf $TARG
[ -d $TMPDIR ] && rm -rf $TMPDIR
exit
}
trap cleanup SIGHUP SIGINT SIGTERM

## (soft)checksum check
checksum () {
if [ -z $CHOICE ]; then
echo "Verifying download integrity.."
echo "Server  : $SUM1"
echo "Download: $SUM2"
if [ "$SUM1" = "$SUM2" ]; then
     echo "Download verified."
else
     echo "Warnig: Integrity check failed."
     echo "Continuing anyway.. if there's a problem, this could be it."
fi
fi
}

## Check for tarball in $WRKDIR
if [ `find ${WRKDIR}/blender* 2>/dev/null | wc -l` -ge 1 ]; then
	# Make sure it is a tarball
	cfile=( `find $WRKDIR/blender-*.tar.xz 2>/dev/null | awk -F/ '{print$NF}' ` )
	if [ ${#cfile[@]} -gt 0 ]; then
		RESULT=${cfile[@]}
		echo
		green "A blender tarball was found in $WRKDIR"
		echo " We will use this archive to create blender."
		menu_from_array "Choose the blender file you want to process."
		echo "CHOICE:$txtgreen $CHOICE $rst"
	fi
fi

TMPDIR=$WRKDIR/.blen.$$
CWD=`pwd`

## if x86_64 offer a choice of stable or daily build, if not , don't
if [ -z $CHOICE ]; then
	if [ "$ARCH" = "x86_64" ]; then
		RESULT2+=( 'stable' 'daily-alpha' 'daily-beta' )
		get_release_type
	else
		echo "Unfortunately, Blender Foundation no longer supplies 32 bit binaries. :("
		cleanup
	fi
fi

## get relevent version info
if [ -z $CHOICE ]; then
	echo " Fetching latest Blender version info.."
	if [ "$CHOICE1" = "stable" ]; then
		TVER=`lynx -dump --nonumbers --listonly $URL | grep -o "[0-9].[0-9]" | sort | tail -n1`
		LVER=`lynx -dump --nonumbers --listonly $URL/Blender$TVER  | grep "linux" | sort | tail -n1 | cut -d"-" -f2`
		VER1=${LVER%-*}
		VER=${VER1%.*}
		echo " Latest version is:" $txtgreen "$LVER" $rst
		echo " python is $BPY"

	elif [ "$CHOICE1" = "daily-alpha" ]; then
		LVER=`lynx -dump --nonumbers --listonly $URL  | grep "linux" | sort | tail -n1 | cut -d"-" -f2,3`
		VER1=${LVER%-*}
		VER=${VER1%.*}
		echo " Latest version is:" $txtgreen "$LVER" $rst
		echo " python is $BPY"
		#echo " $VER "

    elif [ "$CHOICE1" = "daily-beta" ]; then
		LVER=`lynx -dump --nonumbers --listonly $URL  | grep "linux" | grep "candidate" | sort | tail -n1 | cut -d"-" -f2,3`
		VER1=${LVER%-*}
		VER=${VER1%.*}
		echo " Latest version is:" $txtgreen "$LVER" $rst
		echo " python is $BPY"
	fi

else
   if [ "`tr -dc '-' <<< $CHOICE | wc -c`" = "5" ]; then
      LVER=`cut -d"-" -f2,3 <<< $CHOICE`
      VER=${LVER%-*}
      echo " version is: $VER"
   elif [ "`tr -dc '-' <<< $CHOICE | wc -c`" = "4" ]; then
      LVER=`cut -d"-" -f2 <<< $CHOICE`
      VER=${LVER%.*}
      SRC=${CHOICE%.*.*}
      echo " version is: $VER"
      echo " src is : $SRC"
   elif [ "`tr -dc '-' <<< $CHOICE | wc -c`" = "3" ]; then
      LVER=`cut -d"-" -f2 <<< $CHOICE`
      VER=${LVER%.*}
      SRC=${CHOICE%.*.*}
      echo " version is: $VER"
      echo " src is : $SRC"
   else
      echo " Unable to get version info.. "
      echo " The tarball's name does not conform to known parameters. "
      echo " Exiting.."
      exit 1
   fi
fi

### some idea about 'rc' versions
#if [ `wc -m <<< $VER` -gt 4 ]; then
#	cut -c 1-4 <<< $VER
#fi

## Determine glibc version supplied
#if [ -z $CHOICE ]; then
#	if [ "$ARCH" = "x86_64" ]; then
#		GLIBC="-glibc217";
#	else
#		GLIBC="-glibc224";
#	fi
#elif [ -n "`grep -o "glibc" <<< $CHOICE`" ]; then
#	GLIBC="-`awk -F"linux-" '{print$2}' <<< $CHOICE | cut -d- -f1`"
#else
#	GLIBC=
#fi


if [ -z $CHOICE ]; then
  read -p " Would you like to create a module of the latest version? [y/n]" -n 1 -r -s && echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then cleanup; fi
else
  read -p " Would you like to continue with this tarball? [y/n]" -n 1 -r -s && echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then cleanup; fi
fi

get_locale

if [ -z $CHOICE ]; then
	if [ "$URL" = "$URL1" ]; then
		EXT="tar.xz"
		TAR="blender-${LVER}-linux-${SUFFIX}.${EXT}"
		SRC="blender-${LVER}-linux-${SUFFIX}"
		DURL="${URL}Blender${VER}/${TAR}"
		#VER2=`echo $VER | tr -d '.'`
		SUM1=`lynx -dump --dont_wrap_pre $DURL/release${LVER//./}.md5 | grep $TAR | cut -d" " -f1`
	elif [ "$URL" = "$URL2" ]; then
		EXT="tar.xz"
		TAR="blender-${LVER}-linux.${ARCH}-release.${EXT}"
		SRC="blender-${LVER}-linux.${ARCH}-release"
	fi
fi

## Create temp dir
[ ! -d $TMPDIR ] && mkdir -p $TMPDIR || rm -rf "${TMPDIR:?}"
## download choice or copy existing
if [ -z $CHOICE ]; then
	if [ "$URL" = "$URL1" ]; then
		download $DURL $TMPDIR
	elif [ "$URL" = "$URL2" ]; then
	    download $URL/$TAR $TMPDIR
	fi
else
   cp -a $WRKDIR/$CHOICE $TMPDIR
fi

## Check that we have an archive in TMPDIR
if [ -z $CHOICE ]; then
    if [ ! -f $TMPDIR/$TAR ]; then
		echo
		sayerror "File $TAR not found"
		cleanup
	fi
elif [ ! -f $TMPDIR/$CHOICE ]; then
	echo
	sayerror "File $CHOICE not found"
	cleanup
fi

## checksum check
if [ -z "$URL" ] && [ "$URL" = "$URL1" ]; then
	SUM2=`md5sum $TMPDIR/$TAR | cut -d" " -f1`
	checksum
fi

## go to module build dir
cd $TMPDIR

if [ -z $CHOICE ]; then
   tar xvf $TAR
else
   tar xvf $CHOICE
fi

echo " Locale is $LOCALE"
#echo " version is $VER "
echo " Removing unwanted locales ..."
if [ "$LOCALE" != "en-US" ]; then
   find $SRC/$VER/datafiles/locale -type f -name "*" | egrep -v "${LOCALE}" | xargs -i rm {}
else
   rm -rvf $SRC/$VER/datafiles/locale
fi

chown -R root:root $SRC
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;


echo "making build directories.."
mkdir -p $TMPDIR/build/usr/share/applications
mkdir -p $TMPDIR/build/usr/bin
#~ if [ "$BPY" = "37" ]; then
	#~ if [ "$PYTHVER" = "37" ]; then
		#~ mkdir -p $TMPDIR/build/usr/lib$SUFFIX/python3.7
		#~ mkdir -p $TMPDIR/build/opt/blender-$VER/$VER/python
	#~ else
		#~ mkdir -p $TMPDIR/build/opt/blender-$VER/$VER		
	#~ fi
#~ elif [ "$BPY" = "39" ]; then
	#~ if [ "$PYTHVER" = "39" ]; then
		#~ mkdir -p $TMPDIR/build/usr/lib$SUFFIX/python3.9
		#~ mkdir -p $TMPDIR/build/opt/blender-$VER/$VER/python 
	#~ else
		#~ mkdir -p $TMPDIR/build/opt/blender-$VER/$VER
	#~ fi
#~ fi
mkdir -p $TMPDIR/build/opt/blender-$VER/$VER

cd $TMPDIR/build
#echo " source is : $SRC"
echo " copying the files we want.."
[ -e $TMPDIR/$SRC/$VER/datafiles ] && cp -a $TMPDIR/$SRC/$VER/datafiles opt/blender-$VER/$VER/
[ -e $TMPDIR/$SRC/$VER/scripts ] && cp -a $TMPDIR/$SRC/$VER/scripts opt/blender-$VER/$VER/
[ -e $TMPDIR/$SRC/blender ] && cp -a $TMPDIR/$SRC/blender opt/blender-$VER/
cp -a $TMPDIR/$SRC/blender* opt/blender-$VER/
cp -a $TMPDIR/$SRC/*.txt opt/blender-$VER/
[ -e $TMPDIR/$SRC/readme.html ] && cp -a $TMPDIR/$SRC/readme.html opt/blender-$VER/
[ -e $TMPDIR/$SRC/icons ] && cp -a $TMPDIR/$SRC/icons opt/blender-$VER/
## don't use shipped libgl ..but alpha needs some libcycles stuff
#if [ `echo $SRC | grep "alpha"` ]; then
if [ -e $TMPDIR/$SRC/lib/libcycles_kernel_oneapi_aot.so ]; then
	cp -a $TMPDIR/$SRC/lib opt/blender-$VER/
	[ -e opt/blender-$VER/lib/mesa ] && rm -rf opt/blender-$VER/lib/mesa	
fi	
## move the .desktop to somewhere useful
[ -e opt/blender-$VER/blender.desktop ] && mv opt/blender-$VER/blender.desktop usr/share/applications/
## and make it use the icon provided in /opt/blender
[ -e usr/share/applications/blender.desktop ] && sed -i "/Icon=/ s+blender+/opt/blender-$VER/blender.svg+" usr/share/applications/blender.desktop

## use only the site-packages (porteus has the rest of python3.9) ..this is potentially messy if the user has some of these installed already...
## only do for python 3.9
#~ if [ "$BPY" = "39" ]; then
	#~ if [ "$PYTHVER" = "39" ]; then
		#~ [ -e $TMPDIR/$SRC/$VER/python/lib/python3.9/site-packages ] && cp -a $TMPDIR/$SRC/$VER/python/lib/python3.9/site-packages usr/lib$SUFFIX/python3.9/
		#~ echo " linking some stuff so blender can find them.."
		#~ ln -s /usr/lib$SUFFIX opt/blender-$VER/$VER/python/lib
		#~ ln -s /usr/bin opt/blender-$VER/$VER/python/bin
	#~ fi
#~ elif [ "$BPY" = "37" ]; then
	#~ if [ "$PYTHVER" = "37" ]; then
		#~ [ -e $TMPDIR/$SRC/$VER/python/lib/python3.7/site-packages ] && cp -a $TMPDIR/$SRC/$VER/python/lib/python3.7/site-packages usr/lib$SUFFIX/python3.7/
		#~ echo " linking some stuff so blender can find them.."
		#~ ln -s /usr/lib$SUFFIX opt/blender-$VER/$VER/python/lib
		#~ ln -s /usr/bin opt/blender-$VER/$VER/python/bin
	#~ fi
#~ fi
[ -e $TMPDIR/$SRC/$VER/python ] && cp -a $TMPDIR/$SRC/$VER/python opt/blender-$VER/$VER/
rm -rf opt/blender-$VER/$VER/python/lib/python3.10/config-3.10-x86_64-linux-gnu

## only do for python other than 3.9 or 3.7
#~ if [ "$BPY" = "39" ]; then
	#~ if [ "$PYTHVER" != "39" ]; then
		#~ [ -e $TMPDIR/$SRC/$VER/python ] && cp -a $TMPDIR/$SRC/$VER/python opt/blender-$VER/$VER/
		#~ ## remove some unnecessary python bits
		#~ rm -rf opt/blender-$VER/$VER/python/lib/python3.9/config-3.9m-x86_64-linux-gnu
	#~ fi
#~ elif [ "$BPY" = "37" ]; then
	#~ if [ "$PYTHVER" != "37" ]; then
		#~ [ -e $TMPDIR/$SRC/$VER/python ] && cp -a $TMPDIR/$SRC/$VER/python opt/blender-$VER/$VER/
		#~ ## remove some unnecessary python bits
		#~ rm -rf opt/blender-$VER/$VER/python/lib/python3.7/config-3.7m-x86_64-linux-gnu
	#~ fi
#~ fi

[ -e opt/blender-$VER/blender ] && ln -s /opt/blender-$VER/blender usr/bin/blender

cd ${WRKDIR}

echo " Making module"

dir2xzm $TMPDIR/build ${WRKDIR}/blender-${LVER}-${ARCH}-${LOCALE}.xzm

echo " Your module is ready at ${WRKDIR}"
echo " Please move it to somewhere safe.."

cleanup

example contents of a blender module(for porteus 5):

Code: Select all

$ tree -L 5
.
├── opt
│   └── blender-2.81
│       ├── 2.81
│       │   ├── datafiles
│       │   │   ├── colormanagement
│       │   │   ├── fonts
│       │   │   ├── icons
│       │   │   └── studiolights
│       │   ├── python
│       │   │   ├── bin -> /usr/bin
│       │   │   └── lib -> /usr/lib64
│       │   └── scripts
│       │       ├── addons
│       │       ├── addons_contrib
│       │       ├── freestyle
│       │       ├── modules
│       │       ├── presets
│       │       ├── startup
│       │       ├── templates_osl
│       │       └── templates_py
│       ├── GPL-license.txt
│       ├── GPL3-license.txt
│       ├── LICENSE-bfont.ttf.txt
│       ├── LICENSE-bmonofont-i18n.ttf.txt
│       ├── LICENSE-droidsans.ttf.txt
│       ├── Python-license.txt
│       ├── blender
│       ├── blender-softwaregl
│       ├── blender-symbolic.svg
│       ├── blender-thumbnailer.py
│       ├── blender.svg
│       ├── copyright.txt
│       ├── icons
│       │   ├── scalable
│       │   │   └── apps
│       │   └── symbolic
│       │       └── apps
│       ├── jemalloc-license.txt
│       ├── ocio-license.txt
│       └── readme.html
└── usr
    ├── bin
    │   └── blender -> /opt/blender-2.81/blender
    ├── lib64
    │   └── python3.7
    │       └── site-packages
    │           ├── certifi
    │           ├── chardet
    │           ├── idna
    │           ├── libextern_draco.so
    │           ├── numpy
    │           ├── requests
    │           └── urllib3
    └── share
        └── applications
            └── blender.desktop
Last edited by ncmprhnsbl on 20 Jun 2020, 13:21, edited 3 times in total.
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

blender module build script

Post#2 by ncmprhnsbl » 23 Nov 2019, 05:51

updated to version 20191123 (see first post)
changes:
now offers choice of stable, nightly-alpha, nightly-beta(64 bit only, 32bit fetchs stable only)
note: alpha and beta will be the same after a stable release and then closer to the next release a new alpha will appear eg. 2.81(stable) 2.83-alpha and 2.82-beta
now supports porteus-4.0 (bundled python3 is included in the module)
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

blender module build script

Post#3 by ncmprhnsbl » 27 Dec 2019, 06:50

updated to verson 20191227
alpha/beta versons are now .tar.xz archives(were tar.bz2)
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

blender module build script

Post#4 by Rava » 24 Jan 2020, 19:08

ncmprhnsbl, I tried the most recent version of your script, "20191227", creating a stable version of blender, and it works like a charm:

Code: Select all

 blender --version
Blender 2.81 (sub 16)
	build date: 2019-11-20
	build time: 16:31:09
	build commit date: 2019-11-20
	build commit time: 14:27
	build hash: 26bd5ebd42e3
	build platform: Linux
	build type: Release
My system: Porteus 5.0rc1, XFCE DE.

Brilliant job. :good:

I presume your script includes python in the module when the system lacks python?

When I would activate a python module prior running your script, is then python missing in your module and the user needs to also activate the python module when wanting to activate blender at a later time (when he / she has not activated the python module in his/her system prior activating the blender module)?
Cheers!
Yours Rava

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

blender module build script

Post#5 by ncmprhnsbl » 25 Jan 2020, 01:53

Rava wrote:
24 Jan 2020, 19:08
I presume your script includes python in the module when the system lacks python?
not exactly, at the moment it takes a sledgehammer approach and works by determing by porteus version. ie.if 4.0 no python3 and if 5.0 python3 is there..
it would be better to test for python(presence and version) directly for the reason you've illustrated(eg. the case of v4.0 with python3.7 added)

also, i've noticed that current(unreleased) development porteus builds are now at python3.8 and blender is at still at 3.7 ..
something else i need to fix: blender dev builds are now .tar.xz (were tar.bz2) so 2.82 and 2.83 downloads will fail at present..
fixes coming soon..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

blender module build script

Post#6 by Rava » 25 Jan 2020, 03:25

ncmprhnsbl wrote:
25 Jan 2020, 01:53
also, i've noticed that current(unreleased) development porteus builds are now at python3.8 and blender is at still at 3.7 ..
So, I presume when I try running the blender module on this "current(unreleased) development porteus" (which was called "pre-rc2") blender would fail?
Cheers!
Yours Rava

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

blender module build script

Post#7 by ncmprhnsbl » 25 Jan 2020, 03:30

Rava wrote:
25 Jan 2020, 03:25
So, I presume when I try running the blender module on this "current(unreleased) development porteus" (which was called "pre-rc2") blender would fail?
yes
at some point, i imagine they'll base their builds on python3.8..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

blender module build script

Post#8 by Rava » 25 Jan 2020, 06:54

ncmprhnsbl wrote:
25 Jan 2020, 03:30
at some point, i imagine they'll base their builds on python3.8..
Or maybe some folks found fixes for the issue and posted it somewhere. But most probably you need to have Python 3.7 and 3.8 installed. :(

At least I found no solution but posts that confirm the issue like https://devtalk.blender.org/t/python-3- ... ment/11248 and https://devtalk.blender.org/t/including ... tion/10793

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

blender module build script

Post#9 by ncmprhnsbl » 25 Jan 2020, 22:18

well, in this case it's just a matter of not removing(and replacing with symlinks) the bundled(in the tarball) python(as is done for v4.0)
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

blender module build script

Post#10 by ncmprhnsbl » 27 Jan 2020, 06:04

updated to version 20200127
now tests for python version and if 3.7 is present the bundled python is (mostly) removed, if not, not.
alpha and beta versions are now .tar.xz archives
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

blender module build script

Post#11 by ncmprhnsbl » 02 Mar 2020, 12:06

updated to version 20200302
blender.org no longer provides 32 bit(i586) binaries
all versions are now .tar.xz archives
glibc version no longer part of the naming
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

blender module build script

Post#12 by ncmprhnsbl » 20 Jun 2020, 13:30

updated to version 20200620
accommodated new naming convention eg. 2.83.0 , 2.90.0
stripped some python bits (hopefully not used)
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

blender module build script

Post#13 by ncmprhnsbl » 28 Aug 2020, 06:06

updated to version 20200828
fixed self introduced bugs: test doesn't do globs[*] :p
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

blender module build script

Post#14 by Rava » 31 Oct 2020, 04:44

Is Blender Version 20200828 still not fully supporting Python 3.8?
Do they plan in doing so some day?
Cheers!
Yours Rava

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

blender module build script

Post#15 by ncmprhnsbl » 31 Oct 2020, 05:07

Rava wrote:
31 Oct 2020, 04:44
Is Blender Version 20200828 still not fully supporting Python 3.8?
"Version 20200828" refers to this update script, not blender..
this script downloads (one of: stable, alpha, beta) prebuilt binary tar.xz(by blender.org) that contains it's own python(3.7) lib..
at some point, i imagine that they will upgrade their binary package to a newer version of python.. probably not a high priority, tho..
if you wanted to compile blender yourself, it will compile with any python-3.* version..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

Post Reply