diff --git a/code/tools/pkgresources/Scripts_python/postinstall b/code/tools/pkgresources/Scripts_python/postinstall index 6da6b130..70aba55d 100755 --- a/code/tools/pkgresources/Scripts_python/postinstall +++ b/code/tools/pkgresources/Scripts_python/postinstall @@ -1,4 +1,4 @@ #!/bin/sh -# currently does nothing at all -exit 0 +# undo the removal prevention done in preinstall +/usr/bin/chflags -fR noschg,nouchg /usr/local/munki/Python.framework/Versions/3.* \ No newline at end of file diff --git a/code/tools/pkgresources/Scripts_python/preinstall b/code/tools/pkgresources/Scripts_python/preinstall new file mode 100755 index 00000000..ffd0a820 --- /dev/null +++ b/code/tools/pkgresources/Scripts_python/preinstall @@ -0,0 +1,8 @@ +#!/bin/sh + +# we're going to install version 3.10 +# prevent installer from removing a version currently in use +# (must update this script when we move to a new Python version) +for OLDVERS in 3.7 3.8 3.9 ; do + /usr/bin/chflags -fR schg,uchg /usr/local/munki/Python.framework/Versions/$OLDVERS +done \ No newline at end of file