On 2024-11-01 04:32:35, Nils Bruin wrote: > There is obviously the "package version", but as I now see, the "equivalent > system packages" don't seem to encode an explicit version restriction at > all. So I guess Michael's comment on spkg-configure.m4 is probably > appropriate. I guess explicit testing for exactly what you need there would > be the most flexible, but the requirement there could also just be a check > on the installed version number, I guess. In that case, sage installation > should detect whatever system-installed libbraiding there is, run its test > (look up the version number and compare it with the value) and then decide > if that's good enough.
In general, and with libbraiding, there's no easy way to tell the exact version number of a package that's installed. In that case, you have to use the old-fashioned (i.e. simple and reliable) method of testing for the features that you want rather than the version you think has them. To do a version check, libbraiding would have to supply a pkg-config (*.pc) file. The pc file basically just encodes information, like the version, about a package in a standard place. Sage would then run pkg-config to read the file and get the installed version. For version information alone, pkg-config is of dubious benefit, but it has other uses like making it possible to install packages in non-standard locations (say you need both gtk3 and gtk4 installed at the same time). And if the *.pc file is there anyway, the easy thing to do is use it. -- 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+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/sage-devel/ZyTNGX3YdpNOlMnO%40mertle.