ansible / ansible-container

DEPRECATED -- Ansible Container was a tool to build Docker images and orchestrate containers using only Ansible playbooks.
GNU Lesser General Public License v3.0
2.19k stars 392 forks source link

Fixed import exception when using pip 10+ #931

Closed Xetius closed 6 years ago

Xetius commented 6 years ago
ISSUE TYPE
SUMMARY

When attempting to install ansible-container using pip 10+ you get an exception.

Collecting ansible-container
  Using cached https://files.pythonhosted.org/packages/bc/2a/b1252de3931173d26a30fc965be33c9cc0044cf7b23ce4c707f55d86830c/ansible-container-0.9.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/ll/f9vvzm_j29zczm6j89vqclyw0000gn/T/pip-install-qTUFXW/ansible-container/setup.py", line 10, in <module>
        from pip.req import parse_requirements
    ImportError: No module named req

Added a check around the import to handle that parse_requirements are now in pip._internal.req, instead of pip.req.

This fixes the issue with the following pull request : https://github.com/pypa/pip/pull/4700, which is not in pip 10+

gregdek commented 6 years ago

Fixed by #939 instead. Thanks!