Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
3-manifolds
GitHub Repository: 3-manifolds/Sage_macOS
Path: blob/main/Sage_framework/install_pkgs.sh
170 views
1
# This script replaces sage's pillow and notebook packages and their
2
# dependencies with current versions installed from binary wheels. It
3
# also installs cocoserver, for viewing the documentation.
4
5
if ! [ -e repo/sage ]; then
6
echo "The sage distribution is not where we expect to find it."
7
echo "This script must be run from the Sage_framework directory."
8
exit 1
9
fi
10
11
VERSION=`../bin/get_sage_version`
12
SAGE_SYMLINK="/var/tmp/sage-$VERSION-current"
13
if [ -L ${SAGE_SYMLINK} ]; then
14
rm ${SAGE_SYMLINK}
15
elif [ -e ${SAGE_SYMLINK} ]; then
16
echo ${SAGE_SYMLINK} is not a symlink !!!
17
exit 1
18
fi
19
mv repo/sage ${SAGE_SYMLINK}
20
pushd ${SAGE_SYMLINK}
21
# Re-install pillow jupyterlab and notebook.
22
PIP_ARGS="install --no-user --force-reinstall --upgrade-strategy eager"
23
venv/bin/python3 -m pip $PIP_ARGS pillow jupyterlab notebook
24
# Install cocoserver
25
PIP_ARGS="install --no-user --upgrade --no-deps"
26
venv/bin/python3 -m pip $PIP_ARGS cocoserver
27
# Move the repo back where it belongs.
28
popd
29
mv /var/tmp/sage-$VERSION-current repo/sage
30
31