Skip to content

Commit

Permalink
Trac sagemath#34081: Upgrade scipy to 1.9.x, add meson toolchain
Browse files Browse the repository at this point in the history
- https://scipy.github.io/devdocs/release.1.9.0.html (released)
  - scipy.optimize.milp (HiGHS MIP solver)
  - https://scipy.github.io/devdocs/release.1.9.0.html#scipy-switched-
to-meson-as-its-build-system

This ticket is also the target ticket for https://github.com/FFY00
/meson-python/blob/main/.github/workflows/ci-sage.yml

Previous update:
- sagemath#32423 Update numpy to 1.22.x, scipy 1.8.x, networkx 2.8.x

See also:
- sagemath#34110 numpy 1.23.x

URL: https://trac.sagemath.org/34081
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Dima Pasechnik
  • Loading branch information
Release Manager committed Nov 15, 2022
2 parents 8443dc3 + 853a699 commit 5048fd4
Show file tree
Hide file tree
Showing 44 changed files with 196 additions and 68 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
with:
# Build incrementally from previous stage (pre)
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
docker_targets: "with-targets with-targets-optional"
Expand Down Expand Up @@ -82,6 +83,7 @@ jobs:
with:
# Build incrementally from previous stage (pre)
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
docker_targets: "with-targets with-targets-optional"
Expand All @@ -97,6 +99,7 @@ jobs:
needs: [minimal]
uses: ./.github/workflows/docker.yml
with:
free_disk_space: true
# Build from scratch
docker_targets: "with-system-packages configured with-targets-pre"
# FIXME: duplicated from env.TARGETS
Expand All @@ -111,6 +114,7 @@ jobs:
uses: ./.github/workflows/docker.yml
with:
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
tox_packages_factors: >-
Expand All @@ -125,6 +129,7 @@ jobs:
uses: ./.github/workflows/docker.yml
with:
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
tox_packages_factors: >-
Expand All @@ -138,6 +143,7 @@ jobs:
uses: ./.github/workflows/docker.yml
with:
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
tox_packages_factors: >-
Expand All @@ -151,6 +157,7 @@ jobs:
uses: ./.github/workflows/docker.yml
with:
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
tox_packages_factors: >-
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,16 @@ on:
["minimal",
"standard",
]
extra_sage_packages:
description: 'Extra Sage packages to install as system packages'
type: string
default: ""
max_parallel:
type: number
default: 24
free_disk_space:
default: false
type: boolean
#
# Publishing to GitHub Packages
#
Expand Down Expand Up @@ -128,14 +135,14 @@ jobs:
FROM_DOCKER_TARGET: ${{ inputs.from_docker_target }}
FROM_DOCKER_TAG: ${{ inputs.from_docker_tag }}
EXTRA_CONFIGURE_ARGS: --enable-fat-binary

