Skip to content
Merged
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 .ci/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ cat <<EOF
FROM with-system-packages AS bootstrapped
#:bootstrapping:
RUN rm -rf /new /sage/.git
$ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap configure.ac sage .homebrew-build-env tox.ini .gitignore /new/
$ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap conftest.py configure_wrapper configure.ac sage .homebrew-build-env tox.ini .gitignore /new/
$ADD config/config.rpath /new/config/config.rpath
$ADD src/doc/bootstrap /new/src/doc/bootstrap
$ADD src/bin /new/src/bin
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ jobs:

- name: Generate Dockerfile
# From docker.yml
# tox -e <environment name> command runs commands in `tox.ini`,
# in particular the script `.ci/write-dockerfile.sh`, to generate `Dockerfile`.
run: |
tox -e ${{ env.TOX_ENV }}
cp .tox/${{ env.TOX_ENV }}/Dockerfile .
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/config.log
/config.status
/configure
/real_configure
/confdefs.h

/m4/sage_spkg_configures.m4
Expand Down
6 changes: 4 additions & 2 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ EOF

st=$?
case $st in
0) true;; # Success
0) # Success
mv configure real_configure
cp configure_wrapper configure;;

179|16|63|127) # no m4 for pkg-config|autotools not installed|or version too old
if [ $DOWNLOAD = yes ]; then
Expand Down Expand Up @@ -220,7 +222,7 @@ save () {
fi
mkdir -p upstream
tar zcf "$NEWCONFBALL" \
configure \
configure real_configure configure_wrapper \
config/install-sh config/compile config/config.guess config/config.sub config/missing \
build/make/Makefile-auto.in \
src/doc/en/installation/*.txt \
Expand Down
8 changes: 3 additions & 5 deletions build/pkgs/meson/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
SAGE_SPKG_CONFIGURE([meson], [dnl
dnl scipy 1.11.2 needs meson >= 1.1.0
dnl contourpy needs meson >= 1.2.0
dnl meson_python needs meson >= 1.2.3 for Python >= 3.12
AC_CACHE_CHECK([for meson >= 1.2.3], [ac_cv_path_MESON], [dnl
dnl scipy 1.15.2 needs meson >= 1.5.0
AC_CACHE_CHECK([for meson >= 1.5.0], [ac_cv_path_MESON], [dnl
dnl Do not accept meson installed in the default user scheme;
dnl it will not work in our venv because we set PYTHONUSERBASE
dnl in sage-env.
WITH_SAGE_PYTHONUSERBASE([dnl
AC_PATH_PROGS_FEATURE_CHECK([MESON], [meson], [dnl
AS_IF([meson_version=$($ac_path_MESON --version 2>&1)], [dnl
AS_IF([test -n "$meson_version"], [dnl
AX_COMPARE_VERSION([$meson_version], [ge], [1.2.3], [dnl
AX_COMPARE_VERSION([$meson_version], [ge], [1.5.0], [dnl
ac_cv_path_MESON="$ac_path_MESON"
ac_path_MESON_found=:
])
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/meson/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
meson
meson >= 1.5.0
4 changes: 2 additions & 2 deletions build/pkgs/ninja_build/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=ninja_build-VERSION.tar.gz
sha1=938723cdfc7a6f7c8f84c83b9a2cecdf1e5e1ad3
sha256=31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea
sha1=f3a1a28e0e427be58b4f2ff2e61b7a4a0e4f0c24
sha256=821bdff48a3f683bc4bb3b6f0b5fe7b2d647cf65d52aeb63328c91a6c6df285a
upstream_url=https://github.com/ninja-build/ninja/archive/refs/tags/vVERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/ninja_build/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.1
1.12.1
4 changes: 2 additions & 2 deletions build/pkgs/numpy/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=numpy-VERSION.tar.gz
sha1=915414f1efabd7c183583154cf1a709bd2745828
sha256=697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4
sha1=f776e594fbd88e4a50639213b4c510b1588e2dd0
sha256=dbdc15f0c81611925f382dfa97b3bd0bc2c1ce19d4fe50482cb0ddc12ba30020
upstream_url=https://files.pythonhosted.org/packages/source/n/numpy/numpy-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/numpy/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.26.3
2.2.3
8 changes: 4 additions & 4 deletions build/pkgs/pybind11/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=pybind11-VERSION.tar.gz
sha1=3c75333a9056f0be18eb612803cd46a2bb0c87fc
sha256=00cd59116a6e8155aecd9174f37ba299d1d397ed4a6b86ac1dfe01b3e40f2cc4
upstream_url=https://files.pythonhosted.org/packages/source/p/pybind11/pybind11-VERSION.tar.gz
tarball=pybind11-VERSION-py3-none-any.whl
sha1=3d927e0ba37bd0af47cd14ec2b52eb796d412806
sha256=237c41e29157b962835d356b370ededd57594a26d5894a795960f0047cb5caf5
upstream_url=https://pypi.io/packages/py3/p/pybind11/pybind11-VERSION-py3-none-any.whl
2 changes: 1 addition & 1 deletion build/pkgs/pybind11/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.11.1
2.13.6
1 change: 0 additions & 1 deletion build/pkgs/pybind11/spkg-install.in

This file was deleted.

3 changes: 2 additions & 1 deletion build/pkgs/pybind11/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pybind11 >=2.6
pybind11>=2.13.2,<2.14.0
# see https://github.com/scipy/scipy/blob/maintenance/1.15.x/pyproject.toml
8 changes: 4 additions & 4 deletions build/pkgs/pythran/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=pythran-VERSION.tar.gz
sha1=dc8a6035c0c46d36630085003160a3aba4444add
sha256=f9bc61bcb96df2cd4b578abc5a62dfb3fbb0b0ef02c264513dfb615c5f87871c
upstream_url=https://files.pythonhosted.org/packages/source/p/pythran/pythran-VERSION.tar.gz
tarball=pythran-VERSION-py3-none-any.whl
sha1=2341d42c014f88318f447083c62e8d3953b04ac2
sha256=be569cc2817b625ccd2c8f74fa3c93806f245c65fadc282c26a9f546ebd34cfa
upstream_url=https://files.pythonhosted.org/packages/py3/p/pythran/pythran-VERSION-py3-none-any.whl
2 changes: 1 addition & 1 deletion build/pkgs/pythran/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.15.0
0.17.0
2 changes: 0 additions & 2 deletions build/pkgs/pythran/spkg-install.in

This file was deleted.

3 changes: 2 additions & 1 deletion build/pkgs/pythran/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pythran >=0.12.1
pythran>=0.14.0,<0.18.0
# per https://github.com/scipy/scipy/blob/maintenance/1.15.x/pyproject.toml
4 changes: 2 additions & 2 deletions build/pkgs/scipy/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=scipy-VERSION.tar.gz
sha1=0fd6e14972d8dd9b4a656686a40aed00ad0f1396
sha256=4bf5abab8a36d20193c698b0f1fc282c1d083c94723902c447e5d2f1780936a3
sha1=093c30bdd187fd5693a8d2fc9fcb961b96418a85
sha256=cd58a314d92838f7e6f755c8a2167ead4f27e1fd5c1251fd54289569ef3495ec
upstream_url=https://files.pythonhosted.org/packages/source/s/scipy/scipy-VERSION.tar.gz
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.12.0
1.15.2
2 changes: 1 addition & 1 deletion build/pkgs/scipy/version_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# deprecations cannot be introduced in micro releases.
# SciPy devs wait "at least 6 months", "in practice two (minor) releases"
# from deprecation to removal of a feature.
scipy >=1.5
scipy >=1.12
4 changes: 4 additions & 0 deletions configure_wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/sh
cp conftest.py bak_conftest.py
./real_configure $@
mv bak_conftest.py conftest.py
2 changes: 1 addition & 1 deletion src/doc/en/developer/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ package :mod:`sage.numerical.backends` and some modules in

- VS Code: Install the `Python extension <https://marketplace.visualstudio.com/items?itemName=ms-python.python>`_ and follow the `official VS Code documentation <https://code.visualstudio.com/docs/python/testing>`__.

*Configuration:* :sage_root:`src/conftest.py`
*Configuration:* :sage_root:`conftest.py`

*Documentation:* https://docs.pytest.org/en/stable/index.html

Expand Down
12 changes: 8 additions & 4 deletions src/sage/graphs/generic_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -16220,21 +16220,25 @@ def clustering_coeff(self,
{0: 1/3, 1: 1/3, 2: 0, 3: 1/3, 4: 1/3, 5: 1/3,
6: 1/3, 7: 1/3, 8: 0, 9: 1/3, 10: 1/3, 11: 0}

sage: (graphs.FruchtGraph()).clustering_coeff(weight=True) # needs networkx
sage: # needs networkx
sage: import numpy
sage: if int(numpy.version.short_version[0]) > 1:
....: numpy.set_printoptions(legacy="1.25")
sage: graphs.FruchtGraph().clustering_coeff(weight=True)
{0: 0.3333333333333333, 1: 0.3333333333333333, 2: 0,
3: 0.3333333333333333, 4: 0.3333333333333333,
5: 0.3333333333333333, 6: 0.3333333333333333,
7: 0.3333333333333333, 8: 0, 9: 0.3333333333333333,
10: 0.3333333333333333, 11: 0}

sage: (graphs.FruchtGraph()).clustering_coeff(nodes=[0,1,2])
sage: graphs.FruchtGraph().clustering_coeff(nodes=[0,1,2])
{0: 0.3333333333333333, 1: 0.3333333333333333, 2: 0.0}

sage: (graphs.FruchtGraph()).clustering_coeff(nodes=[0,1,2], # needs networkx
sage: graphs.FruchtGraph().clustering_coeff(nodes=[0,1,2], # needs networkx
....: weight=True)
{0: 0.3333333333333333, 1: 0.3333333333333333, 2: 0}

sage: (graphs.GridGraph([5,5])).clustering_coeff(nodes=[(0,0),(0,1),(2,2)])
sage: graphs.GridGraph([5,5]).clustering_coeff(nodes=[(0,0),(0,1),(2,2)])
{(0, 0): 0.0, (0, 1): 0.0, (2, 2): 0.0}

TESTS:
Expand Down
Loading