On Tuesday, 30 May 2017 23:35:37 UTC+10, Jeroen Demeyer wrote:
>
> Sphinx needs to be able to import your modules to document them. There 
> is nothing Sphinx-specific about this, it's just usual Python imports. I 
> am assuming that your package works within Sage but not outside of Sage. 
> That means that you need to run Sphinx also within the Sage environment. 
>
> The easiest way to do this is running a Sage shell: 
>
> $ sage --sh 
>
> And now do everything again within this environment. 
>

Thanks. I was not aware of sage -sh. This gets me a little further, but 
still doesn't work.

(sage-sh) leopardi@catawba:doc$ make html
Running Sphinx v1.4.4
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] 
index                                                                           
                                                                                
                                                                                
     

/home/leopardi/sync/src/sage-sandbox/Boolean-Cayley-graphs/doc/index.rst:13: 
WARNING: autodoc: failed to import module 
u'bent_function_cayley_graph_classification'; the following exception was 
raised:
Traceback (most recent call last):
  File 
"/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py",
 
line 518, in import_object
    __import__(self.modname)
  File 
"/home/leopardi/sync/src/sage-sandbox/Boolean-Cayley-graphs/sage-code/boolean_cayley_graphs/bent_function_cayley_graph_classification.py",
 
line 48, in <module>
    from sage.arith.srange import xsrange
  File "sage/rings/integer.pxd", line 7, in init sage.arith.srange 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/arith/srange.c:9410)
    cdef class Integer(EuclideanDomainElement):
  File "sage/rings/rational.pxd", line 8, in init sage.rings.integer 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/rings/integer.c:50835)
    cdef class Rational(sage.structure.element.FieldElement):
  File "sage/rings/rational.pyx", line 66, in init sage.rings.rational 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/rings/rational.c:40571)
  File "sage/rings/integer_ring.pyx", line 60, in init 
sage.rings.integer_ring 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/rings/integer_ring.c:15199)
  File 
"/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/local/lib/python2.7/site-packages/sage/structure/factorization.py",
 
line 190, in <module>
    from sage.misc.all import prod
  File 
"/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/local/lib/python2.7/site-packages/sage/misc/all.py",
 
line 88, in <module>
    from .functional import (additive_order,
  File 
"/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/local/lib/python2.7/site-packages/sage/misc/functional.py",
 
line 32, in <module>
    from sage.rings.complex_double import CDF
  File "sage/rings/real_double.pxd", line 8, in init 
sage.rings.complex_double 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/rings/complex_double.c:23863)
    cdef class RealDoubleField_class(Field):
  File "sage/rings/real_double.pyx", line 63, in init 
sage.rings.real_double 
(/home/leopardi/sync/src-downloaded/sage/sage-7.6-Ubuntu_16.04-x86_64/src/build/cythonized/sage/rings/real_double.c:26478)
ImportError: cannot import name ZZ
/home/leopardi/sync/src/sage-sandbox/Boolean-Cayley-graphs/doc/index.rst:15: 
WARNING: don't know which module to import for autodocumenting 
u'BentFunction' (try placing a "module" or "currentmodule" directive in the 
document, or giving an explicit module name)
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] 
index                                                                           
                                                                                
                                                                                
      

generating indices... genindex
writing additional pages... search
copying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 2 warnings.

Build finished. The HTML pages are in _build/html.

 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to