1# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> 2# 3# This file is part of Ansible 4# 5# Ansible is free software: you can redistribute it and/or modify 6# it under the terms of the GNU General Public License as published by 7# the Free Software Foundation, either version 3 of the License, or 8# (at your option) any later version. 9# 10# Ansible is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# GNU General Public License for more details. 14# 15# You should have received a copy of the GNU General Public License 16# along with Ansible. If not, see <http://www.gnu.org/licenses/>. 17 18# Make coding more python3-ish 19from __future__ import (absolute_import, division, print_function) 20__metaclass__ = type 21 22# make vendored top-level modules accessible EARLY 23import ansible._vendor 24 25# patch Jinja2 >= 3.0 for backwards compatibility 26try: 27 import sys as _sys 28 from jinja2.filters import pass_context as _passctx, pass_environment as _passenv, pass_eval_context as _passevalctx 29 _mod = _sys.modules['jinja2.filters'] 30 _mod.contextfilter = _passctx 31 _mod.environmentfilter = _passenv 32 _mod.evalcontextfilter = _passevalctx 33except ImportError: 34 _sys = None 35 36# Note: Do not add any code to this file. The ansible module may be 37# a namespace package when using Ansible-2.1+ Anything in this file may not be 38# available if one of the other packages in the namespace is loaded first. 39# 40# This is for backwards compat. Code should be ported to get these from 41# ansible.release instead of from here. 42from ansible.release import __version__, __author__ 43