Re: [sage-devel] Adding LRS Library On SageMath

2022-01-10 Thread Samuel Lelievre
One way to keep a good record of this failed build would be
```
$ THE_REPORT=sage-9-5-b9-fail-openblas
$ REPORTS=$HOME/sage-reports

$ REPORT=$REPORTS/$THE_REPORT
$ mkdir -p $REPORT

$ brew config > $REPORT/brew-config.txt
$ brew list --versions > $REPORT/brew-list-versions.txt

$ xcode-select -p > $REPORT/xcode-select-p.txt
$ xcode-select --version > $REPORT/xcode-select-version.txt
$ xcodebuild -version > $REPORT/xcodebuild-version

$ sysctl -n hw.ncpu > $REPORT/ncpu.txt
$ CLTOOLS=com.apple.pkg.CLTools_Executables
$ pkgutil --pkg-info=$CLTOOLS > $REPORT/cltools.txt

$ cd /Applications/SageMath
$ rsync -a config.log $REPORT
$ rsync -a logs/install.log $REPORT
$ rsync -a logs/pkgs/scipy*.log $REPORT
$ rsync -a logs/pkgs/openblas*.log $REPORT

$ (cd $REPORTS $$ tar cJf $THE_REPORT.tar.xz $THE_REPORT)
```

This will produce a compressed archive called
`~/sage-reports/sage-9-5-b9-fail-openblas.tar.xz`
which if you want you can upload somewhere (like dropbox,
wetransfer, etc) and email a link to for someone to have
a look; or you could even send it as an attachment,
as it should have a very moderate size.

After doing that, I would suggest to try the following.

Get a few more packages from Homebrew
```
$ brew update
$ brew upgrade
$ brew install \
  arb autoconf automake bdw-gc boost bzip2 cbc cmake curl ecl \
  flint fplll freetype gcc gd gengetopt gettext git glpk gmp \
  gpatch graphviz gsl igraph isl libatomic_ops libffi libiconv \
  libmpc libpng libtool libxml2 llvm mpfi mpfr nauty ncurses \
  ninja ntl openblas openssl pari pari-elldata pari-galdata \
  pari-galpol pari-seadata pcre pdf2svg pkg-config ppl python3 \
  qhull r readline singular sqlite suite-sparse texinfo tox xz \
  zeromq zlib
```

Get the latest development version of Sage
```
$ cd /Applications/SageMath
$ git checkout develop
$ git pull origin develop --tags -q
```

Check branch (should say SageMath 9.5.rc0)
```
$ git branch -vv
```

Clean up the last build attempt and start from scratch
```
$ export MAKE='make -j8'
$ export V=0
$ make -s distclean
$ source .homebrew-build-env
$ ./bootstrap -q
$ ./configure --enable-lrslib
$ make -s
```

