Created
April 14, 2024 15:20
-
-
Save Chaz6/3944c42ef4466fb24c370c76342eb6e5 to your computer and use it in GitHub Desktop.
Revisions
-
Chaz6 created this gist
Apr 14, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ #!/usr/bin/bash PYTHON_VERSION=3.13.0 BETA_VERSION=a6 INSTALLDIR="${HOME}"/.local/local cd /tmp && wget -4 "https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}${BETA_VERSION}.tar.xz" && echo "Extracting archive..." && tar xvf "Python-${PYTHON_VERSION}${BETA_VERSION}.tar.xz" && echo "Building Python..." && (cd "Python-${PYTHON_VERSION}${BETA_VERSION}" && CPPFLAGS="-march=native" \ LDFLAGS="-Wl,-rpath,'${INSTALLDIR}/python-'${PYTHON_VERSION}${BETA_VERSION}'/lib' -Wl,--enable-new-dtags" \ LLVM_PROFDATA=/usr/bin/llvm-profdata \ CC=/usr/bin/clang \ CXX=/usr/bin/clang++ \ ./configure \ --prefix=/home/chaz/.local/local/python-"${PYTHON_VERSION}${BETA_VERSION}" \ --enable-optimizations \ --enable-shared \ --enable-loadable-sqlite-extensions && make -j4 && make install) && echo "Creating archive..." && ([ ! -d "${INSTALLDIR}" ] && mkdir -p "${INSTALLDIR}"; cd "${INSTALLDIR}" && tar Jcvf "python-${PYTHON_VERSION}${BETA_VERSION}.tar.xz" "python-${PYTHON_VERSION}${BETA_VERSION}") && echo "Deleting build files..." && rm -rf "Python-${PYTHON_VERSION}${BETA_VERSION}" "Python-${PYTHON_VERSION}${BETA_VERSION}.tar.xz" && echo "Successful!"