You are not logged in.

#1 2017-06-12 18:15:43

Thrash
Member
Registered: 2017-06-12
Posts: 9

Output of SageMath Boolean

Hello,

does anyone here use Sage? What is your output if you enter the following command in Sage?

is_package_installed('type in some nonsense')

Offline

#2 2017-06-12 18:23:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: Output of SageMath Boolean

What is your output?  What do you expect it to be?

What sage package do you have installed?  Does your package have a patch for this:
https://trac.sagemath.org/ticket/20377

mod note: definitely not a pacman issue.  Not really sure if there is an issue at all.  Moved to N.C.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2017-06-12 19:04:03

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,313

Re: Output of SageMath Boolean

is_package_installed doesn't make sense for distro provided sagemath. Therefore it is patched to always return true, as otherwise it wouldn't be possible to use any optional package in Sage.

Offline

#4 2017-06-12 20:42:23

Thrash
Member
Registered: 2017-06-12
Posts: 9

Re: Output of SageMath Boolean

But then with this "patch" (always returning true) some functions don't work properly like the default Cremona mini database (because Sage wants to load the big one even in the case of not being installed) and other things that have this command in their source code (within if statements), too. Either one must change those occurring problems, too, or one arranges the package differently, so that Sage behaves properly as provided by the developer.

Last edited by Thrash (2017-06-12 20:56:25)

Offline

#5 2017-06-12 21:11:26

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,313

Re: Output of SageMath Boolean

The only way for Sage to behave as intended by their developers is by compiling the Sage distribution from source or using their precompiled binaries. Sage simply does not support being compiled against system libraries - things are slightly improving lately, but there is still way to go. Until then, using the distro packages requires using some hacks and having to live with these quirks.
By having is_package_installed always return true, Sage will try to use whatever feature the optional package provides. If the package is not installed, you will generally get a python import error or some other message that will hopefully give you a hint on what you're missing. The Cremona database is a special case that would indeed need to be handled differently - will try to fix that for next release.

Offline

#6 2017-06-12 21:16:23

Thrash
Member
Registered: 2017-06-12
Posts: 9

Re: Output of SageMath Boolean

arojas wrote:

will try to fix that for next release.

Pleasant news, thanks!

arojas wrote:

by compiling the Sage distribution from source or using their precompiled binaries

What are the advantages and disadvantages of these methods compared to the Sage package by Arch?

Is it possible to install the full Cremona database using the Sage package by Arch?

Last edited by Thrash (2017-06-12 21:24:39)

Offline

#7 2017-06-12 21:21:05

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,313

Re: Output of SageMath Boolean

As a temporary fix, replace "is_package_installed('database_cremona_ellcurve')" with "os.path.exists('/usr/share/sage/cremona/cremona.db')" in sage/databases/cremona.py

Offline

#8 2017-06-12 21:28:13

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,313

Re: Output of SageMath Boolean

Thrash wrote:
arojas wrote:

by compiling the Sage distribution from source or using their precompiled binaries

What are the advantages and disadvantages of these methods compared to the Sage package by Arch?

Advantages: you get upstream support, some libraries are optimized for your CPU (if compiled from source), it's more widely tested.
Disadvantages: you have duplicated copies of many libraries on your system and on memory, which means higher memory and disk usage, you need to manage upgrades yourself.

Offline

#9 2017-06-12 21:30:02

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,313

Re: Output of SageMath Boolean

Thrash wrote:

Is it possible to install the full Cremona database using the Sage package by Arch?

Yes, it's in AUR

Offline

#10 2017-06-12 22:10:05

Thrash
Member
Registered: 2017-06-12
Posts: 9

Re: Output of SageMath Boolean

By the way, shouldn't it be replaced by "os.path.exists('/usr/share/cremona/cremona.db')"? Both my cremona_mini.db and cremona.db (now after I've installed the large database) are located there.

Another question: What does the dependency description "(make)" mean?
https://www.archlinux.org/packages/comm … /sagemath/

Last edited by Thrash (2017-06-12 22:12:50)

Offline

#11 2017-06-12 22:26:51

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Output of SageMath Boolean


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#12 2017-06-13 06:14:23

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,313

Re: Output of SageMath Boolean

Thrash wrote:

By the way, shouldn't it be replaced by "os.path.exists('/usr/share/cremona/cremona.db')"? Both my cremona_mini.db and cremona.db (now after I've installed the large database) are located there.

Right

Offline

Board footer

Powered by FluxBB