From: Sergio Durigan Junior <sergiodj@sergiodj.net>
Date: Wed, 29 Jan 2020 22:57:09 -0500
Subject: Fix Python shebang for various scripts

Pagure ships with the "/usr/bin/env python" shebang, which doesn't
work on Debian because "python" refers to Python 2.  This patch
replaces every occurrence of this by "/usr/bin/python3".

For more info: https://pagure.io/pagure/issue/4725
---
 createdb.py                                     | 2 +-
 files/aclchecker.py                             | 2 +-
 files/api_key_expire_mail.py                    | 2 +-
 files/emoji_clean_json.py                       | 2 +-
 files/keyhelper.py                              | 2 +-
 files/mirror_project_in.py                      | 2 +-
 files/pagure_mirror_project_in.service          | 2 +-
 pagure-ev/pagure_stream_server.py               | 2 +-
 pagure-milters/comment_email_milter.py          | 2 +-
 pagure/hooks/files/git_multimail_upstream.py    | 2 +-
 pagure/hooks/files/hookrunner                   | 2 +-
 pagure/hooks/files/post-receive                 | 2 +-
 pagure/hooks/files/pre-receive                  | 2 +-
 pagure/hooks/files/repospannerhook              | 2 +-
 setup.py                                        | 2 +-
 tests/test_fnmatch.py                           | 2 +-
 tests/test_pagure_flask_ui_issues_acl_checks.py | 2 +-
 tests/test_stream_server.py                     | 2 +-
 tests/test_style.py                             | 2 +-
 19 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/createdb.py b/createdb.py
index 3860b51..5bbcd14 100644
--- a/createdb.py
+++ b/createdb.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 from __future__ import print_function, unicode_literals, absolute_import
 
diff --git a/files/aclchecker.py b/files/aclchecker.py
index ee5cb01..1657123 100644
--- a/files/aclchecker.py
+++ b/files/aclchecker.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
diff --git a/files/api_key_expire_mail.py b/files/api_key_expire_mail.py
index a9befb9..15bd0f6 100755
--- a/files/api_key_expire_mail.py
+++ b/files/api_key_expire_mail.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 from __future__ import print_function, absolute_import
 import os
diff --git a/files/emoji_clean_json.py b/files/emoji_clean_json.py
index 8a91fa4..25fafbd 100644
--- a/files/emoji_clean_json.py
+++ b/files/emoji_clean_json.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 from __future__ import print_function, absolute_import
 import json
diff --git a/files/keyhelper.py b/files/keyhelper.py
index c949c10..9c25a75 100644
--- a/files/keyhelper.py
+++ b/files/keyhelper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
diff --git a/files/mirror_project_in.py b/files/mirror_project_in.py
index 7a6a306..616ddab 100644
--- a/files/mirror_project_in.py
+++ b/files/mirror_project_in.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 from __future__ import print_function, absolute_import
 import os
diff --git a/files/pagure_mirror_project_in.service b/files/pagure_mirror_project_in.service
index 4a3a3ee..71f35da 100644
--- a/files/pagure_mirror_project_in.service
+++ b/files/pagure_mirror_project_in.service
@@ -3,7 +3,7 @@ Description=Pagure service to mirror in projects
 Documentation=https://pagure.io/pagure
 
 [Service]
-ExecStart=/usr/bin/python /usr/share/pagure/mirror_project_in.py
+ExecStart=/usr/bin/python3 /usr/share/pagure/mirror_project_in.py
 Environment="PAGURE_CONFIG=/etc/pagure/pagure.cfg"
 Type=simple
 User=git
diff --git a/pagure-ev/pagure_stream_server.py b/pagure-ev/pagure_stream_server.py
index d1aeb00..f556916 100644
--- a/pagure-ev/pagure_stream_server.py
+++ b/pagure-ev/pagure_stream_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 """
  (c) 2015-2017 - Copyright Red Hat Inc
diff --git a/pagure-milters/comment_email_milter.py b/pagure-milters/comment_email_milter.py
index 54a2b6f..4ee40e6 100644
--- a/pagure-milters/comment_email_milter.py
+++ b/pagure-milters/comment_email_milter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 # Milter calls methods of your class at milter events.
diff --git a/pagure/hooks/files/git_multimail_upstream.py b/pagure/hooks/files/git_multimail_upstream.py
index 0780563..65b165f 100755
--- a/pagure/hooks/files/git_multimail_upstream.py
+++ b/pagure/hooks/files/git_multimail_upstream.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 __version__ = "1.4.0"
 
diff --git a/pagure/hooks/files/hookrunner b/pagure/hooks/files/hookrunner
index 0708665..9302618 100755
--- a/pagure/hooks/files/hookrunner
+++ b/pagure/hooks/files/hookrunner
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
diff --git a/pagure/hooks/files/post-receive b/pagure/hooks/files/post-receive
index 0708665..9302618 100755
--- a/pagure/hooks/files/post-receive
+++ b/pagure/hooks/files/post-receive
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
diff --git a/pagure/hooks/files/pre-receive b/pagure/hooks/files/pre-receive
index 0708665..9302618 100755
--- a/pagure/hooks/files/pre-receive
+++ b/pagure/hooks/files/pre-receive
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
diff --git a/pagure/hooks/files/repospannerhook b/pagure/hooks/files/repospannerhook
index 80e0a90..22fac80 100755
--- a/pagure/hooks/files/repospannerhook
+++ b/pagure/hooks/files/repospannerhook
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
diff --git a/setup.py b/setup.py
index c7d9aa6..5fa00ea 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 """
 Setup script
diff --git a/tests/test_fnmatch.py b/tests/test_fnmatch.py
index 18e1eff..295a8f5 100644
--- a/tests/test_fnmatch.py
+++ b/tests/test_fnmatch.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
diff --git a/tests/test_pagure_flask_ui_issues_acl_checks.py b/tests/test_pagure_flask_ui_issues_acl_checks.py
index f8bc550..b2f027f 100644
--- a/tests/test_pagure_flask_ui_issues_acl_checks.py
+++ b/tests/test_pagure_flask_ui_issues_acl_checks.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # coding=utf-8
 
 """
diff --git a/tests/test_stream_server.py b/tests/test_stream_server.py
index 0139094..e2c8d21 100644
--- a/tests/test_stream_server.py
+++ b/tests/test_stream_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
diff --git a/tests/test_style.py b/tests/test_style.py
index 717b814..9e37ede 100644
--- a/tests/test_style.py
+++ b/tests/test_style.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 
 """
