From 3157b439be6387da0fee4a0504ccfaeaea564357 Mon Sep 17 00:00:00 2001 From: Andrew Toskin Date: Jun 23 2020 23:34:29 +0000 Subject: Replace env shebangs, and unversioned python shebangs --- diff --git a/bleachbit.spec b/bleachbit.spec index 5fb58ae..f7be8b9 100644 --- a/bleachbit.spec +++ b/bleachbit.spec @@ -64,6 +64,9 @@ EOF # Disable update notifications, since package will be updated by DNF or Packagekit. sed 's/online_update_notification_enabled = True/online_update_notification_enabled = False/g' --in-place ./bleachbit/__init__.py +# Replace env shebangs, and calls to unversioned or unnecessarily specifically versioned python. +find ./ -type f -name '*.py' -exec sed --regexp-extended '1s|^#! ?/usr/bin/env python3?$|#!%{_bindir}/python3|g' --in-place '{}' + +find ./ -type f -name '*.py' -exec sed --regexp-extended '1s|^#! ?/usr/bin/python[[:digit:][:punct:]]*$|#!%{_bindir}/python3|g' --in-place '{}' + %build