diff --git a/.ci/write-dockerfile.sh b/.ci/write-dockerfile.sh index 7a3512dafd9..0453a023a74 100755 --- a/.ci/write-dockerfile.sh +++ b/.ci/write-dockerfile.sh @@ -275,7 +275,7 @@ cat < 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 . diff --git a/.gitignore b/.gitignore index d290bd9883d..0424cf2d961 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ /config.log /config.status /configure +/real_configure /confdefs.h /m4/sage_spkg_configures.m4 diff --git a/bootstrap b/bootstrap index 00c2a1f7d54..77a5cde41ed 100755 --- a/bootstrap +++ b/bootstrap @@ -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 @@ -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 \ diff --git a/build/pkgs/meson/spkg-configure.m4 b/build/pkgs/meson/spkg-configure.m4 index 7ebfa601644..1dd9935816a 100644 --- a/build/pkgs/meson/spkg-configure.m4 +++ b/build/pkgs/meson/spkg-configure.m4 @@ -1,8 +1,6 @@ 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. @@ -10,7 +8,7 @@ SAGE_SPKG_CONFIGURE([meson], [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=: ]) diff --git a/build/pkgs/meson/version_requirements.txt b/build/pkgs/meson/version_requirements.txt index 0b9952eaa15..6026d02b4af 100644 --- a/build/pkgs/meson/version_requirements.txt +++ b/build/pkgs/meson/version_requirements.txt @@ -1 +1 @@ -meson +meson >= 1.5.0 diff --git a/build/pkgs/ninja_build/checksums.ini b/build/pkgs/ninja_build/checksums.ini index d640d72d1fc..245170a1449 100644 --- a/build/pkgs/ninja_build/checksums.ini +++ b/build/pkgs/ninja_build/checksums.ini @@ -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 diff --git a/build/pkgs/ninja_build/package-version.txt b/build/pkgs/ninja_build/package-version.txt index 720c7384c61..f8f4f03b3dc 100644 --- a/build/pkgs/ninja_build/package-version.txt +++ b/build/pkgs/ninja_build/package-version.txt @@ -1 +1 @@ -1.11.1 +1.12.1 diff --git a/build/pkgs/numpy/checksums.ini b/build/pkgs/numpy/checksums.ini index 6814f0f5c10..f2d23137e15 100644 --- a/build/pkgs/numpy/checksums.ini +++ b/build/pkgs/numpy/checksums.ini @@ -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 diff --git a/build/pkgs/numpy/package-version.txt b/build/pkgs/numpy/package-version.txt index f8f73814096..585940699b5 100644 --- a/build/pkgs/numpy/package-version.txt +++ b/build/pkgs/numpy/package-version.txt @@ -1 +1 @@ -1.26.3 +2.2.3 diff --git a/build/pkgs/pybind11/checksums.ini b/build/pkgs/pybind11/checksums.ini index 66a54f106b5..5b78db42c17 100644 --- a/build/pkgs/pybind11/checksums.ini +++ b/build/pkgs/pybind11/checksums.ini @@ -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 diff --git a/build/pkgs/pybind11/package-version.txt b/build/pkgs/pybind11/package-version.txt index 6ceb272eecd..14239ef1586 100644 --- a/build/pkgs/pybind11/package-version.txt +++ b/build/pkgs/pybind11/package-version.txt @@ -1 +1 @@ -2.11.1 +2.13.6 diff --git a/build/pkgs/pybind11/spkg-install.in b/build/pkgs/pybind11/spkg-install.in deleted file mode 100644 index deba1bb42bb..00000000000 --- a/build/pkgs/pybind11/spkg-install.in +++ /dev/null @@ -1 +0,0 @@ -cd src && sdh_pip_install . diff --git a/build/pkgs/pybind11/version_requirements.txt b/build/pkgs/pybind11/version_requirements.txt index 6c44c4bd07e..ddd5ff5f7bc 100644 --- a/build/pkgs/pybind11/version_requirements.txt +++ b/build/pkgs/pybind11/version_requirements.txt @@ -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 diff --git a/build/pkgs/pythran/checksums.ini b/build/pkgs/pythran/checksums.ini index b9626c89359..ebb9201d099 100644 --- a/build/pkgs/pythran/checksums.ini +++ b/build/pkgs/pythran/checksums.ini @@ -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 diff --git a/build/pkgs/pythran/package-version.txt b/build/pkgs/pythran/package-version.txt index a5510516948..c5523bd09b1 100644 --- a/build/pkgs/pythran/package-version.txt +++ b/build/pkgs/pythran/package-version.txt @@ -1 +1 @@ -0.15.0 +0.17.0 diff --git a/build/pkgs/pythran/spkg-install.in b/build/pkgs/pythran/spkg-install.in deleted file mode 100644 index 37ac1a53437..00000000000 --- a/build/pkgs/pythran/spkg-install.in +++ /dev/null @@ -1,2 +0,0 @@ -cd src -sdh_pip_install . diff --git a/build/pkgs/pythran/version_requirements.txt b/build/pkgs/pythran/version_requirements.txt index f365e5f4971..32d8417ff53 100644 --- a/build/pkgs/pythran/version_requirements.txt +++ b/build/pkgs/pythran/version_requirements.txt @@ -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 diff --git a/build/pkgs/scipy/checksums.ini b/build/pkgs/scipy/checksums.ini index d834a3ad1b3..35831f94fc9 100644 --- a/build/pkgs/scipy/checksums.ini +++ b/build/pkgs/scipy/checksums.ini @@ -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 diff --git a/build/pkgs/scipy/package-version.txt b/build/pkgs/scipy/package-version.txt index 0eed1a29efd..42cf0675c56 100644 --- a/build/pkgs/scipy/package-version.txt +++ b/build/pkgs/scipy/package-version.txt @@ -1 +1 @@ -1.12.0 +1.15.2 diff --git a/build/pkgs/scipy/version_requirements.txt b/build/pkgs/scipy/version_requirements.txt index 8f07730e208..930dcdb6bd5 100644 --- a/build/pkgs/scipy/version_requirements.txt +++ b/build/pkgs/scipy/version_requirements.txt @@ -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 diff --git a/configure_wrapper b/configure_wrapper new file mode 100755 index 00000000000..3eb3eeb00b4 --- /dev/null +++ b/configure_wrapper @@ -0,0 +1,4 @@ +#! /bin/sh +cp conftest.py bak_conftest.py +./real_configure $@ +mv bak_conftest.py conftest.py diff --git a/src/doc/en/developer/tools.rst b/src/doc/en/developer/tools.rst index bc18723cb24..661b8972185 100644 --- a/src/doc/en/developer/tools.rst +++ b/src/doc/en/developer/tools.rst @@ -382,7 +382,7 @@ package :mod:`sage.numerical.backends` and some modules in - VS Code: Install the `Python extension `_ and follow the `official VS Code documentation `__. -*Configuration:* :sage_root:`src/conftest.py` +*Configuration:* :sage_root:`conftest.py` *Documentation:* https://docs.pytest.org/en/stable/index.html diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index f2a18b088bb..f0c6e527979 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -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: