From 44d6736a5ef7e2d1573a993ccb0a937a0ad086f2 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Wed, 16 Oct 2019 09:45:29 -0500 Subject: [PATCH] Be explicit about python3 executable Per best practices, explicitly use the python3 executable rather than assuming the platform with have a "python" executable that maps to python3. https://www.python.org/dev/peps/pep-0394/ Change-Id: I39b8a1013a891f4570f374d8faa3cfa2ecaf3347 Signed-off-by: Sean McGinnis --- openstack_releases/cmds/mail.py | 2 +- openstack_releases/pythonutils.py | 8 ++++---- openstack_releases/requirements.py | 2 +- tools/aclissues.py | 2 +- tools/aclmanager.py | 2 +- tools/discover_branch_points.py | 2 +- tools/list_weeks.py | 2 +- tools/membership_freeze_test.py | 2 +- tools/tag_history_from_git.py | 2 +- tools/verify_branches_and_late_releases.py | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/openstack_releases/cmds/mail.py b/openstack_releases/cmds/mail.py index a1c874ae80..c080d3b1fa 100644 --- a/openstack_releases/cmds/mail.py +++ b/openstack_releases/cmds/mail.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/openstack_releases/pythonutils.py b/openstack_releases/pythonutils.py index 008876b9a2..ba0ca41a7d 100644 --- a/openstack_releases/pythonutils.py +++ b/openstack_releases/pythonutils.py @@ -44,9 +44,9 @@ def get_sdist_name(workdir, repo): cwd=dest, ) if use_tox: - python = '.tox/venv/bin/python' + python = '.tox/venv/bin/python3' else: - python = 'python' + python = 'python3' # Run it once and discard the result to ensure any setup_requires # dependencies are installed. cmd = [python, 'setup.py', '--name'] @@ -77,9 +77,9 @@ def build_sdist(workdir, repo): cwd=dest, ) if use_tox: - python = '.tox/venv/bin/python' + python = '.tox/venv/bin/python3' else: - python = 'python' + python = 'python3' # Run it once and discard the result to ensure any setup_requires # dependencies are installed. cmd = [python, 'setup.py', 'sdist', 'bdist_wheel'] diff --git a/openstack_releases/requirements.py b/openstack_releases/requirements.py index 8372a4632e..24cff95a1a 100644 --- a/openstack_releases/requirements.py +++ b/openstack_releases/requirements.py @@ -88,7 +88,7 @@ def get_min_specifier(specifier_set): def get_requirements_at_ref(workdir, repo, ref): "Check out the repo at the ref and load the list of requirements." dest = gitutils.clone_repo(workdir, repo, ref=ref) - processutils.check_call(['python', 'setup.py', 'sdist'], cwd=dest) + processutils.check_call(['python3', 'setup.py', 'sdist'], cwd=dest) sdist_name = pythonutils.get_sdist_name(workdir, repo) requirements_filename = os.path.join( dest, sdist_name + '.egg-info', 'requires.txt', diff --git a/tools/aclissues.py b/tools/aclissues.py index a0f385bb82..c0603e033a 100755 --- a/tools/aclissues.py +++ b/tools/aclissues.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # # Tool to generate a patch to remove direct tagging / branch-creating # rights for official OpenStack deliverables diff --git a/tools/aclmanager.py b/tools/aclmanager.py index 90ddbc6590..3deb80bcbb 100755 --- a/tools/aclmanager.py +++ b/tools/aclmanager.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Handle pre-release / post-release ACLs for milestone-driven projects # diff --git a/tools/discover_branch_points.py b/tools/discover_branch_points.py index c439fb796b..d4734cbeb0 100755 --- a/tools/discover_branch_points.py +++ b/tools/discover_branch_points.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # # All Rights Reserved. # diff --git a/tools/list_weeks.py b/tools/list_weeks.py index ecb133b8dc..2857ac6777 100755 --- a/tools/list_weeks.py +++ b/tools/list_weeks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain diff --git a/tools/membership_freeze_test.py b/tools/membership_freeze_test.py index 383f9affa9..47b999f164 100644 --- a/tools/membership_freeze_test.py +++ b/tools/membership_freeze_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # List deliverables that appear in governance but not in releases # in preparation for MemberShipFreeze diff --git a/tools/tag_history_from_git.py b/tools/tag_history_from_git.py index 8c87ee22d4..863c51b955 100755 --- a/tools/tag_history_from_git.py +++ b/tools/tag_history_from_git.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # # All Rights Reserved. # diff --git a/tools/verify_branches_and_late_releases.py b/tools/verify_branches_and_late_releases.py index a894005385..8e49eee96a 100755 --- a/tools/verify_branches_and_late_releases.py +++ b/tools/verify_branches_and_late_releases.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # # Scan the releases for a series that came after the project's branch # and verify that they are all on the right branch.