Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build when libcgraph headers are accessible without additional include path #108

Merged
merged 1 commit into from
Nov 25, 2017

Conversation

thiblahute
Copy link

And where dpkg is not avalaible at all.

This is the case on arch linux

Currently installing latest RC version with pip (2 or 3) fails on arch linux:

  Running setup.py install for pygraphviz ... error
    Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-SnmpOq/pygraphviz/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ZtKgcM-record/install-record.txt --single-version-externally-managed --compile:
    running install
    Trying dpkg
    dpkg-query: no path found matching pattern *graphviz*
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-SnmpOq/pygraphviz/setup.py", line 93, in <module>
        tests_require=['nose>=0.10.1', 'doctest-ignore-unicode>=0.1.0', 'mock>=1.3'],
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "setup_commands.py", line 44, in modified_run
        self.include_path, self.library_path = get_graphviz_dirs()
      File "setup_extra.py", line 156, in get_graphviz_dirs
        include_dirs, library_dirs = _try_configure(include_dirs, library_dirs, _dpkg_config)
      File "setup_extra.py", line 115, in _try_configure
        i, l = try_function()
      File "setup_extra.py", line 47, in _dpkg_config
        output = S.check_output(['dpkg', '-S', 'graphviz'])
      File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
        raise CalledProcessError(retcode, cmd, output=output)
    subprocess.CalledProcessError: Command '['dpkg', '-S', 'graphviz']' returned non-zero exit status 1
    
    ----------------------------------------
  Rolling back uninstall of pygraphviz

…clude path

And where dpkg is not avalaible at all.

This is the case on arch linux
@coveralls
Copy link

coveralls commented Nov 29, 2016

Coverage Status

Coverage remained the same at 81.296% when pulling 18d7039 on thiblahute:master into ecbc387 on pygraphviz:master.

@thiblahute
Copy link
Author

Ping?

@mmarkov
Copy link
Contributor

mmarkov commented Dec 20, 2016

I think handling CalledProcessError makes sense, but I don't understand the reason of replacing or with and, we definitely need both for successful installation.

@hagberg hagberg merged commit 36120f2 into pygraphviz:master Nov 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants