promoting hypothesis to standard spkg

52 views
Skip to first unread message

Dima Pasechnik

unread,
Jan 31, 2025, 11:55:21 AMJan 31
to sage-devel
At present hypothesis is optional, but it's a convenient package, used
a lot together with pytest, and is a (optional?) dependency of a
standard package pyrsistent

The latter, strangely, lists lots of dependencies in its SPKG.rst.

Anyway, the primary reason for this is that the new version of a
standard package gmpy2 uses hypothesis in its testsuite, so without it
installed spkg-check fails for it,
as found here: https://github.com/sagemath/sage/pull/39364
(where I update it to the new version)

IMHO this doesn't need a vote, but just in case, if there are any
objections, please shout.

Dima

Michael Orlitzky

unread,
Jan 31, 2025, 6:05:44 PMJan 31
to sage-...@googlegroups.com
On 2025-01-31 10:21:34, Dima Pasechnik wrote:
> Anyway, the primary reason for this is that the new version of a
> standard package gmpy2 uses hypothesis in its testsuite, so without it
> installed spkg-check fails for it,
> as found here: https://github.com/sagemath/sage/pull/39364
> (where I update it to the new version)

According to src/doc/en/developer/packaging.rst, we have
dependencies_check files for this. Hypothesis is already listed in
build/pkgs/gmpy2/dependencies_check, but `git grep` shows me only an
m4 atrocity that doesn't provide any hints as to how hypothesis might
wind up installed.

Dima Pasechnik

unread,
Jan 31, 2025, 7:19:58 PMJan 31
to sage-...@googlegroups.com
On Fri, Jan 31, 2025 at 5:05 PM Michael Orlitzky <mic...@orlitzky.com> wrote:
>
> On 2025-01-31 10:21:34, Dima Pasechnik wrote:
> > Anyway, the primary reason for this is that the new version of a
> > standard package gmpy2 uses hypothesis in its testsuite, so without it
> > installed spkg-check fails for it,
> > as found here: https://github.com/sagemath/sage/pull/39364
> > (where I update it to the new version)
>
> According to src/doc/en/developer/packaging.rst, we have
> dependencies_check files for this. Hypothesis is already listed in
> build/pkgs/gmpy2/dependencies_check,

OK, thanks, I didn't know about this one.
The same file says "standard packages should only depend on standard packages"

> but `git grep` shows me only an
> m4 atrocity that doesn't provide any hints as to how hypothesis might
> wind up installed.

It seems that this atrocity isn't working, as explained on
https://github.com/sagemath/sage/pull/39364
Perhaps the reason is that hypothesis wasn't declared standard?
I'll check and report on #39364, which needs work one way or another.

Dima

>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/Z51XQk6yy4UDUorR%40mertle.

Michael Orlitzky

unread,
Jan 31, 2025, 10:47:20 PMJan 31
to sage-...@googlegroups.com
On 2025-01-31 17:38:22, Dima Pasechnik wrote:
> It seems that this atrocity isn't working, as explained on
> https://github.com/sagemath/sage/pull/39364
> Perhaps the reason is that hypothesis wasn't declared standard?
> I'll check and report on #39364, which needs work one way or another.

There's also meson_python with optional packages in dependencies_check.
You would think the idea would be to install the check-deps only when
SAGE_CHECK=yes. Otherwise you can waste a lot of time building stuff
you won't use.

The m4 line appears to be messing with SAGE_CHECK_ variables, and
there's a template in build/make/Makefile.in that looks like it can
set those variables, and then there are defaults, and overrides, and
some ad-hoc notation to set more than one at a time, and eventually
things are eval'd four levels deep in a GNU Make function. I wouldn't
believe anyone who says they understand it, but it's at least
conceivable that it works if you poke it in just the right way.
Reply all
Reply to author
Forward
0 new messages