EXTRA_SAGE_PACKAGES: ${{ inputs.extra_sage_packages }}
steps:
- name: Check out SageMath
uses: actions/checkout@v2
with:
repository: ${{ inputs.sage_repo }}
ref: ${{ inputs.sage_ref }}
fetch-depth: 2000
fetch-depth: 10000
- name: fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: free disk space
Expand All @@ -149,6 +156,7 @@ jobs:
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 50
sudo apt-get --fix-broken --yes remove $(dpkg-query -f '${Package}\n' -W | grep -E '^(ghc-|google-cloud-sdk|google-chrome|firefox|mysql-server|dotnet-sdk|hhvm|mono)') || echo "(error ignored)"
df -h
if: inputs.free_disk_space
- name: Check out git-trac-command
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -190,7 +198,7 @@ jobs:
TOKEN="${{ secrets.GITHUB_TOKEN }}"
fi
if echo "$TOKEN" | docker login ghcr.io -u ${{ github.actor }} --password-stdin; then
echo "DOCKER_PUSH_REPOSITORY=${{ inputs.docker_push_repository }}" >> $GITHUB_ENV
echo "DOCKER_PUSH_REPOSITORY=$(echo ${{ inputs.docker_push_repository }} | tr "[:upper:]" "[:lower:]")" >> $GITHUB_ENV
echo "DOCKER_CONFIG_FILE=$HOME/.docker/config.json" >> $GITHUB_ENV
fi
# From the docker documentation via .ci/update-env.sh:
Expand Down
3 changes: 2 additions & 1 deletion build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,9 @@ $(foreach pkgname, $(NORMAL_PACKAGES) $(SCRIPT_PACKAGES),\
#
# Since Python's self-tests seem to fail on all platforms, we disable
# its test suite by default.
# meson_python 0.10.0 fails on some platforms, so we reduce it to warnings.
# However, if SAGE_CHECK=warn, we do not do that.
SAGE_CHECK_PACKAGES_DEFAULT_yes := !python3
SAGE_CHECK_PACKAGES_DEFAULT_yes := !python3,?meson_python
SAGE_CHECK_PACKAGES_DEFAULT_warn :=
SAGE_CHECK_PACKAGES_DEFAULT_no :=
comma := ,
Expand Down
1 change: 1 addition & 0 deletions build/pkgs/git/distros/arch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git
18 changes: 18 additions & 0 deletions build/pkgs/gitpython/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
gitpython: GitPython is a python library used to interact with Git repositories
===============================================================================

Description
-----------

GitPython is a python library used to interact with Git repositories

License
-------

BSD

Upstream Contact
----------------

https://pypi.org/project/GitPython/

4 changes: 4 additions & 0 deletions build/pkgs/gitpython/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(PYTHON) | $(PYTHON_TOOLCHAIN)

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/gitpython/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GitPython
1 change: 1 addition & 0 deletions build/pkgs/gitpython/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
18 changes: 18 additions & 0 deletions build/pkgs/meson/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
meson: A high performance build system
======================================

Description
-----------

A high performance build system

License
-------

Apache License, Version 2.0

Upstream Contact
----------------

https://pypi.org/project/meson/

5 changes: 5 additions & 0 deletions build/pkgs/meson/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=meson-VERSION.tar.gz
sha1=3bce963302f547547c82fda35f84838ebc608e8a
md5=b2f2757b5dd84cc754b9df53ce37a175
cksum=2257545181
upstream_url=https://pypi.io/packages/source/m/meson/meson-VERSION.tar.gz
4 changes: 4 additions & 0 deletions build/pkgs/meson/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(PYTHON) | $(PYTHON_TOOLCHAIN)

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/meson/install-requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
meson
1 change: 1 addition & 0 deletions build/pkgs/meson/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.63.3
2 changes: 2 additions & 0 deletions build/pkgs/meson/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd src
sdh_pip_install .
1 change: 1 addition & 0 deletions build/pkgs/meson/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
standard
16 changes: 16 additions & 0 deletions build/pkgs/meson_python/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
meson_python: Meson Python build backend (PEP 517)
==================================================

Description
-----------

Meson Python build backend (PEP 517)

License
-------

Upstream Contact
----------------

https://pypi.org/project/meson-python/

5 changes: 5 additions & 0 deletions build/pkgs/meson_python/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=meson_python-VERSION.tar.gz
sha1=6ff574d17feb98165a2678c78a429d3ff32aaa7b
md5=afd824bf61e79cd5eeab2a6dc7863eaf
cksum=3939516041
upstream_url=https://pypi.io/packages/source/m/meson_python/meson_python-VERSION.tar.gz
10 changes: 10 additions & 0 deletions build/pkgs/meson_python/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$(PYTHON) meson pyproject_metadata tomli ninja_build patchelf | $(PYTHON_TOOLCHAIN)

----------
All lines of this file are ignored except the first.

meson_python actually declares a dependency on ninja, the Python distribution package.
But it only needs the ninja executable.

buildelf is needed by projects that use meson_python as their build system
for wheel building.
1 change: 1 addition & 0 deletions build/pkgs/meson_python/dependencies_check
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest pytest_mock gitpython cython auditwheel_or_delocate
1 change: 1 addition & 0 deletions build/pkgs/meson_python/install-requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
meson-python
1 change: 1 addition & 0 deletions build/pkgs/meson_python/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.10.0
2 changes: 2 additions & 0 deletions build/pkgs/meson_python/spkg-check.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd src
pytest
2 changes: 2 additions & 0 deletions build/pkgs/meson_python/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd src
sdh_pip_install --no-build-isolation --no-deps .
1 change: 1 addition & 0 deletions build/pkgs/meson_python/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
standard
17 changes: 17 additions & 0 deletions build/pkgs/patchelf/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
patchelf: A small utility to modify the dynamic linker and RPATH of ELF executables
===================================================================================

Description
-----------

A small utility to modify the dynamic linker and RPATH of ELF executables.

License
-------

GPL-3.0-or-later

Upstream Contact
----------------

https://github.com/NixOS/patchelf
5 changes: 5 additions & 0 deletions build/pkgs/patchelf/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=patchelf-VERSION.tar.bz2
sha1=5d9c1690c0fbe70c312f43d597e04b6c1eeffc60
md5=04d243d3626a33201b0d6eef0e2c4317
cksum=92812155
upstream_url=https://github.com/NixOS/patchelf/releases/download/VERSION/patchelf-VERSION.tar.bz2
4 changes: 4 additions & 0 deletions build/pkgs/patchelf/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
| bzip2

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/patchelf/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.13.1
6 changes: 6 additions & 0 deletions build/pkgs/patchelf/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cd src
if [ "$UNAME" = "Linux" ]; then
sdh_configure
sdh_make
sdh_make_install
fi
1 change: 1 addition & 0 deletions build/pkgs/patchelf/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
standard
6 changes: 3 additions & 3 deletions build/pkgs/pyproject_metadata/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=pyproject-metadata-VERSION.tar.gz
sha1=5421824aa29786bde43f510365c4d035a0614ba5
md5=85fcbd5d777809ca2217a996e06fe2e0
cksum=1327227039
sha1=c2b7679b1e56a341aa00c186c0d1a6bbd7bd5c2c
md5=e13b11cb723da96f8397addddca963cc
cksum=2246727402
upstream_url=https://pypi.io/packages/source/p/pyproject_metadata/pyproject-metadata-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/pyproject_metadata/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.0
0.6.1
18 changes: 18 additions & 0 deletions build/pkgs/pytest_mock/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pytest_mock: Thin-wrapper around the mock package for easier use with pytest
============================================================================

Description
-----------

Thin-wrapper around the mock package for easier use with pytest

License
-------

MIT

Upstream Contact
----------------

https://pypi.org/project/pytest-mock/

4 changes: 4 additions & 0 deletions build/pkgs/pytest_mock/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(PYTHON) pytest packaging attrs pluggy tomli py pyparsing | $(PYTHON_TOOLCHAIN)

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/pytest_mock/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest-mock
1 change: 1 addition & 0 deletions build/pkgs/pytest_mock/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
6 changes: 3 additions & 3 deletions build/pkgs/scipy/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=scipy-VERSION.tar.gz
sha1=6dfee9fe5f021409b4d294b0a7d9da05b810d207
md5=df5ce79288fc457238aeef18e8f70dfc
cksum=3909760197
sha1=f93163946802657fcd1c10821a1330497045ef6b
md5=ee6db269d03b2d47d04e876d38515d0d
cksum=3886027417
upstream_url=https://pypi.io/packages/source/s/scipy/scipy-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/scipy/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) $(BLAS) gfortran numpy pybind11 pythran | $(PYTHON_TOOLCHAIN)
$(PYTHON) $(BLAS) gfortran numpy pybind11 cython pythran | $(PYTHON_TOOLCHAIN) meson_python

----------
All lines of this file are ignored except the first.
1 change: 1 addition & 0 deletions build/pkgs/scipy/dependencies_check
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest
2 changes: 1 addition & 1 deletion build/pkgs/scipy/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.1
1.9.2
11 changes: 0 additions & 11 deletions build/pkgs/scipy/patches/boost_math_tools_config.patch

This file was deleted.

1 change: 1 addition & 0 deletions build/pkgs/scipy/spkg-check.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python3 -c 'import scipy; scipy.test()'
Loading

0 comments on commit 5048fd4

Please sign in to comment.