On Tue, Jan 29, 2019 at 4:48 PM Thierry <sage-googlesu...@lma.metelu.net> wrote: > > Hi, > > On Tue, Jan 29, 2019 at 09:32:58AM +0100, Vincent Delecroix wrote: > > Dear all, > > > > Imagine I have a Python module, typically hosted on PyPI and depending > > on SageMath, that provides documentation in some form (e.g. a pdf file, > > a sphinx repo, etc). > > > > 1) When a user performs `sage -pip install X`, should the documentation > > be compiled and installed? > > I would say that: > > sage -pip blah > > should behave the same as: > > sage -sh > pip blah > > whatever blah is, so as to behave like the others: > > sage -famous_program > > Perhaps could we have some dedicated "clever": > > sage -install blah > > that parses blah to see whether it is an spkg name, it has to pip > install it, to git clone it and search for some Makefile, and so on, and > with nicest defaults as possible (like installing the doc if it exists).
I don't want to go overboard with automatic <whatever>. If you want to install a package and its documentation in Sage, create an SPKG for it with an spkg-install and add a section with if [ $SAGE_SPKG_INSTALL_DOCS = yes ]; then ... fi section containing the appropriate steps to build and install the docs. > > If the answer is yes (I believe it is) > > > > 2) Is there any recommendation on how this should be done? Should > > there be a target in setup.py? Should there be a proper Makefile? > > > > 3) Where do we set/get the proper environment variable to know where > > to install documentation? I can imagine at least 3 natural targets > > that depend on the command performed > > > > $ pip install X -> doc should install in /usr/share > > $ sage -pip install X -> doc should install in $SAGE_SHARE > > $ pip install X --user -> doc should install in $HOME/.local/share > > (what about $ sage -pip install X --user? Should it be > > $HOME/.sage/local/share?) > > > > 4) Ideally, if the documentation is based on sphinx a link should be > > available in the Help menu of any SageMath Jupyter Notebook and it > > should be possible to run the examples directly. > > > > Note that the sage_sample repo on github > > (https://github.com/sagemath/sage_sample) is carefully avoiding the question > > by advising to deploy > > the documentation on a github website. > > > > Best > > Vincent > > > > -- > > 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 https://groups.google.com/group/sage-devel. > > For more options, visit https://groups.google.com/d/optout. > > -- > 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 https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.