If this fails, you could produce a report as above,
but naming the report differently, for instance
```
$ THE_REPORT=sage-9-5-rc0-2022-01-10
```
and adapting which log files you include (usually
it's good to include config.log and logs/install.log,
and select from logs/pkgs/*.log those that failed).

Of course feel free to adapt what information you
want to include in your report.  --Samuel

-- 
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 on the web visit 
https://groups.google.com/d/msgid/sage-devel/298efb1e-b6d4-46c6-8e57-059b8bfen%40googlegroups.com.


Re: [sage-devel] Python-level error messages don't give the source file name

2022-01-10 Thread Michael Orlitzky
On Sat, 2022-01-08 at 23:27 -0800, Jonathan Thornburg wrote:
> what's the idiomatic way for some other piece of Sage source code to
> execute the contents of all of those files?  What I've been doing is
> to create another file (say 'setup.sage') which contains the lines
>   load('foo.sage')
>   load('bar.sage')
>   load('baz.sage')
> so that
>   load('setup.sage')
> (either at the interactive Sage prompt or in another source file) loads
> all the individual files.  This works fine apart from the un-helpful
> error messages when (not if, *when*) I have bugs in my code.  Is there
> a more idiomatic way?
> 
> 

Since you haven't received a better reply... as soon as my own code
starts to span multiple files, I stop thinking of it as a series of
commands to be fed to the sage interpreter, and instead start thinking
of it as a python program/library.

Globals are always tricky, but in your example I might define a
function

  def initialize_globals():
  ...

in foo.py so that whatever you consider to be the "main program" can
run e.g.

  from sage.all import *
  from foo import initialize_globals
  from baz import compute_stuff

  initialize_globals()
  result = compute_stuff()
  print(result)

Beware that you won't get preparsing this way, but otherwise, this more
or less allows you to write a well-structured python library using all
of the features of sage.


-- 
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 on the web visit 
https://groups.google.com/d/msgid/sage-devel/5749f24f69f613283789723539ae3b24f4b86976.camel%40orlitzky.com.


[sage-devel] Re: pdf docs from jupyter notebook

2022-01-10 Thread Steven Trogdon

Things are now working. When I open "Sage Documentation", at the top of the 
page there is "Sage Documentation v9.5.rc0", then "Tutorials and FAQ" and 
then, for example "Tutorial". The "Tutorial" is a link to the "html" 
documentation, but beside this link is a PDF icon that links to pdf 
documentation. The "Tutorial" link works but the PDF link fails. This may 
only show if the pdf documentation has been built.
On Monday, January 10, 2022 at 11:30:27 AM UTC-7 Eric Gourgoulhon wrote:

> Hi, 
>
> I am not sure to understand what your problem is:  from a Sage Jupyter 
> notebook, if I click on the "Help" menu and select "Sage Documentation", 
> then a new tab opens in the browser at the address
> http://localhost:/kernelspecs/sagemath/doc/index.html
> It displays html documentation and there is no attempt to show any pdf 
> file.
> This is with Sage 9.5.rc0 running on Ubuntu 20.04. 
>
> Eric.
> Le dimanche 9 janvier 2022 à 19:26:01 UTC+1, Steven Trogdon a écrit :
>
>> From a new Sagemath jupyter notebook if I select the Sage Documentation I 
>> have numerous PDF links which are broken., for example
>>
>> [W 11:01:19.061 NotebookApp] 404 GET 
>> /kernelspecs/pdf/en/tutorial/SageTutorial.pdf (::1): Kernel spec pdf not 
>> found
>> [W 11:01:19.062 NotebookApp] 404 GET 
>> /kernelspecs/pdf/en/tutorial/SageTutorial.pdf (::1) 3.14ms referer=
>> http://localhost:/kernelspecs/sagemath/doc/index.html
>>
>> Are these links supposed to work from the notebook? They do work if the 
>> path
>>
>> file:///$SAGE_ROOT/local/share/doc/sage/html/en/index.html
>>
>> is pasted in a brower.
>>
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/sage-devel/78e2ad53-5db5-427f-8003-34f8573aefcbn%40googlegroups.com.


Re: [sage-devel] Adding LRS Library On SageMath

2022-01-10 Thread 'Justin C. Walker' via sage-devel



> On Jan 10, 2022, at 07:39 , Advay Goel  wrote:
> 
> 
> Thank you so much for your help!
> 
> I installed Homebrew and executed the code that you wrote out. However, when 
> I ran the make -s V = 0 line, it still crashed in the same place. For some 
> reason, it is unable to build the Scipy-1.6.3 package. I attached a 
> screenshot of the error message to this email. Do you know what I'm doing 
> incorrectly? 

If you literally ran “make -s V = 0”, the problem is the spaces following V and 
=.  With spaces, the “make” program sees 4 arguments: “-s”, “V”, “=“, and “0”.  
I think the last three should be one, i.e., “V=0”, no spaces.

HTH

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income

When LuteFisk is outlawed,
Only outlaws will have LuteFisk




-- 
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 on the web visit 
https://groups.google.com/d/msgid/sage-devel/1D00D59B-5124-40CC-B4F2-585129228FA4%40mac.com.


[sage-devel] Re: pdf docs from jupyter notebook

2022-01-10 Thread Steven Trogdon
I'm presently unable to get the jupyter kernel to start with Sage 9.5.rc0 , 
so I will respond more directly when that is fixed. However, with 9.5.beta9 
when I opened "Sage Documentation" there was not only links to html 
documentation but beside each link there was a PDF icon to get pdf 
documentation. When that PDF icon was "clicked" I received the terminal 
error in my first post. I'm rebuilding 9.5.rc0 to see if the jupyter kernel 
issue is resolved.
On Monday, January 10, 2022 at 11:30:27 AM UTC-7 Eric Gourgoulhon wrote:

> Hi, 
>
> I am not sure to understand what your problem is:  from a Sage Jupyter 
> notebook, if I click on the "Help" menu and select "Sage Documentation", 
> then a new tab opens in the browser at the address
> http://localhost:/kernelspecs/sagemath/doc/index.html
> It displays html documentation and there is no attempt to show any pdf 
> file.
> This is with Sage 9.5.rc0 running on Ubuntu 20.04. 
>
> Eric.
> Le dimanche 9 janvier 2022 à 19:26:01 UTC+1, Steven Trogdon a écrit :
>
>> From a new Sagemath jupyter notebook if I select the Sage Documentation I 
>> have numerous PDF links which are broken., for example
>>
>> [W 11:01:19.061 NotebookApp] 404 GET 
>> /kernelspecs/pdf/en/tutorial/SageTutorial.pdf (::1): Kernel spec pdf not 
>> found
>> [W 11:01:19.062 NotebookApp] 404 GET 
>> /kernelspecs/pdf/en/tutorial/SageTutorial.pdf (::1) 3.14ms referer=
>> http://localhost:/kernelspecs/sagemath/doc/index.html
>>
>> Are these links supposed to work from the notebook? They do work if the 
>> path
>>
>> file:///$SAGE_ROOT/local/share/doc/sage/html/en/index.html
>>
>> is pasted in a brower.
>>
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/sage-devel/eb8228d7-55f1-41f4-a816-2119896e0e6fn%40googlegroups.com.


[sage-devel] Re: pdf docs from jupyter notebook

2022-01-10 Thread Eric Gourgoulhon
Hi, 

I am not sure to understand what your problem is:  from a Sage Jupyter 
notebook, if I click on the "Help" menu and select "Sage Documentation", 
then a new tab opens in the browser at the address
http://localhost:/kernelspecs/sagemath/doc/index.html
It displays html documentation and there is no attempt to show any pdf file.
This is with Sage 9.5.rc0 running on Ubuntu 20.04. 

Eric.
Le dimanche 9 janvier 2022 à 19:26:01 UTC+1, Steven Trogdon a écrit :

> From a new Sagemath jupyter notebook if I select the Sage Documentation I 
> have numerous PDF links which are broken., for example
>
> [W 11:01:19.061 NotebookApp] 404 GET 
> /kernelspecs/pdf/en/tutorial/SageTutorial.pdf (::1): Kernel spec pdf not 
> found
> [W 11:01:19.062 NotebookApp] 404 GET 
> /kernelspecs/pdf/en/tutorial/SageTutorial.pdf (::1) 3.14ms referer=
> http://localhost:/kernelspecs/sagemath/doc/index.html
>
> Are these links supposed to work from the notebook? They do work if the 
> path
>
> file:///$SAGE_ROOT/local/share/doc/sage/html/en/index.html
>
> is pasted in a brower.
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/sage-devel/4b6e5dbd-0e5f-4bc5-a2dc-cbc56c7440bcn%40googlegroups.com.


Re: [sage-devel] Re: Proposal: Stop providing binary distributions

2022-01-10 Thread Matthias Koeppe
On Monday, January 10, 2022 at 12:11:19 AM UTC-8 Dima Pasechnik wrote:

>
> On Mon, 10 Jan 2022, 01:31 Matthias Koeppe,  wrote:
>
>> On Sunday, January 9, 2022 at 1:02:27 PM UTC-8 wst...@gmail.com wrote:
>>
>>> Instead of "Proposal: Stop providing binary distributions" maybe your
>>>
>> proposal is: 
>>>
>>> "Proposal: Group X will stop providing binary distributions, and instead 
>>> much more strongly encourage and advertise the work of groups 
>>> Y, Z, etc... to provide binary distributions" ?
>>>
>>
>> where Group X =  the upstream project SageMath.
>>
>
> I suppose it should not include (binary) wheels (still very much WIP) and 
> docker or other VM-like images, right?
>

Agreed. See ticket (needs review).


-- 
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 on the web visit 
https://groups.google.com/d/msgid/sage-devel/75bba88b-2f0c-402a-8606-f0967ddb4fb3n%40googlegroups.com.


Re: [sage-devel] Adding LRS Library On SageMath

2022-01-10 Thread Advay Goel

Thank you so much for your help!

I installed Homebrew and executed the code that you wrote out. However, 
when I ran the make -s V = 0 line, it still crashed in the same place. For 
some reason, it is unable to build the Scipy-1.6.3 package. I attached a 
screenshot of the error message to this email. Do you know what I'm doing 
incorrectly? 

Thanks,
Advay 
On Sunday, January 2, 2022 at 4:26:17 AM UTC-5 Samuel Lelievre wrote:

> 2021-12-29 04:12 UTC, Advay Goel on sage-devel:
> >
> > Hi All,
> >
> > I use macOS Big Sur Version 11.1, and need to use
> > the LRS Library for a project:
> >
> > def getVolume(self,eng='lrs'):
> > """ needs Sage 5.9 for 'lrs' engine """
> > return self.poly.volume(engine=eng)*factorial(self.poly.dim())
> >
> > Currently, whenever I run this function, I get 0, and I believe
> > it is because LRS Library is not properly installed on my system
> > (I checked using this code: link and it said LRS is not present).
> > However, this doesn't make much sense to me as there is an LRS
> > folder in my sage folder. Its location is
> > /Applications/SageMath/build/pkgs/lrslib
> >
> > Regardless, I downloaded LRS again and am trying to build Sage from 
> source.
>
> Inside the Sage source folder, build/pkgs contains a folder
> for each "Sage package" (or "spkg"), whether standard, optional
> or experimental, that Sage can install. For example, in your case,
> the folder
>
>   /Applications/SageMath/build/pkgs/lrslib
>
> has the information about the `lrslib` spkg. That includes:
>
> - `type`, which in this case contains the word "optional"
> - `package-version.txt`, which has the version that Sage
>   will try to install if it does not find a good enough
>   system package to use
> - `spkg-configure.m4`, which is in charge of detecting whether
>   there is an appropriate system lrslib that Sage can use,
>   instead of building lrslib specially for Sage; that file
>   was added in Sage Trac ticket #27804, merged in Sage 9.3.rc3:
>   https://trac.sagemath.org/ticket/27804
>
> When you build Sage on macOS, it helps to first install
> Homebrew, and to install many packages using Homebrew.
>
> The Homebrew installation instructions are at
>
>   http://brew.sh
>
> (installing Homebrew is one line to cut and paste from that
> website into a terminal).
>
> Then, in a terminal, from your Sage folder, get the latest
> development version of Sage:
>
> $ git checkout develop
> $ git pull origin develop --tags -q
> $ git branch -vv
>
> Then make Sage aware of Homebrew and configure for the build:
>
> $ source .homebrew-build-env
> $ make configure
> $ ./configure --enable-lrslib
>
> The output of that last command will contain suggestions
> of packages to install via Homebrew for Sage to use rather
> than having to build them; and it will indicate a command
> to be run after installing extra Homebrew packages, to take
> them into account when building Sage. Once you have followed
> these suggestions, run
>
> $ MAKE='make -j8'  # to run 8 jobs in parallel
> $ make -s V=0
>
> Then you should have a fully functional Sage with lrslib.
>
> Don't hesitate if you have more questions.   --Samuel
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/sage-devel/82a3eda5-e5aa-4b15-8538-74694b88df5dn%40googlegroups.com.


Re: [sage-devel] Re: Proposal: Stop providing binary distributions

2022-01-10 Thread Dima Pasechnik
On Mon, 10 Jan 2022, 01:31 Matthias Koeppe, 
wrote:

> On Sunday, January 9, 2022 at 1:02:27 PM UTC-8 wst...@gmail.com wrote:
>
>> Matthias, correct me if I'm wrong, but are you proposing that we just a
>>
> better job at pointing users to binary distributions of Sage such as
>> https://github.com/3-manifolds/Sage_macOS/releases, conda-forge, and
>> of course any packaging of Sage for Linux distros, etc., instead of
>> pointing them at binaries that don't work?
>
>
> That's right, that's the proposal, see ticket
> https://trac.sagemath.org/ticket/33131 (needs review).
>
> Instead of "Proposal: Stop providing binary distributions" maybe your
>> proposal is:
>>
>> "Proposal: Group X will stop providing binary distributions, and instead
>> much more strongly encourage and advertise the work of groups
>> Y, Z, etc... to provide binary distributions" ?
>>
>
> where Group X =  the upstream project SageMath.
>

I suppose it should not include (binary) wheels (still very much WIP) and
docker or other VM-like images, right?


> --
> 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 on the web visit
> https://groups.google.com/d/msgid/sage-devel/f02c840b-adfc-4740-8966-bf71d4474da9n%40googlegroups.com
> 
> .
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq3eJ%2BXSAZhe2iPpQa2CEFbnpWRL-5pgL_McwshBBvVu1w%40mail.gmail.com.