summaryrefslogtreecommitdiffstats
path: root/xlators/experimental
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2018-03-28 10:14:39 -0400
committerShyamsundar Ranganathan <srangana@redhat.com>2018-04-12 11:04:27 +0000
commit29024cfdd5f131c7e3085cbddf9bd1cf60359960 (patch)
treedde994fdd25f742ac335ed8e20c1823b0a843694 /xlators/experimental
parentc4251edec654b4e0127577e004923d9729bc323d (diff)
core/build/various: python3 compat, prepare for python2 -> python3
Note 1) we're not supposed to be using #!/usr/bin/env python, see https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Shebang_lines Note 2) we're also not supposed to be using "!/usr/bin/python, see https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build#Quick_Opt-Out The previous patch (https://review.gluster.org/19767) tried to do too much in one patch, so it was abandoned. This patch does two things: 1) minor cleanup of configure(.ac) to explicitly use python2 2) change all the shebang lines to #!/usr/bin/python2 and add them where they were missing based on warnings emitted during rpmbuild. In a follow-up patch python2 will eventually be changed to python3. Before that python2-isms (e.g. print, string.join(), etc.) need to be converted to python3. Some of those can be rewritten in version agnostic python. E.g. print statements become print() with "from __future_ import print_function". The python 2to3 utility will be used for some of those. Also Aravinda has given guidance in the comments to the first patch for changes. updates: #411 Change-Id: I471730962b2526022115a1fc33629fb078b74338 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'xlators/experimental')
-rwxr-xr-xxlators/experimental/fdl/src/gen_dumper.py2
-rwxr-xr-xxlators/experimental/fdl/src/gen_fdl.py2
-rwxr-xr-xxlators/experimental/fdl/src/gen_recon.py2
-rwxr-xr-xxlators/experimental/jbr-client/src/gen-fops.py2
-rwxr-xr-xxlators/experimental/jbr-server/src/gen-fops.py2
5 files changed, 5 insertions, 5 deletions
diff --git a/xlators/experimental/fdl/src/gen_dumper.py b/xlators/experimental/fdl/src/gen_dumper.py
index 42db55d2cb3..2950be44e01 100755
--- a/xlators/experimental/fdl/src/gen_dumper.py
+++ b/xlators/experimental/fdl/src/gen_dumper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
import os
import re
diff --git a/xlators/experimental/fdl/src/gen_fdl.py b/xlators/experimental/fdl/src/gen_fdl.py
index d59f12a4841..136aa112861 100755
--- a/xlators/experimental/fdl/src/gen_fdl.py
+++ b/xlators/experimental/fdl/src/gen_fdl.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
import os
import sys
diff --git a/xlators/experimental/fdl/src/gen_recon.py b/xlators/experimental/fdl/src/gen_recon.py
index 57a5360a9f8..295df699f6e 100755
--- a/xlators/experimental/fdl/src/gen_recon.py
+++ b/xlators/experimental/fdl/src/gen_recon.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
import os
import re
diff --git a/xlators/experimental/jbr-client/src/gen-fops.py b/xlators/experimental/jbr-client/src/gen-fops.py
index 4d9451f7177..64bd8b06cae 100755
--- a/xlators/experimental/jbr-client/src/gen-fops.py
+++ b/xlators/experimental/jbr-client/src/gen-fops.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
import os
import re
diff --git a/xlators/experimental/jbr-server/src/gen-fops.py b/xlators/experimental/jbr-server/src/gen-fops.py
index c4a5556a8fa..2005e3932d4 100755
--- a/xlators/experimental/jbr-server/src/gen-fops.py
+++ b/xlators/experimental/jbr-server/src/gen-fops.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
# This script generates the boilerplate versions of most fops and cbks in the
# server. This allows the details of leadership-status checking, sequencing