Fix references to old egg-info directory.
This commit is contained in:
parent
d8d7a30ea6
commit
7323d5dd0d
10 changed files with 31 additions and 8 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -71,7 +71,11 @@ coverage.xml
|
|||
venv
|
||||
Vagrantfile
|
||||
.vagrant
|
||||
ansible.egg-info/
|
||||
# Backwards compatibility with `stable-2.9` and earlier branches.
|
||||
# Also used in the `devel` branch during early Ansible 2.10 development.
|
||||
/lib/ansible.egg-info/
|
||||
# First used in the `devel` branch during Ansible 2.10 development.
|
||||
/lib/ansible_base.egg-info/
|
||||
/shippable/
|
||||
/test/integration/cloud-config-*.*
|
||||
!/test/integration/cloud-config-*.*.template
|
||||
|
|
2
Makefile
2
Makefile
|
@ -169,7 +169,7 @@ clean:
|
|||
@echo "Cleaning up distutils stuff"
|
||||
rm -rf build
|
||||
rm -rf dist
|
||||
rm -rf lib/ansible.egg-info/
|
||||
rm -rf lib/ansible*.egg-info/
|
||||
@echo "Cleaning up byte compiled python stuff"
|
||||
find . -type f -regex ".*\.py[co]$$" -delete
|
||||
find . -type d -name "__pycache__" -delete
|
||||
|
|
|
@ -61,8 +61,11 @@ expr "$MANPATH" : "${PREFIX_MANPATH}.*" > /dev/null || prepend_path MANPATH "$PR
|
|||
# Do the work in a function so we don't repeat ourselves later
|
||||
gen_egg_info()
|
||||
{
|
||||
if [ -e "$PREFIX_PYTHONPATH/ansible.egg-info" ] ; then
|
||||
\rm -rf "$PREFIX_PYTHONPATH/ansible.egg-info"
|
||||
# check for current and past egg-info directory names
|
||||
if ls "$PREFIX_PYTHONPATH"/ansible*.egg-info >/dev/null 2>&1; then
|
||||
# bypass shell aliases with leading backslash
|
||||
# see https://github.com/ansible/ansible/pull/11967
|
||||
\rm -rf "$PREFIX_PYTHONPATH"/ansible*.egg-info
|
||||
fi
|
||||
$PYTHON_BIN setup.py egg_info
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
__requires__ = ['ansible']
|
||||
__requires__ = ['ansible_base']
|
||||
|
||||
|
||||
import errno
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
__metaclass__ = type
|
||||
__requires__ = ['ansible']
|
||||
__requires__ = ['ansible_base']
|
||||
|
||||
|
||||
import fcntl
|
||||
|
|
1
test/integration/targets/egg-info/aliases
Normal file
1
test/integration/targets/egg-info/aliases
Normal file
|
@ -0,0 +1 @@
|
|||
shippable/posix/group1
|
|
@ -0,0 +1,11 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import pkg_resources
|
||||
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
def run(self, terms, variables, **kwargs):
|
||||
return ['ok']
|
3
test/integration/targets/egg-info/tasks/main.yml
Normal file
3
test/integration/targets/egg-info/tasks/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
- name: Make sure pkg_resources can be imported by plugins
|
||||
debug:
|
||||
msg: "{{ lookup('import_pkg_resources') }}"
|
|
@ -355,12 +355,12 @@ def generate_egg_info(args):
|
|||
|
||||
# inclusion of the version number in the path is optional
|
||||
# see: https://setuptools.readthedocs.io/en/latest/formats.html#filename-embedded-metadata
|
||||
egg_info_path = ANSIBLE_LIB_ROOT + '-%s.egg-info' % ansible_version
|
||||
egg_info_path = ANSIBLE_LIB_ROOT + '_base-%s.egg-info' % ansible_version
|
||||
|
||||
if os.path.exists(egg_info_path):
|
||||
return
|
||||
|
||||
egg_info_path = ANSIBLE_LIB_ROOT + '.egg-info'
|
||||
egg_info_path = ANSIBLE_LIB_ROOT + '_base.egg-info'
|
||||
|
||||
if os.path.exists(egg_info_path):
|
||||
return
|
||||
|
|
|
@ -37,6 +37,7 @@ class UnversionedSource(SourceProvider):
|
|||
'.pytest_cache',
|
||||
'__pycache__',
|
||||
'ansible.egg-info',
|
||||
'ansible_base.egg-info',
|
||||
)
|
||||
|
||||
kill_sub_dir = {
|
||||
|
|
Loading…
Reference in a new issue