baroquesoftware / pypy.packages

http://baroquesoftware.com/pypy.space/web
13 stars 14 forks source link

pygraphviz false-negative #7

Open gmacon opened 8 years ago

gmacon commented 8 years ago

http://packages.pypy.org/##pygraphviz indicates that pygraphviz does not work with PyPy, but the error is actually that the underlying graphviz library is not installed in the test environment. Here's what I get when I try to install pygraphviz into a pypy virtualenv:

Script started on Mon Sep 12 20:09:17 2016
command: /bin/bash
bash-3.2$ python --version
Python 2.7.10 (7e8df3df9641, Jun 14 2016, 13:30:54)
[PyPy 5.3.1 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]
bash-3.2$ pip install pygraphviz
You are using pip version 6.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pygraphviz
  Using cached pygraphviz-1.3.1.zip
Installing collected packages: pygraphviz
  Running setup.py install for pygraphviz
Successfully installed pygraphviz-1.3.1
bash-3.2$ exit

Script done on Mon Sep 12 20:09:47 2016
xando commented 8 years ago

Hey, thanks for the report.

We are running this on ubuntu Ubuntu 14.04.3 LTS, and does not work out of the box. My best guess is, there is a missing dependency in system packages and/or there is more configuration needed to make it work.

A Note: both graphviz and graphviz-dev are installed via apt.

On Tue, Sep 13, 2016 at 2:12 AM, George Macon notifications@github.com wrote:

http://packages.pypy.org/##pygraphviz indicates that pygraphviz does not work with PyPy, but the error is actually that the underlying graphviz library is not installed in the test environment. Here's what I get when I try to install pygraphviz into a pypy virtualenv:

Script started on Mon Sep 12 20:09:17 2016 command: /bin/bash bash-3.2$ python --version Python 2.7.10 (7e8df3df9641, Jun 14 2016, 13:30:54) [PyPy 5.3.1 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] bash-3.2$ pip install pygraphviz You are using pip version 6.1.1, however version 8.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting pygraphviz Using cached pygraphviz-1.3.1.zip Installing collected packages: pygraphviz Running setup.py install for pygraphviz Successfully installed pygraphviz-1.3.1 bash-3.2$ exit

Script done on Mon Sep 12 20:09:47 2016

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/baroquesoftware/pypy.packages/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJMuJUEovlTL4hx28O9BD8s0eXzuquOks5qpepdgaJpZM4J7KkA .

gmacon commented 8 years ago

Interesting. I spun up a vm, downloaded pypy 5.4.1, installed build-essential, pkg-config, graphviz, and graphviz-dev. ./pip install pygraphviz works, but import fails. Maybe it's not as working as I thought.

Python 2.7.10 (c95650101a99, Sep 06 2016, 11:10:29)
[PyPy 5.4.1 with GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>> import pygraphviz
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vagrant/pypy2-v5.4.1-linux64/site-packages/pygraphviz/__init__.py", line 58, in <module>
    from .agraph import AGraph, Node, Edge, Attribute, ItemAttribute, DotError
  File "/home/vagrant/pypy2-v5.4.1-linux64/site-packages/pygraphviz/agraph.py", line 26, in <module>
    from . import graphviz as gv
  File "/home/vagrant/pypy2-v5.4.1-linux64/site-packages/pygraphviz/graphviz.py", line 28, in <module>
    _graphviz = swig_import_helper()
  File "/home/vagrant/pypy2-v5.4.1-linux64/site-packages/pygraphviz/graphviz.py", line 24, in swig_import_helper
    _mod = imp.load_module('_graphviz', fp, pathname, description)
ImportError: unable to load extension module '/home/vagrant/pypy2-v5.4.1-linux64/site-packages/pygraphviz/_graphviz.pypy-41.so': /home/vagrant/pypy2-v5.4.1-linux64/site-packages/pygraphviz/_graphviz.pypy-41.so: undefined symbol: Agundirected