From 1ed85013582cdfaea7b59646e1415afa8205162a Mon Sep 17 00:00:00 2001 From: Thomas Castleman Date: Fri, 10 May 2024 22:41:30 -0400 Subject: [PATCH] Update build system to handle not compiling better --- build.sh | 15 +++++++++++++++ .../python3/dist-packages/de_control/__init__.py | 2 +- .../python3/dist-packages/de_control/_common.py | 2 +- .../python3/dist-packages/de_control/immersion.py | 2 +- .../python3/dist-packages/de_control/modify.py | 2 +- usr/share/edamame/UI/__init__.py | 2 +- usr/share/edamame/UI/confirm.py | 2 +- usr/share/edamame/UI/error.py | 2 +- usr/share/edamame/UI/main.py | 2 +- usr/share/edamame/UI/progress.py | 2 +- usr/share/edamame/UI/report.py | 2 +- usr/share/edamame/UI/success.py | 2 +- usr/share/edamame/auto_partitioner.py | 2 +- usr/share/edamame/check_internet.py | 2 +- usr/share/edamame/check_kernel_versions.py | 2 +- usr/share/edamame/chroot.py | 2 +- usr/share/edamame/common.py | 2 +- usr/share/edamame/engine.py | 2 +- usr/share/edamame/installer.py | 2 +- usr/share/edamame/modules/__init__.py | 2 +- usr/share/edamame/modules/auto_login_set.py | 2 +- usr/share/edamame/modules/install_extras.py | 2 +- usr/share/edamame/modules/install_updates.py | 2 +- usr/share/edamame/modules/make_swap.py | 2 +- usr/share/edamame/modules/make_user.py | 2 +- usr/share/edamame/modules/master.py | 2 +- usr/share/edamame/modules/purge.py | 2 +- usr/share/edamame/modules/set_locale.py | 2 +- usr/share/edamame/modules/set_time.py | 2 +- usr/share/edamame/modules/set_wallpaper.py | 2 +- usr/share/edamame/modules/verify_install.py | 2 +- usr/share/edamame/oem/__init__.py | 2 +- usr/share/edamame/oem/post_install/UI.py | 2 +- usr/share/edamame/oem/post_install/__init__.py | 2 +- .../oem/post_install/configure/__init__.py | 2 +- .../oem/post_install/configure/keyboard.py | 2 +- usr/share/edamame/oem/pre_install.py | 2 +- usr/share/edamame/progress.py | 2 +- usr/share/edamame/success.py | 2 +- usr/share/edamame/tests/test_auto_partitioner.py | 2 +- usr/share/edamame/tests/test_common.py | 2 +- 41 files changed, 55 insertions(+), 40 deletions(-) diff --git a/build.sh b/build.sh index 42580c8..2de9e34 100755 --- a/build.sh +++ b/build.sh @@ -78,6 +78,18 @@ fi echo "Build failed. Try making sure you have 'python${vert}-dev' and 'libpython${vert}-dev' installed" 1>&2 exit 2 } +files_to_edit=$(find "." -maxdepth 10 -type f -name '*.py' -print) +shebang='#!/usr/bin/env' +if [ "$vert" == "dnc" ]; then + shebang="$shebang python3" +elif [ "$vert" == "3.11" ]; then + shebang="$shebang python3.11" +elif [ "$vert" == "3.12" ]; then + shebang="$shebang python3.12" +fi +for each in $files_to_edit; do + sed -i "s/#\!shebang/$shebang/" $each +done cd ../.. ############################################################## # # @@ -169,3 +181,6 @@ fi #build the shit dpkg-deb --build "$FOLDER" rm -rf "$FOLDER" +for each in $files_to_edit; do + sed -i "s/$shebang/#\!shebang/" $each +done diff --git a/usr/lib/python3/dist-packages/de_control/__init__.py b/usr/lib/python3/dist-packages/de_control/__init__.py index 5e2045c..12cc9fa 100644 --- a/usr/lib/python3/dist-packages/de_control/__init__.py +++ b/usr/lib/python3/dist-packages/de_control/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # __init__.py diff --git a/usr/lib/python3/dist-packages/de_control/_common.py b/usr/lib/python3/dist-packages/de_control/_common.py index 9231f0e..9402091 100755 --- a/usr/lib/python3/dist-packages/de_control/_common.py +++ b/usr/lib/python3/dist-packages/de_control/_common.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # _common.py diff --git a/usr/lib/python3/dist-packages/de_control/immersion.py b/usr/lib/python3/dist-packages/de_control/immersion.py index f54e88e..5a62fe8 100644 --- a/usr/lib/python3/dist-packages/de_control/immersion.py +++ b/usr/lib/python3/dist-packages/de_control/immersion.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # immersion.py diff --git a/usr/lib/python3/dist-packages/de_control/modify.py b/usr/lib/python3/dist-packages/de_control/modify.py index 2c752e5..7f6474e 100644 --- a/usr/lib/python3/dist-packages/de_control/modify.py +++ b/usr/lib/python3/dist-packages/de_control/modify.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # modify.py diff --git a/usr/share/edamame/UI/__init__.py b/usr/share/edamame/UI/__init__.py index f0146f3..0e76250 100755 --- a/usr/share/edamame/UI/__init__.py +++ b/usr/share/edamame/UI/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # __init__.py diff --git a/usr/share/edamame/UI/confirm.py b/usr/share/edamame/UI/confirm.py index f91d2b3..e8f00c8 100755 --- a/usr/share/edamame/UI/confirm.py +++ b/usr/share/edamame/UI/confirm.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # confirm.py diff --git a/usr/share/edamame/UI/error.py b/usr/share/edamame/UI/error.py index 4ca456a..b5502cc 100755 --- a/usr/share/edamame/UI/error.py +++ b/usr/share/edamame/UI/error.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # error.py diff --git a/usr/share/edamame/UI/main.py b/usr/share/edamame/UI/main.py index e7eb3fa..1254aa8 100755 --- a/usr/share/edamame/UI/main.py +++ b/usr/share/edamame/UI/main.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # main.py diff --git a/usr/share/edamame/UI/progress.py b/usr/share/edamame/UI/progress.py index f3cb345..5fe42d4 100755 --- a/usr/share/edamame/UI/progress.py +++ b/usr/share/edamame/UI/progress.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # progress.py diff --git a/usr/share/edamame/UI/report.py b/usr/share/edamame/UI/report.py index 2a87d7d..1e258e0 100755 --- a/usr/share/edamame/UI/report.py +++ b/usr/share/edamame/UI/report.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # report.py diff --git a/usr/share/edamame/UI/success.py b/usr/share/edamame/UI/success.py index abfcca3..95e9b6a 100755 --- a/usr/share/edamame/UI/success.py +++ b/usr/share/edamame/UI/success.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # success.py diff --git a/usr/share/edamame/auto_partitioner.py b/usr/share/edamame/auto_partitioner.py index 8aad8f9..d5e5f49 100755 --- a/usr/share/edamame/auto_partitioner.py +++ b/usr/share/edamame/auto_partitioner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # auto_partitioner.py diff --git a/usr/share/edamame/check_internet.py b/usr/share/edamame/check_internet.py index fe63dda..f1579d8 100755 --- a/usr/share/edamame/check_internet.py +++ b/usr/share/edamame/check_internet.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # check_internet.py diff --git a/usr/share/edamame/check_kernel_versions.py b/usr/share/edamame/check_kernel_versions.py index 9408ad1..f492f43 100755 --- a/usr/share/edamame/check_kernel_versions.py +++ b/usr/share/edamame/check_kernel_versions.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # check_kernel_version.py diff --git a/usr/share/edamame/chroot.py b/usr/share/edamame/chroot.py index 8118b7d..fa997c9 100755 --- a/usr/share/edamame/chroot.py +++ b/usr/share/edamame/chroot.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # chroot.py diff --git a/usr/share/edamame/common.py b/usr/share/edamame/common.py index a9e1a0a..bf9ba8d 100644 --- a/usr/share/edamame/common.py +++ b/usr/share/edamame/common.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # common.py diff --git a/usr/share/edamame/engine.py b/usr/share/edamame/engine.py index 17aabf9..4457f20 100755 --- a/usr/share/edamame/engine.py +++ b/usr/share/edamame/engine.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # engine.py diff --git a/usr/share/edamame/installer.py b/usr/share/edamame/installer.py index 314196f..143260e 100755 --- a/usr/share/edamame/installer.py +++ b/usr/share/edamame/installer.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # installer.py diff --git a/usr/share/edamame/modules/__init__.py b/usr/share/edamame/modules/__init__.py index 1def1a1..6674a11 100755 --- a/usr/share/edamame/modules/__init__.py +++ b/usr/share/edamame/modules/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # __init__.py diff --git a/usr/share/edamame/modules/auto_login_set.py b/usr/share/edamame/modules/auto_login_set.py index 477590f..1a580ed 100755 --- a/usr/share/edamame/modules/auto_login_set.py +++ b/usr/share/edamame/modules/auto_login_set.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # auto_login_set.py diff --git a/usr/share/edamame/modules/install_extras.py b/usr/share/edamame/modules/install_extras.py index 53a6b9a..1c9a8ea 100644 --- a/usr/share/edamame/modules/install_extras.py +++ b/usr/share/edamame/modules/install_extras.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # install_extras.py diff --git a/usr/share/edamame/modules/install_updates.py b/usr/share/edamame/modules/install_updates.py index b94a981..2585deb 100755 --- a/usr/share/edamame/modules/install_updates.py +++ b/usr/share/edamame/modules/install_updates.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # install_updates.py diff --git a/usr/share/edamame/modules/make_swap.py b/usr/share/edamame/modules/make_swap.py index 0926e03..0f421a1 100755 --- a/usr/share/edamame/modules/make_swap.py +++ b/usr/share/edamame/modules/make_swap.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # make_swap.py diff --git a/usr/share/edamame/modules/make_user.py b/usr/share/edamame/modules/make_user.py index fcf3255..963eb0b 100755 --- a/usr/share/edamame/modules/make_user.py +++ b/usr/share/edamame/modules/make_user.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # make_user.py diff --git a/usr/share/edamame/modules/master.py b/usr/share/edamame/modules/master.py index 8068305..00dfd3b 100755 --- a/usr/share/edamame/modules/master.py +++ b/usr/share/edamame/modules/master.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # master.py diff --git a/usr/share/edamame/modules/purge.py b/usr/share/edamame/modules/purge.py index 1757b74..a66d3e6 100755 --- a/usr/share/edamame/modules/purge.py +++ b/usr/share/edamame/modules/purge.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # purge.py diff --git a/usr/share/edamame/modules/set_locale.py b/usr/share/edamame/modules/set_locale.py index e6c29f0..e68564f 100755 --- a/usr/share/edamame/modules/set_locale.py +++ b/usr/share/edamame/modules/set_locale.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # set_locale.py diff --git a/usr/share/edamame/modules/set_time.py b/usr/share/edamame/modules/set_time.py index f70a726..a75c072 100755 --- a/usr/share/edamame/modules/set_time.py +++ b/usr/share/edamame/modules/set_time.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # set_time.py diff --git a/usr/share/edamame/modules/set_wallpaper.py b/usr/share/edamame/modules/set_wallpaper.py index 0ac132c..d308970 100755 --- a/usr/share/edamame/modules/set_wallpaper.py +++ b/usr/share/edamame/modules/set_wallpaper.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # set_wallpaper.py diff --git a/usr/share/edamame/modules/verify_install.py b/usr/share/edamame/modules/verify_install.py index 124ab00..e13a3d0 100755 --- a/usr/share/edamame/modules/verify_install.py +++ b/usr/share/edamame/modules/verify_install.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # verify_install.py diff --git a/usr/share/edamame/oem/__init__.py b/usr/share/edamame/oem/__init__.py index 0721a1b..a2b4470 100755 --- a/usr/share/edamame/oem/__init__.py +++ b/usr/share/edamame/oem/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # __init__.py diff --git a/usr/share/edamame/oem/post_install/UI.py b/usr/share/edamame/oem/post_install/UI.py index 5aec608..e2f3e51 100755 --- a/usr/share/edamame/oem/post_install/UI.py +++ b/usr/share/edamame/oem/post_install/UI.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # main.py diff --git a/usr/share/edamame/oem/post_install/__init__.py b/usr/share/edamame/oem/post_install/__init__.py index 50fe7e8..6fabda0 100755 --- a/usr/share/edamame/oem/post_install/__init__.py +++ b/usr/share/edamame/oem/post_install/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # __init__.py diff --git a/usr/share/edamame/oem/post_install/configure/__init__.py b/usr/share/edamame/oem/post_install/configure/__init__.py index 652fe6f..a97b8a7 100755 --- a/usr/share/edamame/oem/post_install/configure/__init__.py +++ b/usr/share/edamame/oem/post_install/configure/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # __init__.py diff --git a/usr/share/edamame/oem/post_install/configure/keyboard.py b/usr/share/edamame/oem/post_install/configure/keyboard.py index a84da30..6d07ec1 100755 --- a/usr/share/edamame/oem/post_install/configure/keyboard.py +++ b/usr/share/edamame/oem/post_install/configure/keyboard.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # keyboard.py diff --git a/usr/share/edamame/oem/pre_install.py b/usr/share/edamame/oem/pre_install.py index 566cea7..099077d 100755 --- a/usr/share/edamame/oem/pre_install.py +++ b/usr/share/edamame/oem/pre_install.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # pre_install.py diff --git a/usr/share/edamame/progress.py b/usr/share/edamame/progress.py index d763b39..2600801 100755 --- a/usr/share/edamame/progress.py +++ b/usr/share/edamame/progress.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # progress.py diff --git a/usr/share/edamame/success.py b/usr/share/edamame/success.py index 0fc6bd8..a8f317b 100755 --- a/usr/share/edamame/success.py +++ b/usr/share/edamame/success.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.11 +#!shebang # -*- coding: utf-8 -*- # # success.py diff --git a/usr/share/edamame/tests/test_auto_partitioner.py b/usr/share/edamame/tests/test_auto_partitioner.py index 1e98e8e..28cf4a7 100755 --- a/usr/share/edamame/tests/test_auto_partitioner.py +++ b/usr/share/edamame/tests/test_auto_partitioner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!shebang # -*- coding: utf-8 -*- # # test_auto_partitioner.py diff --git a/usr/share/edamame/tests/test_common.py b/usr/share/edamame/tests/test_common.py index 3236aa4..515f5ba 100755 --- a/usr/share/edamame/tests/test_common.py +++ b/usr/share/edamame/tests/test_common.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!shebang # -*- coding: utf-8 -*- # # test_common.py