Skip to content

Commit

Permalink
fix: make sure pip install from github works
Browse files Browse the repository at this point in the history
pip install from github was failing with the following error:

```
× python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/8l/klypdyl51dvb7_1kztfgsv8m0000gn/T/pip-req-build-vx02zbxx/setup.py", line 20, in <module>
          from ansibleplaybookgrapher import __version__, __prog__
        File "/private/var/folders/8l/klypdyl51dvb7_1kztfgsv8m0000gn/T/pip-req-build-vx02zbxx/ansibleplaybookgrapher/__init__.py", line 18, in <module>
          from ansible.utils.display import Display
      ModuleNotFoundError: No module named 'ansible'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.
```
  • Loading branch information
haidaraM committed Mar 23, 2024
1 parent 888ff45 commit 35b607c
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
2 changes: 0 additions & 2 deletions ansibleplaybookgrapher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
from .graph_model import PlaybookNode, PlayNode, TaskNode, RoleNode, BlockNode
from .parser import PlaybookParser

__version__ = "2.1.2"
__prog__ = "ansible-playbook-grapher"

display = Display()

Expand Down
3 changes: 2 additions & 1 deletion ansibleplaybookgrapher/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
from ansible.release import __version__ as ansible_version
from ansible.utils.display import Display

from ansibleplaybookgrapher import __prog__, __version__, Grapher
from ansibleplaybookgrapher import Grapher
from ansibleplaybookgrapher.version import __prog__, __version__
from ansibleplaybookgrapher.renderer import OPEN_PROTOCOL_HANDLERS
from ansibleplaybookgrapher.renderer.graphviz import GraphvizRenderer
from ansibleplaybookgrapher.renderer.mermaid import (
Expand Down
2 changes: 2 additions & 0 deletions ansibleplaybookgrapher/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__version__ = "2.2.0-dev"
__prog__ = "ansible-playbook-grapher"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from setuptools import setup, find_packages

from ansibleplaybookgrapher import __version__, __prog__
from ansibleplaybookgrapher.version import __version__, __prog__


def read_requirements(path):
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
from ansible.plugins.loader import init_plugin_loader

from ansibleplaybookgrapher import __prog__
from ansibleplaybookgrapher.version import __prog__
from ansibleplaybookgrapher.cli import PlaybookGrapherCLI
from tests import INVENTORY_FILE, FIXTURES_DIR

Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from ansible.errors import AnsibleOptionsError
from ansible.release import __version__ as ansible_version

from ansibleplaybookgrapher import __prog__, __version__
from ansibleplaybookgrapher.version import __prog__, __version__
from ansibleplaybookgrapher.cli import PlaybookGrapherCLI


Expand Down
2 changes: 1 addition & 1 deletion tests/test_graphviz_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest
from pyquery import PyQuery

from ansibleplaybookgrapher import __prog__
from ansibleplaybookgrapher.version import __prog__
from ansibleplaybookgrapher.cli import PlaybookGrapherCLI
from tests import FIXTURES_DIR

Expand Down
2 changes: 1 addition & 1 deletion tests/test_mermaid_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

from ansibleplaybookgrapher import __prog__
from ansibleplaybookgrapher.version import __prog__
from ansibleplaybookgrapher.cli import PlaybookGrapherCLI
from tests import FIXTURES_DIR

Expand Down

0 comments on commit 35b607c

Please sign in to comment.