Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def self.submission_options
# for the selection dropdown
def self.grouped_submission_options
current = ["c++", "c", "python", "csharp", "java", "javascript", "haskell", "ruby", "j"] # language group identifiers, order is preserved
other = ["c++14", "c99", "pypy3"] # language identifiers, ordered by language name
other = ["c++14", "c99", "pypy3.11"] # language identifiers, ordered by language name
current_langs = LanguageGroup.where(identifier: current).preload(:current_language).map(&:current_language)
current_options = current_langs.sort_by { |lang| current.index(lang.group.identifier) }.map { |lang| [lang.name, lang.id] }
other_options = Language.where(identifier: other).order(:name).pluck(:name, :id)
Expand Down
8 changes: 7 additions & 1 deletion db/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ python:
lexer: python
compiled: no
interpreted: yes
current: python3.8
current: python3.14
extension: .py
source_filename: program
processes: 1
Expand All @@ -113,9 +113,15 @@ python:
python3.8:
name: "Python 3.8"
interpreter: /usr/bin/python3.8
python3.14:
name: "Python 3.14"
interpreter: /usr/bin/python3.14
pypy3:
name: "Python 3.6 (PyPy 7.3)"
interpreter: /usr/bin/pypy3
pypy3.11:
name: "Python 3.11 (PyPy)"
interpreter: /usr/bin/pypy3.11

ruby:
name: Ruby
Expand Down
50 changes: 50 additions & 0 deletions script/install/debootstrap.bash
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,61 @@ chroot "$ISOLATE_ROOT" apt-get install ruby # Ruby (ruby)
chroot "$ISOLATE_ROOT" apt-get install python3.8 # Python 3.8
# note: when updating these Python versions, also update the check for adding the PPA above

# Compile Python 3.14-prerelease from source
echo "Downloading Python 3.14.0b4 source"
wget https://www.python.org/ftp/python/3.14.0/Python-3.14.0b4.tgz
echo "Extracting Python 3.14.0b4"
tar -xzf Python-3.14.0b4.tgz
rm Python-3.14.0b4.tgz

echo "Configuring Python 3.14 build"
cd Python-3.14.0b4
./configure --enable-optimizations --prefix=$(pwd)/build

echo "Building Python 3.14"
make -j$(nproc)

echo "Installing Python 3.14 to build directory"
make install

echo "Creating target directory in chroot"
mkdir -p "$ISOLATE_ROOT/opt/python/3.14"

echo "Copying Python 3.14 build to chroot"
cp -r build/* "$ISOLATE_ROOT/opt/python/3.14/"

echo "Creating symlink in chroot"
chroot "$ISOLATE_ROOT" ln -sf /opt/python/3.14/bin/python3.14 /usr/bin/python3.14

echo "Cleaning up Python 3.14 build directory"
cd ..
rm -rf Python-3.14.0b4


# PyPy
# https://www.pypy.org
echo "$chroot_install pypy3"
chroot "$ISOLATE_ROOT" apt-get install pypy3

# Detect architecture
ARCH=$(uname -m)

# Determine URL based on architecture
if [[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then
URL="https://downloads.python.org/pypy/pypy3.11-v7.3.20-aarch64.tar.bz2"
FILE="pypy3.11-v7.3.20-aarch64.tar.bz2"
else
URL="https://downloads.python.org/pypy/pypy3.11-v7.3.20-linux64.tar.bz2"
FILE="pypy3.11-v7.3.20-linux64.tar.bz2"
fi

echo "Installing PyPy 3.11 for $ARCH"
wget -O $FILE $URL
mkdir -p $ISOLATE_ROOT/opt/pypy/3.11
tar --strip-components=1 -xvf $FILE -C $ISOLATE_ROOT/opt/pypy/3.11
rm $FILE
chroot "$ISOLATE_ROOT" ln -sf /opt/pypy/3.11/bin/pypy3 /usr/bin/pypy3.11


echo "$chroot_install ruby2.2"
chroot "$ISOLATE_ROOT" apt-get install ruby2.2
Expand Down