Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sage
Path: blob/develop/tox.ini
4052 views
1
# SAGE_ROOT/tox.ini: Environments for testing the Sage distribution
2
#
3
4
# To run a specific environment:
5
#
6
# $ tox -e docker-fedora-31-standard
7
#
8
# This will do a complete build of the Sage distribution in a Docker container, which will take a while.
9
#
10
# To do an incremental build based on the latest build of a beta version on GitHub Actions:
11
#
12
# $ tox -e docker-fedora-31-standard-incremental
13
#
14
# This will download a large (multi-gigabyte) Docker image from GitHub Packages (ghcr.io).
15
#
16
# Specific 'make' targets can be given as additional arguments after "--".
17
# For example, to only run the configuration phase:
18
#
19
# $ tox -e docker-debian-bullseye-standard -- config.status
20
#
21
# To build a single package (and its dependencies):
22
#
23
# $ tox -e docker-manylinux-2_24-i686-standard -- ppl
24
#
25
# It can be useful to run several of the environments in parallel. For example:
26
#
27
# $ tox -p auto -- config.status
28
#
29
# with local squid:
30
#
31
# $ EXTRA_DOCKER_BUILD_ARGS="--build-arg http_proxy=http://host.docker.internal:3128 --build-arg https_proxy=http://host.docker.internal:3128" tox -p auto -- config.status
32
[tox]
33
34
envlist =
35
36
#####
37
##### Sage-the-distribution tests
38
#####
39
40
check_configure,
41
42
#####
43
##### Sage-the-distribution portability tests
44
#####
45
46
# See https://doc.sagemath.org/html/en/developer/portability_testing.html
47
48
### "docker" environments copy sources from the source tree subject to the exclusions in
49
### the file ".dockerignore". This should work out of non-clean source trees, and all
50
### "docker" toxenvs can be run in parallel.
51
52
### Package factors:
53
###
54
### - minimal # Install a minimal set of system packages that supports bootstrapping and compiling Sage.
55
### - standard # Install all known system packages equivalent to standard packages that have spkg-configure.m4
56
### - maximal # Install all known system packages equivalent to standard/optional packages that have spkg-configure.m4
57
58
docker-ubuntu-trusty-toolchain-gcc_9-minimal,
59
docker-debian-bullseye-standard,
60
docker-fedora-34-standard,
61
docker-archlinux-latest-maximal,
62
docker-manylinux-2_24-i686-standard,
63
docker-conda-forge-standard,
64
65
### "local" targets should be run from a source tree that is freshly checked out
66
### (for example, by 'git worktree add ...') or has been cleaned by 'make bdist-clean' --
67
### because they build within the source tree (because we have no VPATH support).
68
### Only one "local" target can be run at a time.
69
### However, "local" targets install in a separate prefix (SAGE_LOCAL=.tox/TOXENV/local)
70
### rather than "local/" and also place log files into .tox/TOXENV/log, where TOXENV
71
### is the name of the environment. (The prefix can be configured by passing the
72
### environment variable PREFIX.)
73
#
74
# The "local-homebrew" toxenvs create an "isolated" homebrew installation (not in /usr/local).
75
# (However, many configure scripts still look for stuff in /usr/local.)
76
#
77
# By default, it runs "make build" (after bootstrapping and configuring)
78
# with SAGE_CHECK=yes and SAGE_CHECK_PACKAGES set to a good default,
79
# and V=0 so that screen output is limited.
80
#
81
# $ tox -e local-homebrew-macos-standard
82
#
83
# The value of MAKE is picked up from the environment, so you can do:
84
#
85
# $ MAKE="make -j8" tox -e local-homebrew-macos-standard
86
#
87
# Build targets can be passed as positional arguments (separated from tox options by "--"):
88
#
89
# $ tox -e local-homebrew-macos-standard -- ppl
90
# $ tox -e local-homebrew-macos-standard -- build ptest
91
#
92
# Also make variables can be passed as positional arguments; for example, to run the
93
# test suite:
94
#
95
# $ tox -e local-homebrew-macos-standard -- SAGE_CHECK=no build ptest SAGE_NUM_THREADS=4
96
#
97
# Or to rebuild a package with verbose output:
98
#
99
# $ tox -e local-homebrew-macos-standard -- ppl-uninstall ppl V=1
100
#
101
# The variant "local-homebrew-macos-usrlocal" uses the global installation in /usr/local
102
# instead. It may install packages or update packages. It will not remove packages.
103
# Use at your own risk.
104
#
105
106
###
107
### The "local-direct" toxenv passes the whole environment on to the sage build.
108
### Whatever is in PATH etc. will be used.
109
###
110
#
111
# $ tox -e local-direct -- openblas
112
113
114
#####
115
##### Delegation to src/tox.ini
116
#####
117
118
# included with (cd src && tox -p auto):
119
#
120
# doctest,
121
# coverage,
122
# startuptime,
123
# pycodestyle-minimal,
124
# relint,
125
# codespell,
126
#
127
# Also available:
128
#
129
# pycodestyle
130
131
requires =
132
# For repaired numerical factors in tox 4, need >= 4.2.7.
133
# Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1
134
tox>=4.2.7
135
tox<4.14.1
136
137
skipsdist = true
138
139
[testenv]
140
passenv =
141
EXTRA_CONFIGURE_ARGS
142
EXTRA_SAGE_PACKAGES
143
TARGETS_PRE
144
TARGETS_OPTIONAL
145
docker: EXTRA_DOCKER_BUILD_ARGS
146
docker: EXTRA_DOCKER_TAGS
147
docker: DOCKER_TAG
148
# Use DOCKER_BUILDKIT=0 for legacy builder
149
docker: DOCKER_BUILDKIT
150
docker: BUILDKIT_INLINE_CACHE
151
docker: DOCKER_HOST
152
# On macOS, the docker CLI may need $HOME to find the socket
153
# $HOME/Library/Containers/com.docker.docker/Data/docker-cli.sock
154
# Otherwise may get the error "Cannot connect to the Docker daemon at
155
# unix:///var/run/docker.sock. Is the docker daemon running?"
156
docker: HOME
157
# Set for example to "with-system-packages configured with-targets-pre with-targets"
158
# to tag intermediate images.
159
docker: DOCKER_TARGETS
160
# If set, we use this prefix and push to it
161
docker: DOCKER_PUSH_REPOSITORY
162
# If set, we symlink this file into {envdir}/.docker/; this can be used for providing credentials for pushing
163
docker: DOCKER_CONFIG_FILE
164
docker-incremental: FROM_DOCKER_REPOSITORY
165
docker-incremental: FROM_DOCKER_TARGET
166
docker-incremental: FROM_DOCKER_TAG
167
local: MAKE
168
local: PREFIX
169
local: SAGE_NUM_THREADS
170
# Set to 1 to skip preliminary install phases before make is invoked
171
local: SKIP_SYSTEM_PKG_INSTALL
172
local: SKIP_BOOTSTRAP
173
local: SKIP_CONFIGURE
174
local: OPENBLAS_CONFIGURE
175
local-direct: *
176
GITHUB_ACTIONS
177
178
setenv =
179
# By default, we bootstrap using autotools and do not allow downloads of the configure tarball.
180
BOOTSTRAP=./bootstrap
181
# For https downloads from upstream_url listed in checksums.ini, do not
182
# check certificates, to avoid problems on Docker images with outdated
183
# certificates and with system python3 on macOS (#29418)
184
SAGE_DOWNLOAD_FILE_OPTIONS=--no-check-certificate
185
# Set this to 'force' instead of 'yes' to make it an error if an spkg with spkg-configure and system package
186
# is not recognized.
187
WITH_SYSTEM_SPKG=yes
188
# Set this to 'yes' instead of 'no' to ignore missing system packages - by installing them one by one
189
# and ignoring errors. We use that to take care of old versions of distributions.
190
# For -maximal environments, the default is 'yes' but later we override it for rolling distributions
191
# (but not for unstable distributions that often have intermittent issues).
192
IGNORE_MISSING_SYSTEM_PACKAGES=no
193
maximal: IGNORE_MISSING_SYSTEM_PACKAGES=yes
194
# What system packages should be installed. Default: All standard packages with spkg-configure.
195
SAGE_PACKAGE_LIST_ARGS=--has-file=spkg-configure.m4 :standard:
196
recommended: EXTRA_SAGE_PACKAGES_3=_recommended $(head -n 1 build/pkgs/_recommended/dependencies)
197
incremental: EXTRA_SAGE_PACKAGES_4=git
198
develop: EXTRA_SAGE_PACKAGES_4=_develop $(head -n 1 build/pkgs/_develop/dependencies)
199
minimal: SAGE_PACKAGE_LIST_ARGS=_prereq
200
maximal: SAGE_PACKAGE_LIST_ARGS=:standard: :optional:
201
sitepackages: ENABLE_SYSTEM_SITE_PACKAGES=yes
202
sitepackages: CONFIG_CONFIGURE_ARGS_SITEPACKAGES=--enable-system-site-packages
203
conda-environment: SAGE_PACKAGE_LIST_ARGS=_prereq
204
conda-environment-{src,dev}: CONFIG_CONFIGURE_ARGS_SITEPACKAGES=--enable-system-site-packages
205
# Whether to add the system packages needed for bootstrapping
206
EXTRA_SAGE_PACKAGES_0=_bootstrap
207
nobootstrap: EXTRA_SAGE_PACKAGES_0=
208
# local envs need HOME set
209
local: HOME={envdir}
210
# for local envs we can guess the package system if it is not provided as a factor
211
local: SYSTEM=auto
212
#
213
# default tag is "latest"
214
#
215
docker: BASE_TAG=latest
216
#
217
# https://hub.docker.com/_/ubuntu?tab=description
218
# as of 2024-02, latest=jammy=22.04, rolling=mantic=23.10, devel=noble=24.04
219
# ubuntu-focal does not have libgap-dev
220
# ubuntu-noble does not have libbrial-dev
221
#
222
ubuntu: SYSTEM=debian
223
ubuntu: BASE_IMAGE=ubuntu
224
ubuntu-toolchain: EXTRA_REPOSITORY_1=ppa:ubuntu-toolchain-r/test
225
ubuntu-toolchain-trusty: EXTRA_SYSTEM_PACKAGES=binutils-2.26
226
ubuntu-toolchain-trusty: EXTRA_PATH=/usr/lib/binutils-2.26/bin
227
ubuntu-deadsnakes: EXTRA_REPOSITORY_2=ppa:deadsnakes/ppa
228
ubuntu: EXTRA_REPOSITORIES={env:EXTRA_REPOSITORY_1:} {env:EXTRA_REPOSITORY_2:}
229
ubuntu-trusty: BASE_TAG=trusty
230
ubuntu-trusty: IGNORE_MISSING_SYSTEM_PACKAGES=yes
231
ubuntu-xenial: BASE_TAG=xenial
232
ubuntu-xenial: IGNORE_MISSING_SYSTEM_PACKAGES=yes
233
ubuntu-bionic: BASE_TAG=bionic
234
ubuntu-bionic: IGNORE_MISSING_SYSTEM_PACKAGES=yes
235
ubuntu-focal: BASE_TAG=focal
236
ubuntu-focal: IGNORE_MISSING_SYSTEM_PACKAGES=yes
237
ubuntu-jammy: BASE_TAG=jammy
238
ubuntu-lunar: BASE_TAG=lunar
239
ubuntu-mantic: BASE_TAG=mantic
240
ubuntu-noble: BASE_TAG=noble
241
ubuntu-noble: IGNORE_MISSING_SYSTEM_PACKAGES=yes
242
#
243
# https://hub.docker.com/_/debian
244
# debian-buster does not have libfreetype-dev (it only has libfreetype6-dev)
245
# debian-bullseye does not have libgiac-dev
246
# debian-trixie does not have libbrial-dev
247
#
248
debian: SYSTEM=debian
249
debian: BASE_IMAGE=debian
250
debian-jessie: BASE_TAG=jessie
251
debian-jessie: IGNORE_MISSING_SYSTEM_PACKAGES=yes
252
debian-stretch: BASE_TAG=stretch
253
debian-stretch: IGNORE_MISSING_SYSTEM_PACKAGES=yes
254
debian-buster: BASE_TAG=buster
255
debian-buster: IGNORE_MISSING_SYSTEM_PACKAGES=yes
256
debian-bullseye: BASE_TAG=bullseye
257
debian-bullseye: IGNORE_MISSING_SYSTEM_PACKAGES=yes
258
debian-bookworm: BASE_TAG=bookworm
259
debian-trixie: BASE_TAG=trixie
260
debian-trixie: IGNORE_MISSING_SYSTEM_PACKAGES=yes
261
debian-sid: BASE_TAG=sid
262
#
263
# https://hub.docker.com/u/linuxmintd
264
#
265
linuxmint: SYSTEM=debian
266
linuxmint: IGNORE_MISSING_SYSTEM_PACKAGES=yes
267
linuxmint-17: BASE_IMAGE=linuxmintd/mint17
268
linuxmint-18: BASE_IMAGE=linuxmintd/mint18
269
linuxmint-19: BASE_IMAGE=linuxmintd/mint19
270
linuxmint-19.1: BASE_IMAGE=linuxmintd/mint19.1
271
linuxmint-19.2: BASE_IMAGE=linuxmintd/mint19.2
272
linuxmint-19.3: BASE_IMAGE=linuxmintd/mint19.3
273
linuxmint-20: BASE_IMAGE=linuxmintd/mint20
274
linuxmint-20.1: BASE_IMAGE=linuxmintd/mint20.1
275
linuxmint-20.2: BASE_IMAGE=linuxmintd/mint20.2
276
linuxmint-20.3: BASE_IMAGE=linuxmintd/mint20.3
277
linuxmint-21: BASE_IMAGE=linuxmintd/mint21
278
linuxmint-21.1: BASE_IMAGE=linuxmintd/mint21.1
279
linuxmint-21.2: BASE_IMAGE=linuxmintd/mint21.2
280
linuxmint-21.3: BASE_IMAGE=linuxmintd/mint21.3
281
#
282
# https://hub.docker.com/_/fedora
283
# as of 2024-08, latest=40, rawhide=41
284
fedora: SYSTEM=fedora
285
fedora: BASE_IMAGE=fedora
286
fedora: IGNORE_MISSING_SYSTEM_PACKAGES=yes
287
fedora-26: BASE_TAG=26
288
fedora-27: BASE_TAG=27
289
fedora-28: BASE_TAG=28
290
fedora-29: BASE_TAG=29
291
fedora-30: BASE_TAG=30
292
fedora-31: BASE_TAG=31
293
fedora-32: BASE_TAG=32
294
fedora-33: BASE_TAG=33
295
fedora-34: BASE_TAG=34
296
fedora-35: BASE_TAG=35
297
fedora-36: BASE_TAG=36
298
fedora-37: BASE_TAG=37
299
fedora-38: BASE_TAG=38
300
fedora-39: BASE_TAG=39
301
fedora-40: BASE_TAG=40
302
fedora-41: BASE_TAG=41
303
#
304
# https://hub.docker.com/r/scientificlinux/sl
305
#
306
scientificlinux: SYSTEM=fedora
307
scientificlinux: BASE_IMAGE=scientificlinux/sl
308
scientificlinux: IGNORE_MISSING_SYSTEM_PACKAGES=yes
309
scientificlinux-6: BASE_TAG=6
310
scientificlinux-7: BASE_TAG=7
311
#
312
# https://hub.docker.com/_/centos
313
# https://quay.io/repository/centos/centos?tab=tags
314
#
315
centos: SYSTEM=fedora
316
centos: BASE_IMAGE=centos
317
centos: IGNORE_MISSING_SYSTEM_PACKAGES=yes
318
centos-7: BASE_TAG=centos7
319
centos-7: BOOTSTRAP=sed -i.bak s/https/http/ .upstream.d/*mirror_list; ./bootstrap
320
centos-stream: BASE_IMAGE=quay.io/centos/centos
321
centos-stream: BASE_TAG=stream
322
centos-stream-8: BASE_TAG=stream8
323
centos-stream-9: BASE_TAG=stream9
324
#
325
# https://hub.docker.com/_/almalinux
326
#
327
almalinux: SYSTEM=fedora
328
almalinux: BASE_IMAGE=almalinux
329
almalinux: IGNORE_MISSING_SYSTEM_PACKAGES=yes
330
almalinux-8: BASE_TAG=8
331
almalinux-9: BASE_TAG=9
332
#
333
# https://hub.docker.com/r/sheerluck/sage-on-gentoo-stage4/tags
334
#
335
gentoo: SYSTEM=gentoo
336
gentoo: BASE_IMAGE=sheerluck/sage-on-gentoo-stage4
337
gentoo-python3.10: BASE_TAG=latest-py10
338
gentoo-python3.11: BASE_TAG=latest-py11
339
gentoo-python3.12: BASE_TAG=latest-py12
340
gentoo: IGNORE_MISSING_SYSTEM_PACKAGES=no
341
#
342
# https://hub.docker.com/_/archlinux/
343
# 2023-09: libgiac went missing, hence IGNORE_MISSING_SYSTEM_PACKAGES=yes
344
#
345
archlinux: SYSTEM=arch
346
archlinux: BASE_IMAGE=archlinux
347
archlinux: IGNORE_MISSING_SYSTEM_PACKAGES=yes
348
#
349
# https://hub.docker.com/r/vbatts/slackware
350
#
351
slackware: SYSTEM=slackware
352
slackware: BASE_IMAGE=vbatts/slackware
353
slackware-14.2: BASE_TAG=14.2
354
slackware-15.0: BASE_TAG=15.0
355
slackware-current: BASE_TAG=current
356
slackware: IGNORE_MISSING_SYSTEM_PACKAGES=no
357
#
358
# https://github.com/orgs/void-linux/packages?repo_name=void-containers
359
#
360
voidlinux: SYSTEM=void
361
voidlinux: BASE_IMAGE=ghcr.io/void-linux/void-glibc-full
362
voidlinux-musl: BASE_IMAGE=ghcr.io/void-linux/void-musl-full
363
voidlinux-minimal: BASE_IMAGE=ghcr.io/void-linux/void-glibc
364
voidlinux-musl-minimal: BASE_IMAGE=ghcr.io/void-linux/void-musl
365
voidlinux: IGNORE_MISSING_SYSTEM_PACKAGES=no
366
#
367
# https://hub.docker.com/_/alpine/
368
#
369
alpine: SYSTEM=alpine
370
alpine: BASE_IMAGE=alpine
371
alpine-edge: BASE_TAG=edge
372
alpine: IGNORE_MISSING_SYSTEM_PACKAGES=yes
373
#
374
# https://hub.docker.com/r/continuumio
375
#
376
conda: SYSTEM=conda
377
conda: USE_CONDARC=/dev/null
378
conda-forge: BASE_IMAGE=continuumio/miniconda3
379
conda-forge: USE_CONDARC=condarc.yml
380
conda-forge: IGNORE_MISSING_SYSTEM_PACKAGES=no
381
conda-anaconda3: BASE_IMAGE=continuumio/anaconda3
382
conda-anaconda3: IGNORE_MISSING_SYSTEM_PACKAGES=yes
383
#
384
# https://hub.docker.com/r/nixos/nix/
385
#
386
nixos: SYSTEM=nix
387
nixos: BASE_IMAGE=nixos/nix
388
#
389
# https://hub.docker.com/r/opensuse/leap
390
# - OpenSUSE Leap 42 was superseded by the Leap 15 series.
391
# - As of 2023-05, latest = 15 = 15.5
392
# https://hub.docker.com/r/opensuse/tumbleweed
393
# - Rolling distribution
394
#
395
opensuse: SYSTEM=opensuse
396
opensuse: BASE_IMAGE=opensuse/leap
397
opensuse: IGNORE_MISSING_SYSTEM_PACKAGES=yes
398
opensuse-42: BASE_TAG=42
399
opensuse-15.0: BASE_TAG=15.0
400
opensuse-15.1: BASE_TAG=15.1
401
opensuse-15.2: BASE_TAG=15.2
402
opensuse-15.3: BASE_TAG=15.3
403
opensuse-15.4: BASE_TAG=15.4
404
opensuse-15.5: BASE_TAG=15.5
405
opensuse-15: BASE_TAG=15
406
opensuse-tumbleweed: BASE_IMAGE=opensuse/tumbleweed
407
opensuse-tumbleweed: IGNORE_MISSING_SYSTEM_PACKAGES=no
408
#
409
# Other architectures:
410
#
411
# Many docker images for another architecture are named the same, in the arch prefix.
412
# All work for Docker on Mac; but only i386 works for Linux Docker.
413
#
414
# According to https://github.com/docker-library/official-images#architectures-other-than-amd64
415
# architectures officially supported by Docker, Inc. for running Docker:
416
# - amd64,arm32v6,arm32v7,arm64v8,
417
# - windows-amd64 # https://hub.docker.com/u/winamd64/
418
# Other architectures built by official images:
419
# (but not officially supported by Docker, Inc.)
420
# - arm32v5,ppc64le,s390x,i386
421
#
422
arm32v5: ARCH_IMAGE_PREFIX=arm32v5/
423
arm32v6: ARCH_IMAGE_PREFIX=arm32v6/
424
arm32v7: ARCH_IMAGE_PREFIX=arm32v7/
425
arm64v8: ARCH_IMAGE_PREFIX=arm64v8/
426
i386: ARCH_IMAGE_PREFIX=i386/
427
ppc64le: ARCH_IMAGE_PREFIX=ppc64le/
428
s390x: ARCH_IMAGE_PREFIX=s390x/
429
#
430
# For Linux Docker, we need to work with known multiarch images.
431
# https://www.ecliptik.com/Cross-Building-and-Running-Multi-Arch-Docker-Images/
432
# (or we would need to change our tests from "docker build" to "docker run")
433
#
434
# https://hub.docker.com/r/multiarch/ubuntu-core:
435
# multiarch/ubuntu-core:arm64-bionic, multiarch/ubuntu-core:armhf-bionic
436
ubuntu-arm64: BASE_IMAGE=ubuntu-core
437
ubuntu-arm64: ARCH_IMAGE_PREFIX=multiarch/
438
ubuntu-arm64: ARCH_TAG_PREFIX=arm64-
439
ubuntu-armhf: BASE_IMAGE=ubuntu-core
440
ubuntu-armhf: ARCH_IMAGE_PREFIX=multiarch/
441
ubuntu-armhf: ARCH_TAG_PREFIX=armhf-
442
#
443
# https://hub.docker.com/u/raspbian
444
#
445
raspbian: SYSTEM=debian
446
raspbian: ARCH_IMAGE_PREFIX=
447
raspbian: IGNORE_MISSING_SYSTEM_PACKAGES=yes
448
raspbian-jessie: BASE_IMAGE=raspbian/jessie
449
raspbian-stretch: BASE_IMAGE=raspbian/stretch
450
# As of 2020-06, there is no raspbian/buster image, so we dist-upgrade from stretch.
451
# https://www.raspberrypi.org/blog/buster-the-new-version-of-raspbian/
452
raspbian-buster: BASE_IMAGE=raspbian/stretch
453
raspbian-buster: DIST_UPGRADE=s/stretch/buster/g
454
#
455
# https://hub.docker.com/u/linuxmintd
456
#
457
linuxmint: ARCH_IMAGE_PREFIX=
458
linuxmint: ARCH_IMAGE_SUFFIX=-amd64
459
linuxmint-i386: ARCH_IMAGE_SUFFIX=-i386
460
#
461
# manylinux.
462
# https://github.com/pypa/manylinux
463
#
464
# There are manylinux-1, manylinux-2010, manylinux-2014, and manylinux_2_24.
465
# manylinux-1 is too old - it only has python2.4, which is not supported by
466
# sage_bootstrap; it will reach its EOL on Jan 1, 2022.
467
# Our default is manylinux-2014.
468
#
469
# Default arch is x86_64. Use -i686 (or our alias -i386) for 32-bit build.
470
# manylinux-2014 and newer support more archs.
471
#
472
manylinux: SYSTEM=fedora
473
manylinux: IGNORE_MISSING_SYSTEM_PACKAGES=yes
474
manylinux: BASE_IMAGE=quay.io/pypa/manylinux2014
475
manylinux-1: BASE_IMAGE=quay.io/pypa/manylinux1
476
manylinux-1: BOOTSTRAP=./bootstrap -D
477
manylinux-2010: BASE_IMAGE=quay.io/pypa/manylinux2010
478
manylinux-2014: BASE_IMAGE=quay.io/pypa/manylinux2014
479
manylinux-2_24: SYSTEM=debian
480
manylinux-2_24: BASE_IMAGE=quay.io/pypa/manylinux_2_24
481
manylinux-2_28: BASE_IMAGE=quay.io/pypa/manylinux_2_28
482
manylinux-{2_24,2_28}: BOOTSTRAP=ACLOCAL_PATH=/usr/share/aclocal ./bootstrap
483
manylinux: ARCH_IMAGE_PREFIX=
484
manylinux: ARCH_IMAGE_SUFFIX=_x86_64
485
manylinux-i686: ARCH_IMAGE_SUFFIX=_i686
486
manylinux-i386: ARCH_IMAGE_SUFFIX=_i686
487
manylinux-aarch64: ARCH_IMAGE_SUFFIX=_aarch64
488
manylinux-ppc64le: ARCH_IMAGE_SUFFIX=_ppc64le
489
manylinux-s390x: ARCH_IMAGE_SUFFIX=_s390x
490
#
491
# https://hub.docker.com/r/nvidia/cuda
492
#
493
ubuntu-nvidia-cuda: BASE_IMAGE=nvidia/cuda
494
centos-nvidia-cuda: BASE_IMAGE=nvidia/cuda
495
nvidia-cuda: ARCH_TAG_PREFIX=11.0-devel-
496
nvidia-cuda-11.0: ARCH_TAG_PREFIX=11.0-devel-
497
ubuntu-focal-nvidia-cuda: BASE_TAG=ubuntu20.04
498
ubuntu-bionic-nvidia-cuda: BASE_TAG=ubuntu18.04
499
ubuntu-xenial-nvidia-cuda: BASE_TAG=ubuntu16.04
500
#
501
# Resulting full image:tag name
502
#
503
docker: FULL_BASE_IMAGE_AND_TAG={env:ARCH_IMAGE_PREFIX:}{env:BASE_IMAGE}{env:ARCH_IMAGE_SUFFIX:}:{env:ARCH_TAG_PREFIX:}{env:BASE_TAG}{env:ARCH_TAG_SUFFIX:}
504
docker-incremental: FULL_BASE_IMAGE_AND_TAG={env:FROM_DOCKER_REPOSITORY:ghcr.io/sagemath/sage/}sage-$(echo {envname} | sed -E "s/(docker-|-incremental|-sitepackages)//g")-{env:FROM_DOCKER_TARGET:with-targets}:{env:FROM_DOCKER_TAG:dev}
505
# Can SKIP_SYSTEM_PKG_INSTALL if the base image already has git
506
docker-incremental-{develop,recommended,maximal}: SKIP_SYSTEM_PKG_INSTALL=yes
507
docker-incremental-sitepackages: SKIP_SYSTEM_PKG_INSTALL=no
508
#
509
docker-nobootstrap: BOOTSTRAP=./bootstrap -D
510
docker: CONFIG_CONFIGURE_ARGS_ROOT=--enable-build-as-root
511
###
512
### "local" envs
513
###
514
local: SHARED_CACHE_DIR={toxworkdir}/Caches
515
local: SETENV=:
516
local: SETENV_CONFIGURE=:
517
local-nobootstrap: BOOTSTRAP=:
518
local-!direct: PATH=/usr/bin:/bin:/usr/sbin:/sbin
519
local-sudo: __SUDO=--sudo
520
local-root: CONFIG_CONFIGURE_ARGS_ROOT=--enable-build-as-root
521
# brew caches downloaded files in ${HOME}/Library/Caches. We share it between different toxenvs.
522
homebrew: SYSTEM=homebrew
523
local-homebrew: HOMEBREW={envdir}/homebrew
524
# /opt/homebrew is the default install location on arm64 macOS
525
local-homebrew-opthomebrew: HOMEBREW=/opt/homebrew
526
# /usr/local is the default install location on x86_64 macOS
527
local-{homebrew-usrlocal,nohomebrew}: HOMEBREW=/usr/local
528
# local-macos-nohomebrew: "best effort" isolation to avoid using a homebrew installation in /usr/local
529
# We use liblzma from the macOS system - which is available but its headers are not (neither is the xz executable).
530
# So we use /usr/local/opt/xz/{bin,include} (but not lib!).
531
# This ensures that /usr/bin/python3 is accepted by configure - this is needed until #30948 is done.
532
local-macos-nohomebrew: PATH={env:HOMEBREW}/opt/xz/bin:{env:HOMEBREW}/opt/gpatch/bin:{env:HOMEBREW}/opt/cmake/bin:/usr/bin:/bin:/usr/sbin:/sbin
533
local-macos-nohomebrew: CPATH={env:HOMEBREW}/opt/xz/include
534
local-homebrew: PATH={env:HOMEBREW}/bin:/usr/bin:/bin:/usr/sbin:/sbin
535
local-{homebrew-nokegonly,nohomebrew}: BOOTSTRAP=ACLOCAL_PATH="$HOMEBREW/opt/gettext/share/aclocal:$ACLOCAL_PATH" PATH="$HOMEBREW/opt/gettext/bin/:$HOMEBREW/bin:$PATH" ./bootstrap
536
local-homebrew-!nokegonly: SETENV=. .homebrew-build-env
537
local-homebrew: IGNORE_MISSING_SYSTEM_PACKAGES=no
538
# macports
539
macports: SYSTEM=macports
540
local-macports: MP_PREFIX={envdir}/macports
541
local-macports-optlocal: MP_PREFIX=/opt/local
542
local-macports-optlocal: SUDO=sudo
543
local-macports-optlocal: __SUDO=--sudo
544
local-macports: PATH={env:MP_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin
545
local-macports: CPATH={env:MP_PREFIX}/include
546
local-macports: LIBRARY_PATH={env:MP_PREFIX}/lib
547
local-macports: SETENV=eval $(build/bin/sage-print-system-package-command {env:SYSTEM} setup-build-env)
548
# conda
549
local-conda: CONDA_PREFIX={envdir}/conda
550
local-conda: PATH={env:CONDA_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin
551
local-conda: CONDA_PKGS_DIRS={env:SHARED_CACHE_DIR}/conda_pkgs
552
local-conda: CONDA_OS=$(uname | sed 's/^Darwin/MacOSX/;')
553
local-conda: CONDA_ARCH=$(uname -m)
554
local-conda-forge: CONDA_INSTALLER_URL_BASE=https://github.com/conda-forge/miniforge/releases/latest/download/
555
local-conda-forge: CONDA_INSTALLER_FILE=Miniforge3-{env:CONDA_OS}-{env:CONDA_ARCH}.sh
556
local-conda-miniconda: CONDA_INSTALLER_URL_BASE=https://repo.anaconda.com/miniconda/
557
local-conda-miniconda: CONDA_INSTALLER_FILE=Miniconda3-latest-{env:CONDA_OS}-{env:CONDA_ARCH}.sh
558
local-conda: SETENV=. {env:CONDA_PREFIX}/bin/activate base
559
local-conda-environment: CONDA_SAGE_ENVIRONMENT=sage-build
560
local-conda-environment: CONDA_SAGE_ENVIRONMENT_DIR=
561
local-conda-environment-src: CONDA_SAGE_ENVIRONMENT=sage
562
local-conda-environment-src: CONDA_SAGE_ENVIRONMENT_DIR=src/
563
local-conda-environment: CONDA_SAGE_ENVIRONMENT_FILE=environment-{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}.yml
564
local-conda-environment-optional: CONDA_SAGE_ENVIRONMENT_FILE=environment-optional-{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}.yml
565
local-conda-environment-dev: CONDA_SAGE_ENVIRONMENT=sage-dev
566
local-conda-environment-dev: CONDA_SAGE_ENVIRONMENT_DIR=src/
567
local-conda-environment-dev: CONDA_SAGE_ENVIRONMENT_FILE=environment-dev-{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}.yml
568
local-conda-environment: SETENV_CONFIGURE=( {env:CONDA_PREFIX}/bin/conda env create -n {env:CONDA_SAGE_ENVIRONMENT} --file {env:CONDA_SAGE_ENVIRONMENT_DIR:}{env:CONDA_SAGE_ENVIRONMENT_FILE} || {env:CONDA_PREFIX}/bin/conda env update -n {env:CONDA_SAGE_ENVIRONMENT} --file {env:CONDA_SAGE_ENVIRONMENT_DIR:}{env:CONDA_SAGE_ENVIRONMENT_FILE} ) && . {env:CONDA_PREFIX}/bin/activate {env:CONDA_SAGE_ENVIRONMENT}
569
#
570
# Configuration factors
571
#
572
# - python
573
#
574
# Setting "--with-system-python3=yes" explicitly in case we change the configure default
575
# to "--with-system-python3=force" as originally proposed in #32060.
576
#
577
# For all factors that set "--with-system-python3=force",
578
# we add "_bootstrap _prereq liblzma libffi libpng" to EXTRA_SAGE_PACKAGES_5
579
# so that the configured python3 can be accepted by configure.
580
PYTHON_MAJOR=3
581
PYTHON_MINOR=10
582
python3.9: PYTHON_MINOR=9
583
python3.10: PYTHON_MINOR=10
584
python3.11: PYTHON_MINOR=11
585
python3.12: PYTHON_MINOR=12
586
CONFIG_CONFIGURE_ARGS_1=--with-system-python3=yes
587
python3_spkg: CONFIG_CONFIGURE_ARGS_1=--without-system-python3
588
python3.9,python3.10,python3.11,python3.12: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}
589
# As of 2023-9, Xcode 15.0.0, this is Python 3.9.6.
590
macos-python3_xcode: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/usr/bin/python3
591
macos-{python3_xcode,nohomebrew}-{python3.9}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3
592
# Homebrew keg installs
593
homebrew-{python3.9,python3.10,python3.11,python3.12}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python={env:HOMEBREW}/opt/python@{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3
594
# Installers from https://www.python.org/downloads/macos/ (must manually download and install)
595
macos-python3_pythonorg: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/Library/Frameworks/Python.framework/Versions/{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3
596
# MacPorts
597
macports-{python3.8,python3.9,python3.10,python3.11,python3.12}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python={env:MP_PREFIX}/bin/python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}
598
# https://github.com/pypa/manylinux
599
manylinux-standard: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/opt/python/cp{env:PYTHON_MAJOR}{env:PYTHON_MINOR}-cp{env:PYTHON_MAJOR}{env:PYTHON_MINOR}/bin/python3
600
conda: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=python3
601
conda: EXTRA_SAGE_PACKAGES_5=_bootstrap _prereq liblzma libffi libpng
602
python3.9,python3.10,python3.11,python3.12: EXTRA_SAGE_PACKAGES_5=_python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR} _bootstrap _prereq liblzma libffi libpng
603
manylinux-{python3.9,python3.10,python3.11,python3.12}: EXTRA_SAGE_PACKAGES_5=_bootstrap liblzma bzip2 libffi libpng
604
macos-python3_pythonorg: EXTRA_SAGE_PACKAGES_5=_bootstrap _prereq liblzma libffi libpng
605
macos-python3_xcode: EXTRA_SAGE_PACKAGES_5=_bootstrap _prereq liblzma libffi libpng
606
{centos-stream,almalinux}-8-python3.9: EXTRA_SYSTEM_PACKAGES=python39 python39-devel
607
#
608
# - toolchain
609
#
610
gcc_spkg: CONFIG_CONFIGURE_ARGS_2=--without-system-gcc
611
gcc_8: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-8 CXX=g++-8 FC=gfortran-8
612
gcc_8: EXTRA_SAGE_PACKAGES_2=_gcc8
613
gcc_9: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-9 CXX=g++-9 FC=gfortran-9
614
gcc_9: EXTRA_SAGE_PACKAGES_2=_gcc9
615
gcc_10: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-10 CXX=g++-10 FC=gfortran-10
616
gcc_10: EXTRA_SAGE_PACKAGES_2=_gcc10
617
gcc_11: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-11 CXX=g++-11 FC=gfortran-11
618
gcc_11: EXTRA_SAGE_PACKAGES_2=_gcc11
619
gcc_12: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-12 CXX=g++-12 FC=gfortran-12
620
gcc_12: EXTRA_SAGE_PACKAGES_2=_gcc12
621
gcc_13: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-13 CXX=g++-13 FC=gfortran-13
622
gcc_13: EXTRA_SAGE_PACKAGES_2=_gcc13
623
gcc_14: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=gcc-14 CXX=g++-14 FC=gfortran-14
624
gcc_14: EXTRA_SAGE_PACKAGES_2=_gcc14
625
centos-7-devtoolset: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force
626
centos-7-devtoolset-gcc_9: DEVTOOLSET=9
627
centos-7-devtoolset-gcc_10: DEVTOOLSET=10
628
centos-7-devtoolset-gcc_11: DEVTOOLSET=11
629
centos-7-devtoolset-gcc_12: DEVTOOLSET=12
630
llvm: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC=clang CXX=clang++
631
llvm: EXTRA_SAGE_PACKAGES_2=llvm
632
# LLVM is keg-only
633
homebrew-llvm: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC={env:HOMEBREW}/opt/llvm/bin/clang CXX={env:HOMEBREW}/opt/llvm/bin/clang++
634
macos-nohomebrew: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC="$CONFIGURED_CC" CXX="$CONFIGURED_CXX" --without-system-gmp --without-system-mpfr --without-system-readline --without-system-boost_cropped
635
macos-nohomebrew: CONFIGURED_CXX=g++ -isysroot {env:MACOS_SDK}
636
macos-nohomebrew: CONFIGURED_CC=gcc -isysroot {env:MACOS_SDK}
637
# Prevent /usr/local to leak in:
638
# - We use libgd only used in a very limited way, in {matrix,vector}_mod_2_dense. Disable search for other packages.
639
macos-nohomebrew: LIBGD_CONFIGURE=--without-freetype --without-raqm --without-fontconfig --without-jpeg --without-liq --without-xpm --without-tiff --without-webp --without-heif --without-avif
640
macos-nohomebrew: FREETYPE_CONFIGURE=--without-harfbuzz
641
macos-nohomebrew: PILLOW_BUILD_EXT=--disable-platform-guessing --disable-jpeg2000 --disable-imagequant --disable-tiff --disable-lcms --disable-webp --disable-webpmux --disable-xcb
642
macos-nohomebrew: ZLIB_ROOT={env:MACOS_SDK}/usr
643
macports: CONFIG_CONFIGURE_ARGS_2=--with-system-gcc=force CC="$CONFIGURED_CC" CXX="$CONFIGURED_CXX"
644
macports: CONFIGURED_CC=gcc -isysroot {env:MACOS_SDK}
645
macports: CONFIGURED_CXX=g++ -isysroot {env:MACOS_SDK}
646
macports-clang_13: CONFIGURED_CC=clang-mp-13 -isysroot {env:MACOS_SDK}
647
macports-clang_13: CONFIGURED_CXX=clang-mp-13 -isysroot {env:MACOS_SDK}
648
#
649
# macOS SDK/deployment target settings
650
#
651
{macos,macports}: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
652
# python3 from XCode 12 has MACOSX_DEPLOYMENT_TARGET=10.14.6. Selecting a lower target would cause /usr/bin/python3 to be rejected by configure.
653
macos-10.14: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
654
macos-10.14: MACOSX_DEPLOYMENT_TARGET=10.14.6
655
macos-10.15: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
656
macos-10.15: MACOSX_DEPLOYMENT_TARGET=10.15
657
macos-11.1: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
658
macos-11.1: MACOSX_DEPLOYMENT_TARGET=11.1
659
macos-11.3: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk
660
macos-11.3: MACOSX_DEPLOYMENT_TARGET=11.3
661
macos-12.1: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk
662
macos-12.1: MACOSX_DEPLOYMENT_TARGET=12.1
663
macos-12.3: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk
664
macos-12.3: MACOSX_DEPLOYMENT_TARGET=12.3
665
macos-13.3: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk
666
macos-13.3: MACOSX_DEPLOYMENT_TARGET=13.3
667
macos-14.0: MACOS_SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk
668
macos-14.0: MACOSX_DEPLOYMENT_TARGET=14.0
669
# XCode versions, as installed on GH Actions runners
670
# only in https://github.com/actions/runner-images/blob/main/images/macos/macos-11-Readme.md#xcode
671
xcode_11.7: XCODE_VERSION=11.7
672
xcode_12.4: XCODE_VERSION=12.4
673
xcode_12.5.1: XCODE_VERSION=12.5.1
674
xcode_13.0: XCODE_VERSION=13.0
675
# in above and also in https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md#xcode
676
xcode_13.1: XCODE_VERSION=13.1
677
xcode_13.2.1: XCODE_VERSION=13.2.1
678
# only in https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md#xcode
679
xcode_13.3.1: XCODE_VERSION=13.3.1
680
xcode_13.4.1: XCODE_VERSION=13.4.1
681
xcode_14.0.1: XCODE_VERSION=14.0.1
682
# in avove and also in https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode
683
xcode_14.1: XCODE_VERSION=14.1
684
xcode_14.2: XCODE_VERSION=14.2
685
# only in https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode
686
xcode_14.3.1: XCODE_VERSION=14.3.1
687
xcode_15.0: XCODE_VERSION=15.0
688
#
689
# Resulting full configuration args, including EXTRA_CONFIGURE_ARGS from the user environment
690
#
691
CONFIGURE_ARGS=--enable-experimental-packages --enable-download-from-upstream-url {env:CONFIG_CONFIGURE_ARGS_ROOT:} {env:CONFIG_CONFIGURE_ARGS_SITEPACKAGES:} {env:CONFIG_CONFIGURE_ARGS_1:} {env:CONFIG_CONFIGURE_ARGS_2:} {env:EXTRA_CONFIGURE_ARGS:}
692
#
693
# Resulting EXTRA_SAGE_PACKAGES
694
#
695
ALL_EXTRA_SAGE_PACKAGES={env:EXTRA_SAGE_PACKAGES_0:} {env:EXTRA_SAGE_PACKAGES_1:} {env:EXTRA_SAGE_PACKAGES_2:} {env:EXTRA_SAGE_PACKAGES_3:} {env:EXTRA_SAGE_PACKAGES_4:} {env:EXTRA_SAGE_PACKAGES_5:} {env:EXTRA_SAGE_PACKAGES:}
696
697
sitepackages: IGNORE_MISSING_SYSTEM_PACKAGES=yes
698
699
# https://docs.docker.com/engine/reference/commandline/buildx_build/#progress
700
docker: BUILDKIT_PROGRESS=plain
701
702
# environment will be skipped if regular expression does not match against the sys.platform string
703
platform =
704
local-macos: darwin
705
706
allowlist_externals =
707
bash
708
docker: docker
709
homebrew: brew
710
711
#commands_pre =
712
commands =
713
714
#
715
# All "local" environments
716
#
717
local: bash -c 'if [ ! -d {env:HOME}/Library/Caches ]; then mkdir -p {env:SHARED_CACHE_DIR} && mkdir -p {env:HOME}/Library && ln -sf {toxworkdir}/Caches {env:HOME}/Library/; fi'
718
#
719
# local-macos
720
#
721
local-macos: bash -c 'if [ -n "{env:XCODE_VERSION:}" ]; then sudo xcode-select -s /Applications/Xcode_{env:XCODE_VERSION:}.app; fi;'
722
#
723
# local-homebrew
724
#
725
# https://docs.brew.sh/Installation
726
homebrew: bash -c 'if [ ! -x {env:HOMEBREW}/bin/brew ]; then git clone --depth 1 https://github.com/Homebrew/brew {env:HOMEBREW}; fi'
727
homebrew: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) export PATH="build/bin:$PATH" && PACKAGES=$(sage-get-system-packages homebrew $(sage-package list {env:SAGE_PACKAGE_LIST_ARGS}) {env:ALL_EXTRA_SAGE_PACKAGES}); {env:HOMEBREW}/bin/brew install $PACKAGES; {env:HOMEBREW}/bin/brew upgrade $PACKAGES;; esac'
728
#
729
# local-macports
730
#
731
# https://guide.macports.org/#installing.macports.source.multiple
732
local-macports: bash -c 'if [ ! -x "{env:MP_PREFIX}/bin/port" ]; then (mkdir -p {envdir}/macports-src && cd {envdir}/macports-src && curl -L https://distfiles.macports.org/MacPorts/MacPorts-2.7.2.tar.gz | tar xz --strip 1 && ./configure --prefix="{env:MP_PREFIX}" --with-applications-dir=$MP_PREFIX/Applications --with-no-root-privileges --without-startupitems && make && {env:SUDO:} make install); fi'
733
local-macports: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) {env:SUDO:} port selfupdate && {env:SUDO:} port upgrade outdated && PACKAGES=$(build/bin/sage-get-system-packages {env:SYSTEM} $(PATH=build/bin:$PATH build/bin/sage-package list {env:SAGE_PACKAGE_LIST_ARGS}) {env:ALL_EXTRA_SAGE_PACKAGES}); eval $(build/bin/sage-print-system-package-command {env:SYSTEM} {env:__SUDO:} --yes --no-install-recommends install $PACKAGES) || [ "$IGNORE_MISSING_SYSTEM_PACKAGES" = yes ] && echo "(ignoring errors)" ;; esac'
734
#
735
# local-conda
736
#
737
# https://docs.anaconda.com/anaconda/install/silent-mode/
738
# https://docs.anaconda.com/anaconda/user-guide/tasks/shared-pkg-cache/
739
# https://www.anaconda.com/conda-configuration-engine-power-users/
740
local-conda: bash -c 'mkdir -p {env:SHARED_CACHE_DIR}/conda_pkgs {env:CONDA_PREFIX}'
741
local-conda: bash -c 'echo > {env:CONDA_PREFIX}/.condarc "pkgs_dirs:"'
742
local-conda: bash -c 'echo >> {env:CONDA_PREFIX}/.condarc " - {env:SHARED_CACHE_DIR}/conda_pkgs"'
743
local-conda: bash -c 'cat {env:USE_CONDARC} >> {env:CONDA_PREFIX}/.condarc'
744
local-conda: bash -c 'if [ ! -x {env:CONDA_PREFIX}/bin/conda ]; then mkdir {env:CONDA_PREFIX}/conda-meta && curl -L {env:CONDA_INSTALLER_URL_BASE}{env:CONDA_INSTALLER_FILE} -C - -o {env:SHARED_CACHE_DIR}/{env:CONDA_INSTALLER_FILE} && bash {env:SHARED_CACHE_DIR}/{env:CONDA_INSTALLER_FILE} -b -f -p {env:CONDA_PREFIX}; fi'
745
local-conda: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) {env:SETENV} && {env:CONDA_PREFIX}/bin/conda update -n base --yes conda;; esac'
746
local-conda: bash -c 'export PATH="build/bin:$PATH" && PACKAGES=$(sage-get-system-packages conda $(sage-package list {env:SAGE_PACKAGE_LIST_ARGS}) {env:ALL_EXTRA_SAGE_PACKAGES}); {env:SETENV} && {env:CONDA_PREFIX}/bin/conda install --yes --quiet $PACKAGES'
747
#
748
# local-root: Assume we are root, run the system package commands
749
# local-sudo: Use sudo to run the system package commands as root
750
#
751
local-{root,sudo}: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) eval $(build/bin/sage-print-system-package-command {env:SYSTEM} {env:__SUDO:} update) ;; esac'
752
local-{root,sudo}: bash -c 'case "{env:SKIP_SYSTEM_PKG_INSTALL:}" in 1|y*|Y*);; *) export PATH="build/bin:$PATH" && eval $(sage-print-system-package-command {env:SYSTEM} {env:__SUDO:} --yes --no-install-recommends --spkg install $(sage-package list {env:SAGE_PACKAGE_LIST_ARGS}) {env:ALL_EXTRA_SAGE_PACKAGES}) || [ "$IGNORE_MISSING_SYSTEM_PACKAGES" = yes ] && echo "(ignoring errors)" ;; esac'
753
#
754
# All "local" environments
755
#
756
# Install symbolic links "config.log" and "logs" in SAGE_ROOT so that log files are written into the tox log directory.
757
local: bash -c 'touch {envlogdir}/config.log; ln -sf {envlogdir}/config.log .; if [ ! -d logs -o -L logs ]; then rm -f logs; ln -sf {envlogdir} logs; fi'
758
# Install a symbolic link "prefix" in SAGE_ROOT for convenient inspection; it is not used in the build.
759
local: bash -c 'if [ ! -d prefix -o -L prefix ]; then rm -f prefix; ln -sf {env:PREFIX:{envdir}/local} prefix; fi'
760
761
##commands =
762
docker: bash -c 'BUILD_TAG={env:DOCKER_TAG:$(git describe --dirty --always)} .github/workflows/write-dockerfile.sh {env:SYSTEM} "{env:SAGE_PACKAGE_LIST_ARGS:}" {env:WITH_SYSTEM_SPKG} {env:IGNORE_MISSING_SYSTEM_PACKAGES} "{env:ALL_EXTRA_SAGE_PACKAGES}" > {envdir}/Dockerfile'
763
# From https://hub.docker.com/r/multiarch/ubuntu-core/
764
# configure binfmt-support on the Docker host (works locally or remotely, i.e: using boot2docker)
765
docker-{arm64,armhf}: docker run --rm --privileged multiarch/qemu-user-static:register --reset
766
docker: bash -c 'if [ x"{env:DOCKER_CONFIG_FILE:}" != x ]; then mkdir -p {envdir}/.docker && ln -sf $(realpath "{env:DOCKER_CONFIG_FILE:}") {envdir}/.docker/; fi'
767
docker: bash -c 'for docker_target in {env:DOCKER_TARGETS:with-targets}; do \
768
docker: BUILD_IMAGE_STEM=sage-$(echo {envname} | sed "s/docker-//;s/-incremental//"); \
769
docker: BUILD_IMAGE=$DOCKER_PUSH_REPOSITORY$BUILD_IMAGE_STEM-$docker_target; \
770
docker: BUILD_TAG={env:DOCKER_TAG:$(git describe --dirty --always)}; \
771
docker: TAG_ARGS=$(for tag in $BUILD_TAG {env:EXTRA_DOCKER_TAGS:}; do echo --tag $BUILD_IMAGE:$tag; done); \
772
docker: DOCKER_BUILDKIT={env:DOCKER_BUILDKIT:1}; \
773
docker: docker build . -f {envdir}/Dockerfile \
774
docker: --target $docker_target \
775
docker: $TAG_ARGS \
776
docker: --build-arg TARGETS_PRE="$(if test -n "$TARGETS_PRE"; then echo $TARGETS_PRE; else echo {posargs:all-sage-local}; fi)" \
777
docker: --build-arg TARGETS="{posargs:build}" \
778
docker: --build-arg TARGETS_OPTIONAL="{env:TARGETS_OPTIONAL:ptest}" \
779
docker: {env:EXTRA_DOCKER_BUILD_ARGS:}; status=$?; \
780
docker: unset CONTAINER; \
781
docker: if [ $status != 0 ]; then \
782
docker: if [ $DOCKER_BUILDKIT = 0 ]; then \
783
docker: BUILD_TAG="$BUILD_TAG-failed"; CONTAINER=$(docker ps -l -q); docker commit $CONTAINER $BUILD_IMAGE:$BUILD_TAG; \
784
docker: else \
785
docker: unset BUILD_TAG; echo "DOCKER_BUILDKIT=1, so we cannot commit and tag the failed image"; \
786
docker: fi; \
787
docker: fi; \
788
docker: if [ -n "$BUILD_TAG" ]; then \
789
docker: echo "Copying logs from the container to {envdir}/sage/"; \
790
docker: rm -f {envdir}/sage/STATUS; \
791
docker: docker run $BUILD_IMAGE:$BUILD_TAG bash -c " \
792
docker: tar -c --ignore-failed-read -f - \
793
docker: /sage/STATUS /sage/logs /sage/{prefix,venv}/var/lib/sage/installed \
794
docker: ~/.sage/timings2.json /sage/pkgs/*/.tox/*/.sage/timings2.json \
795
docker: /sage/pkgs/*/.tox/*/logs 2> /dev/null" \
796
docker: | (cd {envdir} && tar xf -); \
797
docker: if [ -f {envdir}/sage/STATUS ]; then status=$(cat {envdir}/sage/STATUS); fi; \
798
docker: fi; \
799
docker: unset PUSH_TAGS; \
800
docker: if [ -n "$BUILD_TAG" ]; then \
801
docker: if [ $status != 0 ]; then \
802
docker: BUILD_TAG="${BUILD_TAG%-failed}-failed"; PUSH_TAGS=$BUILD_IMAGE:$BUILD_TAG; \
803
docker: else \
804
docker: PUSH_TAGS=$(echo $BUILD_IMAGE:$BUILD_TAG; for tag in {env:EXTRA_DOCKER_TAGS:}; do echo "$BUILD_IMAGE:$tag"; done); \
805
docker: fi; \
806
docker: echo $BUILD_IMAGE:$BUILD_TAG >> {envdir}/Dockertags; \
807
docker: fi; \
808
docker: if [ x"{env:DOCKER_PUSH_REPOSITORY:}" != x -a x"$PUSH_TAGS" != x ]; then \
809
docker: echo Pushing $PUSH_TAGS; \
810
docker: for tag in $PUSH_TAGS; do \
811
docker: if docker push $tag; then echo $tag >> {envdir}/Dockertags.pushed; else echo "(ignoring errors)"; fi; \
812
docker: done; \
813
docker: fi; \
814
docker: if [ $status != 0 ]; then exit $status; fi; \
815
docker: done'
816
# #28728: gap fails its test suite.
817
# linbox/cysignals testsuites fail. ppl takes very long.
818
local: bash -c 'export PATH={env:PATH} && {env:SETENV} && \
819
local: case "{env:SKIP_BOOTSTRAP:}" in 1|y*|Y*);; *) {env:BOOTSTRAP} ;; esac && \
820
local: {env:SETENV_CONFIGURE} && \
821
local: case "{env:SKIP_CONFIGURE:}" in 1|y*|Y*);; *) ./configure --prefix={env:PREFIX:{envdir}/local} {env:CONFIGURE_ARGS} ;; esac && \
822
local: case "{posargs:}" in \
823
local: bash) PS1="(tox -e {envname}) \w\$ " bash -i; exit ;; \
824
local: config*) ;; \
825
local: *) make -k V=0 base-toolchain ;; \
826
local: esac && \
827
local: make -k V=0 SAGE_CHECK=warn SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2" {env:TARGETS_PRE:} {posargs:build} && \
828
local: ( [ -z "{env:TARGETS_OPTIONAL:}" ] || make -k V=0 SAGE_CHECK=warn SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2" {env:TARGETS_OPTIONAL:} || echo "(error ignored)" ) '
829
830
[testenv:check_configure]
831
## Test that configure behaves properly
832
allowlist_externals =
833
bash
834
setenv =
835
HOME = {envdir}
836
commands =
837
./bootstrap
838
bash -c 'test -z "$(./configure --quiet 2>&1)" || (echo >&2 Error: "configure --quiet" is not quiet; exit 1)'
839
840
[testenv:update_docker_platforms]
841
description =
842
Update the platforms tested in CI Linux (.github/workflows/docker.yml),
843
create .devcontainer/portability-*/devcontainer.json files for all
844
these platforms, and generate a table with dev container links for
845
the developer guide.
846
passenv =
847
SYSTEM_FACTORS
848
PACKAGE_FACTORS
849
DOCKER_TARGETS
850
FROM_DOCKER_REPOSITORY
851
setenv =
852
#
853
# Master list of platforms tested in CI Linux
854
#
855
DEFAULT_SYSTEM_FACTORS=\
856
ubuntu-{xenial-toolchain-gcc_9,bionic-gcc_8,focal,jammy,lunar,mantic,noble} \
857
debian-{bullseye,bookworm,trixie,sid} \
858
linuxmint-{20.1,20.2,20.3,21,21.1,21.2,21.3} \
859
fedora-{30,31,32,33,34,35,36,37,38,39,40,41} \
860
centos-stream-{9,9-python3.12} \
861
almalinux-{8-python3.9,9-python3.11} \
862
gentoo-python{3.10,3.11,3.12} \
863
archlinux-latest \
864
opensuse-15.5-gcc_11-python3.11 \
865
opensuse-tumbleweed{-python3.10,} \
866
conda-forge-python3.11 \
867
ubuntu-bionic-gcc_8-i386 \
868
debian-bullseye-i386
869
#
870
# Container badges for the developer guide
871
#
872
# color gradient from dimgray to default green of https://github.com/eggplants/ghcr-badge
873
COLOR_with_system_packages = %23696969
874
COLOR_configured = %23696969
875
COLOR_with_targets_pre = %235d8a4c
876
COLOR_with_targets = %2350ab2e
877
COLOR_with_targets_optional = %2344cc11
878
# color gradient from dimgray to blue
879
COLOR_minimal_with_system_packages = %23696969
880
COLOR_minimal_configured = %23696969
881
COLOR_minimal_with_targets_pre = %23677895
882
COLOR_minimal_with_targets = %236686c1
883
COLOR_minimal_with_targets_optional = %236495ed
884
# color gradient from dimgray to purple
885
COLOR_maximal_with_system_packages = %23696969
886
COLOR_maximal_configured = %23696969
887
COLOR_maximal_with_targets_pre = %238f6b8d
888
COLOR_maximal_with_targets = %23b46eb2
889
COLOR_maximal_with_targets_optional = %23da70d6
890
891
commands =
892
bash -c 'DEFAULT_SYSTEM_FACTORS=$(echo {env:DEFAULT_SYSTEM_FACTORS}); \
893
for SYSTEM_FACTOR in {env:SYSTEM_FACTORS:$DEFAULT_SYSTEM_FACTORS}; do \
894
for PACKAGE_FACTOR in {env:PACKAGE_FACTORS:minimal standard}; do \
895
for DOCKER_TARGET in {env:DOCKER_TARGETS:with-targets}; do \
896
DIR=.devcontainer/portability-$SYSTEM_FACTOR-$PACKAGE_FACTOR; \
897
mkdir -p $DIR; \
898
ln -sf ../portability-Dockerfile $DIR/portability-Dockerfile; \
899
sed -e s/@SYSTEM_FACTOR@/$SYSTEM_FACTOR/ \
900
-e s/@PACKAGE_FACTOR@/$PACKAGE_FACTOR/ \
901
-e s/@DOCKER_TARGET@/$DOCKER_TARGET/ \
902
-e s/@DOCKER_TAG@/dev/ .devcontainer/portability-devcontainer.json.in \
903
> $DIR/devcontainer.json; \
904
done; \
905
echo "Wrote $DIR/"; \
906
done; \
907
done'
908
bash -c 'DEFAULT_SYSTEM_FACTORS=$(echo {env:DEFAULT_SYSTEM_FACTORS}); \
909
FILE=.github/workflows/docker.yml; \
910
(sed -n "1,/update_docker_platforms.*below/p" $FILE; \
911
echo " default: >-"; \
912
echo " ["; \
913
for SYSTEM_FACTOR in {env:SYSTEM_FACTORS:$DEFAULT_SYSTEM_FACTORS}; do \
914
echo " \"$SYSTEM_FACTOR\","; \
915
done; \
916
echo " ]"; \
917
sed -n "/update_docker_platforms.*above/,\$p" $FILE) \
918
> $FILE.new; \
919
mv $FILE.new $FILE; \
920
echo "Wrote $FILE"'
921
bash -c 'DEFAULT_SYSTEM_FACTORS=$(echo {env:DEFAULT_SYSTEM_FACTORS}); \
922
FILE=src/doc/en/developer/portability_platform_table.rst; \
923
(for SYSTEM_FACTOR in {env:SYSTEM_FACTORS:$DEFAULT_SYSTEM_FACTORS}; do \
924
for PACKAGE_FACTOR in {env:PACKAGE_FACTORS:minimal standard maximal}; do \
925
REPO="{env:FROM_DOCKER_REPOSITORY:ghcr.io/sagemath/sage/}sage-$SYSTEM_FACTOR-$PACKAGE_FACTOR"; \
926
for DOCKER_TARGET in {env:DOCKER_TARGETS:with-system-packages configured with-targets-pre with-targets with-targets-optional}; do \
927
eval COLOR=\$COLOR_${PACKAGE_FACTOR}_${DOCKER_TARGET//-/_}; \
928
if [ x$COLOR = x ]; then eval COLOR=\$COLOR_${DOCKER_TARGET//-/_}; fi; \
929
case $DOCKER_TARGET in \
930
with-system-packages) BADGE="size?tag=dev&label=$DOCKER_TARGET&color=$COLOR";; \
931
*) BADGE="latest_tag?ignore=latest,dev,*-failed&label=$DOCKER_TARGET&color=$COLOR";; \
932
esac; \
933
echo ".. |image-$SYSTEM_FACTOR-$PACKAGE_FACTOR-$DOCKER_TARGET| image:: https://ghcr-badge.egpl.dev/${REPO\#ghcr.io/}-$DOCKER_TARGET/$BADGE"; \
934
echo " :target: https://$REPO-$DOCKER_TARGET"; \
935
echo ""; \
936
done; \
937
echo ".. |codespace-$SYSTEM_FACTOR-$PACKAGE_FACTOR| image:: https://github.com/codespaces/badge.svg"; \
938
echo " :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-$SYSTEM_FACTOR-$PACKAGE_FACTOR%2Fdevcontainer.json"; \
939
echo ""; \
940
done; \
941
done; \
942
echo ".. list-table::"; \
943
echo " :widths: 50 50 40"; \
944
echo " :header-rows: 1"; \
945
echo " :stub-columns: 0"; \
946
echo ""; \
947
echo " * - Platform"; \
948
echo " - Images"; \
949
echo " - "; \
950
for SYSTEM_FACTOR in {env:SYSTEM_FACTORS:$DEFAULT_SYSTEM_FACTORS}; do \
951
SYSTEM_FACTOR_LABEL="**${SYSTEM_FACTOR/-/**-}"; \
952
for PACKAGE_FACTOR in {env:PACKAGE_FACTORS:minimal standard maximal}; do \
953
case $SYSTEM_FACTOR-$PACKAGE_FACTOR in \
954
conda*-minimal) continue;; \
955
esac; \
956
PACKAGE_FACTOR_LABEL="*$PACKAGE_FACTOR*"; \
957
for ROW_DOCKER_TARGETS in "{env:DOCKER_TARGETS:with-system-packages with-targets-pre with-targets with-targets-optional}"; do \
958
if [ -n "$SYSTEM_FACTOR_LABEL" ]; then \
959
echo " * - $SYSTEM_FACTOR_LABEL "; SYSTEM_FACTOR_LABEL=""; \
960
echo " "; \
961
echo " $PACKAGE_FACTOR_LABEL"; PACKAGE_FACTOR_LABEL=""; \
962
else \
963
echo " * - $PACKAGE_FACTOR_LABEL"; PACKAGE_FACTOR_LABEL=""; \
964
fi; \
965
echo -n " -"; \
966
for DOCKER_TARGET in $ROW_DOCKER_TARGETS; do \
967
echo -n " |image-$SYSTEM_FACTOR-$PACKAGE_FACTOR-$DOCKER_TARGET|"; \
968
case $PACKAGE_FACTOR:$DOCKER_TARGET in maximal:with-targets-pre) break;; esac; \
969
done; \
970
echo ""; \
971
if [ $PACKAGE_FACTOR != maximal ]; then \
972
echo " - |codespace-$SYSTEM_FACTOR-$PACKAGE_FACTOR|"; \
973
else \
974
echo " -"; \
975
fi; \
976
done; \
977
done; \
978
done) > $FILE; \
979
echo "Wrote $FILE"'
980
981
[testenv:update_conda_lock]
982
description =
983
Update the conda-lock files.
984
deps =
985
conda-lock
986
commands =
987
{envpython} .github/workflows/conda-lock-update.py
988
989
###### Delegation to src/tox.ini ######
990
[sage_src]
991
passenv =
992
HOME
993
envdir = {toxworkdir}/src
994
allowlist_externals = tox
995
commands = tox -c {toxinidir}/src/tox.ini -e {envname} -- {posargs}
996
997
[testenv:doctest]
998
description =
999
run the Sage doctester (same as "sage -t")
1000
passenv = {[sage_src]passenv}
1001
envdir = {[sage_src]envdir}
1002
commands = {[sage_src]commands}
1003
allowlist_externals = {[sage_src]allowlist_externals}
1004
1005
[testenv:coverage.py]
1006
description =
1007
run the Sage doctester with Coverage.py
1008
passenv = {[sage_src]passenv}
1009
envdir = {[sage_src]envdir}
1010
commands = {[sage_src]commands}
1011
allowlist_externals = {[sage_src]allowlist_externals}
1012
1013
[testenv:coverage.py-html]
1014
description =
1015
run the Sage doctester with Coverage.py, generate HTML report
1016
passenv = {[sage_src]passenv}
1017
envdir = {[sage_src]envdir}
1018
commands = {[sage_src]commands}
1019
allowlist_externals = {[sage_src]allowlist_externals}
1020
1021
[testenv:coverage.py-xml]
1022
description =
1023
run the Sage doctester with Coverage.py, generate XML report
1024
passenv = {[sage_src]passenv}
1025
envdir = {[sage_src]envdir}
1026
commands = {[sage_src]commands}
1027
allowlist_externals = {[sage_src]allowlist_externals}
1028
1029
[testenv:coverage]
1030
description =
1031
give information about doctest coverage of files (same as "sage --coverage[all]")
1032
passenv = {[sage_src]passenv}
1033
envdir = {[sage_src]envdir}
1034
commands = {[sage_src]commands}
1035
allowlist_externals = {[sage_src]allowlist_externals}
1036
1037
[testenv:startuptime]
1038
description =
1039
display how long each component of Sage takes to start up (same as "sage --startuptime")
1040
passenv = {[sage_src]passenv}
1041
envdir = {[sage_src]envdir}
1042
commands = {[sage_src]commands}
1043
allowlist_externals = {[sage_src]allowlist_externals}
1044
1045
[testenv:pycodestyle]
1046
description =
1047
check against the Python style conventions of PEP8
1048
passenv = {[sage_src]passenv}
1049
envdir = {[sage_src]envdir}
1050
commands = {[sage_src]commands}
1051
allowlist_externals = {[sage_src]allowlist_externals}
1052
1053
[testenv:pycodestyle-minimal]
1054
description =
1055
check against Sage's minimal style conventions
1056
passenv = {[sage_src]passenv}
1057
envdir = {[sage_src]envdir}
1058
commands = {[sage_src]commands}
1059
allowlist_externals = {[sage_src]allowlist_externals}
1060
1061
[testenv:relint]
1062
description =
1063
check whether some forbidden patterns appear
1064
passenv = {[sage_src]passenv}
1065
envdir = {[sage_src]envdir}
1066
commands = {[sage_src]commands}
1067
allowlist_externals = {[sage_src]allowlist_externals}
1068
1069
[testenv:codespell]
1070
description =
1071
check for misspelled words in source code (use -w -i to fix)
1072
passenv = {[sage_src]passenv}
1073
envdir = {[sage_src]envdir}
1074
allowlist_externals = {[sage_src]allowlist_externals}
1075
# Run on the whole project, not just src/ by default, if invoked directly at top level
1076
commands = tox -c {toxinidir}/src/tox.ini -e {envname} -- {posargs:{toxinidir}}
1077
1078
[testenv:pyright]
1079
description =
1080
run the static typing checker pyright
1081
passenv = {[sage_src]passenv}
1082
envdir = {[sage_src]envdir}
1083
commands = {[sage_src]commands}
1084
allowlist_externals = {[sage_src]allowlist_externals}
1085
1086
[testenv:rst]
1087
description =
1088
validate Python docstrings markup as reStructuredText
1089
passenv = {[sage_src]passenv}
1090
envdir = {[sage_src]envdir}
1091
commands = {[sage_src]commands}
1092
allowlist_externals = {[sage_src]allowlist_externals}
1093
1094
[testenv:cython-lint]
1095
description =
1096
check Cython files for code style
1097
passenv = {[sage_src]passenv}
1098
envdir = {[sage_src]envdir}
1099
commands = {[sage_src]commands}
1100
allowlist_externals = {[sage_src]allowlist_externals}
1101
1102
[testenv:ruff]
1103
description =
1104
check against Python style conventions
1105
passenv = {[sage_src]passenv}
1106
# https://github.com/ChartBoost/ruff-action/issues/7#issuecomment-1887780308
1107
RUFF_OUTPUT_FORMAT
1108
envdir = {[sage_src]envdir}
1109
allowlist_externals = {[sage_src]allowlist_externals}
1110
commands = tox -c {toxinidir}/src/tox.ini -e {envname} -- {posargs:src/sage/}
1111
1112
[testenv:ruff-minimal]
1113
description =
1114
check against Sage's minimal style conventions
1115
passenv = {[sage_src]passenv}
1116
# https://github.com/ChartBoost/ruff-action/issues/7#issuecomment-1887780308
1117
RUFF_OUTPUT_FORMAT
1118
envdir = {[sage_src]envdir}
1119
allowlist_externals = {[sage_src]allowlist_externals}
1120
commands = tox -c {toxinidir}/src/tox.ini -e {envname} -- {posargs:src/sage/}
1121
1122