Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
tox.ini, build/bin/write-dockerfile.sh: Add configuration factor 'llvm'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jul 10, 2021
1 parent 3200b93 commit 8b16cf8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build/bin/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ shopt -s extglob
SAGE_PACKAGE_LIST_ARGS="${2:- --has-file=spkg-configure.m4 :standard:}"
WITH_SYSTEM_SPKG="${3:-yes}"
IGNORE_MISSING_SYSTEM_PACKAGES="${4:-no}"
EXTRA_SAGE_PACKAGES="${5:-_bootstrap}"
#
STRIP_COMMENTS="sed s/#.*//;"
SAGE_ROOT=.
export PATH="$SAGE_ROOT"/build/bin:$PATH
SYSTEM_PACKAGES=
CONFIGURE_ARGS="--enable-option-checking "
for PKG_BASE in $($SAGE_ROOT/sage -package list --has-file=distros/$SYSTEM.txt $SAGE_PACKAGE_LIST_ARGS) _bootstrap; do
for PKG_BASE in $($SAGE_ROOT/sage -package list --has-file=distros/$SYSTEM.txt $SAGE_PACKAGE_LIST_ARGS) $EXTRA_SAGE_PACKAGES; do
PKG_SCRIPTS="$SAGE_ROOT"/build/pkgs/$PKG_BASE
if [ -d $PKG_SCRIPTS ]; then
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/distros/$SYSTEM.txt
Expand Down
12 changes: 9 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ setenv =
maximal: SAGE_PACKAGE_LIST_ARGS=:standard: :optional:
conda-environment: SAGE_PACKAGE_LIST_ARGS=_prereq
# Whether to add the system packages needed for bootstrapping
EXTRA_SAGE_PACKAGES=_bootstrap
nobootstrap: EXTRA_SAGE_PACKAGES=
EXTRA_SAGE_PACKAGES_0=_bootstrap
nobootstrap: EXTRA_SAGE_PACKAGES_0=
# local envs need HOME set, also Docker 19.03 needs HOME
{local,docker}: HOME={envdir}
# for local envs we can guess the package system if it is not provided as a factor
Expand Down Expand Up @@ -447,6 +447,8 @@ setenv =
gcc_9: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-9 CXX=g++-9 FC=gfortran-9
gcc_10: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-10 CXX=g++-10 FC=gfortran-10
gcc_11: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-11 CXX=g++-11 FC=gfortran-11
llvm: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=clang CXX=clang++
llvm: EXTRA_SAGE_PACKAGES_2=llvm
macos-nohomebrew: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC="$CONFIGURED_CC" CXX="$CONFIGURED_CXX" --with-mp=gmp --without-system-mpfr --without-system-readline --without-system-boost --without-system-boost_cropped
macos-nohomebrew: CONFIGURED_CXX=g++ -isysroot {env:MACOS_SDK}
macos-nohomebrew: CONFIGURED_CC=gcc -isysroot {env:MACOS_SDK}
Expand All @@ -468,6 +470,10 @@ setenv =
# Resulting full configuration args, including EXTRA_CONFIGURE_ARGS from the user environment
#
CONFIGURE_ARGS=--enable-experimental-packages --enable-download-from-upstream-url {env:CONFIG_CONFIGURE_ARGS_ROOT:} {env:CONFIG_CONFIGURE_ARGS_1:} {env:CONFIG_CONFIGURE_ARGS_2:} {env:EXTRA_CONFIGURE_ARGS:}
#
# Resulting EXTRA_SAGE_PACKAGES
#
EXTRA_SAGE_PACKAGES={env:EXTRA_SAGE_PACKAGES_0:} {env:EXTRA_SAGE_PACKAGES_1:} {env:EXTRA_SAGE_PACKAGES_2:}

# environment will be skipped if regular expression does not match against the sys.platform string
platform =
Expand Down Expand Up @@ -523,7 +529,7 @@ commands =
local: bash -c 'if [ ! -d prefix -o -L prefix ]; then rm -f prefix; ln -sf {env:PREFIX:{envdir}/local} prefix; fi'

##commands =
docker: bash -c 'build/bin/write-dockerfile.sh {env:SYSTEM} "{env:SAGE_PACKAGE_LIST_ARGS:}" {env:WITH_SYSTEM_SPKG} {env:IGNORE_MISSING_SYSTEM_PACKAGES} > {envdir}/Dockerfile'
docker: bash -c 'build/bin/write-dockerfile.sh {env:SYSTEM} "{env:SAGE_PACKAGE_LIST_ARGS:}" {env:WITH_SYSTEM_SPKG} {env:IGNORE_MISSING_SYSTEM_PACKAGES} "{env:EXTRA_SAGE_PACKAGES}" > {envdir}/Dockerfile'
# From https://hub.docker.com/r/multiarch/ubuntu-core/
# configure binfmt-support on the Docker host (works locally or remotely, i.e: using boot2docker)
docker-{arm64,armhf}: docker run --rm --privileged multiarch/qemu-user-static:register --reset
Expand Down

0 comments on commit 8b16cf8

Please sign in to comment.