#18929: Include igraph library
-------------------------------------+-------------------------------------
       Reporter:  borassi            |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.8
      Component:  packages:          |   Resolution:
  optional                           |    Merged in:
       Keywords:  igraph library     |    Reviewers:
        Authors:  Michele Borassi    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  388abfbfec5b9d8255ff83efbdfc4a61a076ffce
  u/borassi/include_igraph_library   |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by ncohen):

 * status:  needs_review => needs_work


Comment:

 Helloooooooo Michele,

 I have not installed the two igraph packages yet (the reason will follow)
 but it seems that you did well with the 'dependencies' file. The 'IGRAPH'
 variable is a bit magic it's true: it is generated from the package's
 name, and you should find it in `SAGE_ROOT/build/make/Makefile` somewhere.
 If you look for `PYTHON_IGRAPH` you should see the dependency that you
 added in this 'dependencies' file.

 I added a small commit at `public/18929` that does not do anything smart.
 I flagged the new doctests with `# optional - python_igraph` so that they
 are only run if the `python_igraph` is installed (they would break
 otherwise), though there remains some problem to deal with: you cannot
 import 'igraph' in the (Di)Graph constructor, for this package is
 optional. I ran the tests before installing the package, and well..
 Everything break. Even this:

 {{{
 sage: Graph()
 ...
 ImportError: No module named igraph
 }}}

 Sooo perhaps you should 'detect' the presence of this module with
 something like that (unless you find something better):

 {{{
 try:
     import igraph
     _python_igraph_available = True
 except ImportError:
     _python_igraph_available = False
 }}}

 In the same way, your 'import igraph' in `GenericGraph.igraph_graph` would
 generate, when called on a machine on which the package is not installed,
 an `ImportError`. We usually try to give something easier to work with,
 like an error message advising to install a package named <package_name>
 to enable this feature.

 Have fuuuuuuun,

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/18929#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to