There is a canonical "version without patchlevel" provided by the sage_bootstrap library, nobody should re-implement "chopping off chars". E.g. (note the edge case):
In [1]: import sys In [2]: sys.path.append('build') In [3]: from sage_bootstrap.package import Package In [4]: Package('singular').version Out[4]: '3.1.7p1' In [5]: !cat build/pkgs/singular/package-version.txt 3.1.7p1.p0 Still, your own interface need not correspond to a particular Sage package (e.g. the M* interfaces). So version has to come from the interfaced program. On Sunday, September 6, 2015 at 10:31:19 PM UTC+2, Nathann Cohen wrote: > > I don't think that package-version.txt should be used as answer to >> package.version() in Sage. I consider this file to be build metadata, >> while package.version() should provide upstream's idea of the version >> number, using some function or data from the upstream sources. >> > > Can't we expect that the content of package-version.txt is *precisely* > upstream's version, except for the ending .p0 or .p[number]? In which case > we only have to strip that. > > Nathann > -- 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 post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.