Skip to content
Snippets Groups Projects
  • Pierre Riteau's avatar
    1c7d17d1
    Fix detection of editable installation · 1c7d17d1
    Pierre Riteau authored
    When installing kolla-ansible with `pip install ./kolla-ansible`, pip
    always creates a direct_url.json file, even when not using an editable
    installation.
    
    We see this behaviour with Python 3.12, while direct_url.json is only
    created for editable installations on Python 3.9, which was used when
    this code was initially developed for Kayobe.
    
    When using a regular (non-editable) installation, this would make
    kolla-ansible invoke site.yml from the source directory instead of the
    virtualenv installation, causing a failure to load Ansible collections:
    
        Invalid plugin FQCN (ansible.utils.ipaddr): unable to locate collection ansible.utils
    
    Fix by returning the source URL only if dir_info.editable is True.
    
    Change-Id: Icdc2cedaa6a6e3a6b4351b1f4369e2e8b3a2dc97
    1c7d17d1
    History
    Fix detection of editable installation
    Pierre Riteau authored
    When installing kolla-ansible with `pip install ./kolla-ansible`, pip
    always creates a direct_url.json file, even when not using an editable
    installation.
    
    We see this behaviour with Python 3.12, while direct_url.json is only
    created for editable installations on Python 3.9, which was used when
    this code was initially developed for Kayobe.
    
    When using a regular (non-editable) installation, this would make
    kolla-ansible invoke site.yml from the source directory instead of the
    virtualenv installation, causing a failure to load Ansible collections:
    
        Invalid plugin FQCN (ansible.utils.ipaddr): unable to locate collection ansible.utils
    
    Fix by returning the source URL only if dir_info.editable is True.
    
    Change-Id: Icdc2cedaa6a6e3a6b4351b1f4369e2e8b3a2dc97