Skip to content

Commit

Permalink
Update build system to handle not compiling better
Browse files Browse the repository at this point in the history
  • Loading branch information
Batcastle committed May 11, 2024
1 parent 14740d2 commit 1ed8501
Show file tree
Hide file tree
Showing 41 changed files with 55 additions and 40 deletions.
15 changes: 15 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ../..
##############################################################
# #
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion usr/lib/python3/dist-packages/de_control/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# __init__.py
Expand Down
2 changes: 1 addition & 1 deletion usr/lib/python3/dist-packages/de_control/_common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# _common.py
Expand Down
2 changes: 1 addition & 1 deletion usr/lib/python3/dist-packages/de_control/immersion.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# immersion.py
Expand Down
2 changes: 1 addition & 1 deletion usr/lib/python3/dist-packages/de_control/modify.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# modify.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/UI/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# __init__.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/UI/confirm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# confirm.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/UI/error.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# error.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/UI/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# main.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/UI/progress.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# progress.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/UI/report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# report.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/UI/success.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# success.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/auto_partitioner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# auto_partitioner.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/check_internet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# check_internet.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/check_kernel_versions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# check_kernel_version.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/chroot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# chroot.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# common.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/engine.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# engine.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/installer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# installer.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# __init__.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/auto_login_set.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# auto_login_set.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/install_extras.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# install_extras.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/install_updates.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# install_updates.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/make_swap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# make_swap.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/make_user.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# make_user.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/master.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# master.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/purge.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# purge.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/set_locale.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# set_locale.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/set_time.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# set_time.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/set_wallpaper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# set_wallpaper.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/modules/verify_install.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# verify_install.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/oem/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# __init__.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/oem/post_install/UI.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# main.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/oem/post_install/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# __init__.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/oem/post_install/configure/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# __init__.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/oem/post_install/configure/keyboard.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# keyboard.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/oem/pre_install.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# pre_install.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/progress.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# progress.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/success.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.11
#!shebang
# -*- coding: utf-8 -*-
#
# success.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/tests/test_auto_partitioner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!shebang
# -*- coding: utf-8 -*-
#
# test_auto_partitioner.py
Expand Down
2 changes: 1 addition & 1 deletion usr/share/edamame/tests/test_common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!shebang
# -*- coding: utf-8 -*-
#
# test_common.py
Expand Down

0 comments on commit 1ed8501

Please sign in to comment.