diff options
author | Zuul <zuul@review.opendev.org> | 2020-08-27 11:29:44 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-08-27 11:29:44 +0000 |
commit | 312a550c3def2d734d966530d7cb34c1353e5770 (patch) | |
tree | bacc70bbd81ffdd731ab564e46fe37692472fb93 | |
parent | 9aee4f71860ed557a0c873247530fb911292d590 (diff) | |
parent | 9a219f9a4f47243123d50d30938506bcc792e55d (diff) | |
download | pbr-312a550c3def2d734d966530d7cb34c1353e5770.tar.gz |
Merge "Use easy_install.ScriptWriter.get_header()"
-rw-r--r-- | pbr/packaging.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pbr/packaging.py b/pbr/packaging.py index a697992..68747b6 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -456,7 +456,11 @@ class LocalInstallScripts(install_scripts.install_scripts): command_name = 'install_scripts' def _make_wsgi_scripts_only(self, dist, executable, is_wininst): - header = easy_install.get_script_header("", executable, is_wininst) + # get_script_header() is deprecated since Setuptools 12.0 + try: + header = easy_install.ScriptWriter.get_header("", executable) + except AttributeError: + header = easy_install.get_script_header("", executable, is_wininst) wsgi_script_template = ENTRY_POINTS_MAP['wsgi_scripts'] for name, ep in dist.get_entry_map('wsgi_scripts').items(): content = generate_script( |