added experimental sage image
This commit is contained in:
51
jupyter-sage/build.sh
Normal file
51
jupyter-sage/build.sh
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
pkgs=(standard
|
||||
bliss
|
||||
coxeter3
|
||||
mcqd
|
||||
meataxe
|
||||
sirocco
|
||||
tdlib)
|
||||
|
||||
prepare(){
|
||||
cd sage
|
||||
# use correct latte-count binary name
|
||||
# patch -p1 -i ../latte-count.patch
|
||||
# update to tdlib 0.9 (Fedora)
|
||||
# patch -p1 -i ../sagemath-tdlib-0.9.patch
|
||||
# Adapt to Singular changes
|
||||
# patch -p1 -i ../singular-4.4.patch
|
||||
# Fix build with GCC 14
|
||||
# git cherry-pick -n e87fd8466d10c21d8f16bd08187c11b4dc116020
|
||||
# git cherry-pick -n cec595ef953bb9e180aadee8583ad5a2fa5577d3
|
||||
./bootstrap
|
||||
}
|
||||
|
||||
build() {
|
||||
export SAGE_NUM_THREADS=$(($(nproc)/2))
|
||||
export PYTHONPATH="$PWD"/sage/pkgs/sage-setup
|
||||
|
||||
for _pkg in ${_pkgs[@]}; do
|
||||
cd "$srcdir"/sage/pkgs/sagemath-$_pkg
|
||||
python setup.py build
|
||||
done
|
||||
}
|
||||
|
||||
package() {
|
||||
for _pkg in ${_pkgs[@]}; do
|
||||
cd "$srcdir"/sage/pkgs/sagemath-$_pkg
|
||||
python setup.py install --root="$pkgdir" --optimize=1
|
||||
done
|
||||
|
||||
# fix symlinks to assets
|
||||
# _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
|
||||
# for _i in $(ls "$srcdir"/sage/src/sage/ext_data/notebook-ipython); do
|
||||
# rm "$pkgdir"/usr/share/jupyter/kernels/sagemath/$_i
|
||||
# ln -s $_pythonpath/sage/ext_data/notebook-ipython/$_i "$pkgdir"/usr/share/jupyter/kernels/sagemath/
|
||||
# done
|
||||
|
||||
# adjust threejs version
|
||||
# rm "$pkgdir"$_pythonpath/sage/ext_data/threejs/threejs-version.txt
|
||||
# ln -s /usr/share/threejs-sage/version "$pkgdir"$_pythonpath/sage/ext_data/threejs/threejs-version.txt
|
||||
}
|
Reference in New Issue
Block a user