stephenmcd / mezzanine

CMS framework for Django
http://mezzanine.jupo.org
BSD 2-Clause "Simplified" License
4.75k stars 1.64k forks source link

Please use versionned shebang for bin scripts #1996

Closed niol closed 2 years ago

niol commented 3 years ago

Many distribution do not provide /usr/bin/python anymore when python2 is not installed. Binary scripts should use a versionned shebang. The fix is trivial:

--- django-mezzanine.orig/mezzanine/bin/mezzanine_project.py    2021-08-17 16:29:56.672828121 +0200
+++ django-mezzanine/mezzanine/bin/mezzanine_project.py 2021-08-17 17:52:59.403433003 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 import sys

 from django.conf import settings
jerivas commented 3 years ago

Thanks! Would you be interested in contributing a pull request?

jerivas commented 2 years ago

Sorry, I checked with django and it looks like they use the generic python in the shebang. Our manage.py file is just a copy of that so we'll just follow their lead there.

I'm assuming once a virtualenv is active (or any other isolation layer) the python executable is bound correctly.