Skip to content

Commit

Permalink
Fix Issue #105
Browse files Browse the repository at this point in the history
  • Loading branch information
Batcastle committed May 11, 2024
1 parent 60716d4 commit ca8ce6d
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,19 @@ fi

# Pshyc - we're compiling shit now
cd usr/bin
echo "Would you like to build with Python 3.10 or 3.11?"
read -p "Python 3.10 [1], Python 3.11 [2], Exit [0]: " ans
if $(echo "${ans,,}" | grep -qE "1|one|first|3.10"); then
vert="3.10"
echo "Would you like to build with Python 3.11, or 3.12?"
read -p "Exit [0], Do Not Compile [1], Python 3.11 [2], Python 3.12 [3], : " ans
if $(echo "${ans,,}" | grep -qE "1|one|first"); then
vert="dnc"
elif $(echo "${ans,,}" | grep -qE "2|two|second|3.11"); then
vert="3.11"
elif $(echo "${ans,,}" | grep -qE "3|three|third|3.12"); then
vert="3.12"
elif $(echo "${ans,,}" | grep -qE "exit|quit|leave|e|q|x|0|no|zero"); then
echo "Exiting as requested..."
exit 1
else
echo "Input not recognized. Defaulting to Python 3.10"
echo "Input not recognized. Defaulting to Python 3.11"
fi
{
g++ -fPIE -m64 -o edamame edamame.cxx
Expand Down Expand Up @@ -125,13 +127,15 @@ fi
# #
# #
##############################################################
cp nuitka_compile.sh ../"$FOLDER"/
cp compile.conf ../"$FOLDER"/
base="$PWD"
cd ../"$FOLDER"/
./nuitka_compile.sh --python-ver=$vert
rm -v nuitka_compile.sh compile.conf
cd "$base"
if [[ "$vert" != "dnc" ]]; then
cp nuitka_compile.sh ../"$FOLDER"/
cp compile.conf ../"$FOLDER"/
base="$PWD"
cd ../"$FOLDER"/
./nuitka_compile.sh --python-ver=$vert
rm -v nuitka_compile.sh compile.conf
cd "$base"
fi
##############################################################
# #
# #
Expand Down Expand Up @@ -159,7 +163,9 @@ rm "$base"/usr/bin/edamame
# delete C++ source from package
rm "$FOLDER"/usr/bin/edamame.cxx
# delete Python cache files
find "$FOLDER" -maxdepth 10 -type d -name __pycache__ -exec rm -rfv {} \;
if [[ "$vert" != "dnc" ]]; then
find "$FOLDER" -maxdepth 10 -type d -name __pycache__ -exec rm -rfv {} \;
fi
#build the shit
dpkg-deb --build "$FOLDER"
rm -rf "$FOLDER"

0 comments on commit ca8ce6d

Please sign in to comment.