ocket8888 commented on a change in pull request #4763:
URL: https://github.com/apache/trafficcontrol/pull/4763#discussion_r577819103



##########
File path: traffic_ops/install/bin/postinstall.py
##########
@@ -0,0 +1,1344 @@
+#!/usr/bin/env -S sh -c 'PATH="${PATH}:/usr/libexec" exec "$(type -p python 
platform-python | head -n1)" "$0" "$@"'

Review comment:
       Turning a Python script into a polyglot bash script seems convoluted. 
Can I not just use `#!/usr/bin/env python3` or `#!/bin/sh -c 
'PATH="${PATH}:/usr/libexec"; exec "$(type -p python3 platform-python | head 
-n1)" "$0" "$@"'` ? Why does `env` need so much hand-holding? If 
`platform-python` isn't in the `PATH` should I be using it at all? [The RedHat 
Developer 
Blog](https://developers.redhat.com/blog/2018/11/14/python-in-rhel-8/) says no:
   
   > _"If you are not re-building the distro, do not use Platform-Python 
directly. Install `python3` and use that."_
   
   and later reiterates:
   
   > _"Do not use platform-python for your applications. However, use 
platform-python if you are writing system/admin code for RHEL 8."_




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to