Repository: dmwm/wmcore
Issue: REST/Main has a hard-wired python2 command

**Impact of the bug**
WMCore in general (and likely other dependencies, like CRAB, DBS and T0)

**Describe the bug**
While running the first test of WMCore central services with python3, even a `status` command was failing with:
```
ImportError: No module named builtins
```

after some debugging, I found out that this line:
https://github.com/dmwm/WMCore/blob/master/src/python/WMCore/REST/Main.py#L515

actually replaces the current process/command that we have executed with python3, but this time it uses the system python2 binary, as can be seen in this debugging/stdout [1]. Here is the documentation for the `execvp` method:
https://docs.python.org/3.8/library/os.html

**How to reproduce it**
Deploy a Py3 reqmgr2 and run `(A=/data/cfg/admin; cd /data; $A/InstallDev -s status:reqmgr2)`

**Expected behavior**
When spawning/replacing a new python REST process, we should take the current python interpreter into consideration. Such that it uses the same python version when creating a new process.
 
**Additional context and error message**
[1]
```
amaltaro@alancc7-cloud2:/data/srv/current $ (A=/data/cfg/admin; cd /data; $A/InstallDev -s status:reqmgr2)
+ cmd='/data/srv/current/config/reqmgr2/manage status '\\''I did read documentation'\\'''
+ case $MULTIACC in
+ sudo -H -u _reqmgr2 bashs -lc '/data/srv/current/config/reqmgr2/manage status '\\''I did read documentation'\\'''
ROOT /data/srv/current
ME reqmgr2
Status STATEDIR /data/srv/state/reqmgr2 and CFGFILE /data/srv/current/config/reqmgr2/config.py
Python version: sys.version_info(major=3, minor=8, micro=2, releaselevel='final', serial=0)
Main: sys.version_info(major=3, minor=8, micro=2, releaselevel='final', serial=0)
Calling main: sys.version_info(major=3, minor=8, micro=2, releaselevel='final', serial=0)
in main with argv: ['/data/srv/HG2106d-comp3/sw.amaltaro/slc7_amd64_gcc630/cms/reqmgr2/1.4.9.pre6/bin/wmc-httpd', '-s', '-d', '/data/srv/state/reqmgr2', '/data/srv/current/config/reqmgr2/config.py']
Python version: sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)
Main: sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)
Traceback (most recent call last):
  File "/data/srv/HG2106d-comp3/sw.amaltaro/slc7_amd64_gcc630/cms/reqmgr2/1.4.9.pre6/bin/wmc-httpd", line 4, in <module>
    from WMCore.REST.Main import main
  File "/data/srv/HG2106d-comp3/sw.amaltaro/slc7_amd64_gcc630/cms/reqmgr2/1.4.9.pre6/lib/python3.8/site-packages/WMCore/REST/Main.py", line 13, in <module>
    from builtins import object
ImportError: No module named builtins
Status done
```

Changed files:
src/python/WMCore/REST/Main.py

diff --git a/src/python/WMCore/REST/Main.py b/src/python/WMCore/REST/Main.py
index c6e025d46..48190dae7 100644
--- a/src/python/WMCore/REST/Main.py
+++ b/src/python/WMCore/REST/Main.py
@@ -512,7 +512,10 @@ def main():
     # when infrequently accessed server redirects output to 'rotatelogs'.
     if 'PYTHONUNBUFFERED' not in os.environ:
         os.environ['PYTHONUNBUFFERED'] = "1"
-        os.execvp("python", ["python"] + sys.argv)
+        if PY2:
+            os.execvp("python", ["python"] + sys.argv)
+        else:
+            os.execvp("python3", ["python3"] + sys.argv)
 
     opt = ArgumentParser(usage=__doc__)
     opt.add_argument("-q", "--quiet", action="store_true", dest="quiet", default=False,