Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mantepse committed Feb 20, 2023
2 parents 6a738b6 + 05329f6 commit cb2c82a
Show file tree
Hide file tree
Showing 416 changed files with 1,278 additions and 2,003 deletions.
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/debian
{
"name": "Conda",
"image": "mcr.microsoft.com/vscode/devcontainers/base:0-bullseye",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",

// Setup conda environment
"onCreateCommand": ".devcontainer/onCreate-conda.sh",

// Install additional features.
"features": {
// For config options, see https://github.com/devcontainers/features/tree/main/src/conda
"ghcr.io/devcontainers/features/conda": {
"version": "latest",
"addCondaForge": "true"
}
},
"customizations": {
"vscode": {
"extensions": [
"guyskk.language-cython",
"ms-python.isort",
"ms-toolsai.jupyter",
"ms-python.vscode-pylance",
"ms-python.pylint",
"ms-python.python",
"lextudio.restructuredtext",
"trond-snekvik.simple-rst"
]
}
}
}
14 changes: 14 additions & 0 deletions .devcontainer/onCreate-conda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Do not keep running on errors
set -e

# Create conda environment
./bootstrap-conda
conda install mamba -n base -c conda-forge -y
mamba env create --file src/environment-dev.yml || mamba env update --file src/environment-dev.yml
conda init bash

# Build sage
conda run -n sage-dev ./bootstrap
conda run -n sage-dev ./configure --with-python=/opt/conda/envs/sage-dev/bin/python --prefix=/opt/conda/envs/sage-dev
conda run -n sage-dev pip install --no-build-isolation -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup
conda run -n sage-dev pip install --no-build-isolation -v -v -e ./src
4 changes: 2 additions & 2 deletions .devcontainer/portability-updateContent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
# The script assumes that it is run from SAGE_ROOT.
#
# If "config.log" or "logs" are symlinks (for example, created by 'tox -e local-...',
# or after https://trac.sagemath.org/ticket/33262), they might point outside of
# or after https://github.com/sagemath/sage/issues/33262), they might point outside of
# the dev container, so remove them. Likewise for upstream.
for f in config.log logs upstream; do
if [ -L $f ]; then
rm -f $f
fi
done
# If possible (ensured after https://trac.sagemath.org/ticket/33262), keep the
# If possible (ensured after https://github.com/sagemath/sage/issues/33262), keep the
# logs in the container.
if [ ! -d logs ]; then
ln -s /sage/logs logs
Expand Down
Loading

0 comments on commit cb2c82a

Please sign in to comment.