Skip to content

Instantly share code, notes, and snippets.

@joseph0x45
Last active June 23, 2025 16:00
Show Gist options
  • Select an option

  • Save joseph0x45/a144fff6be768f4cda2793a45d28c519 to your computer and use it in GitHub Desktop.

Select an option

Save joseph0x45/a144fff6be768f4cda2793a45d28c519 to your computer and use it in GitHub Desktop.

Revisions

  1. joseph0x45 revised this gist Jun 23, 2025. No changes.
  2. joseph0x45 revised this gist Jun 23, 2025. 1 changed file with 13 additions and 4 deletions.
    17 changes: 13 additions & 4 deletions build.md
    Original file line number Diff line number Diff line change
    @@ -3,19 +3,28 @@
    ## Download the source code from Python's website

    ## Instsall required dependencies for compiling Python
    ```
    ```sh
    sudo xbps-install -S \
    gcc make libffi-devel zlib-devel \
    bzip2-devel xz-devel sqlite-devel \
    openssl-devel readline-devel ncurses-devel \
    gdbm-devel tk-devel libuuid-devel libnsl-devel
    ```
    ## Configure Build
    Run ```./configure --prefix=<PATH> --enable-optimizations --with-lto --enable-shared```
    Run
    ```sh
    ./configure --prefix=<PATH> --enable-optimizations --with-lto --enable-shared
    ```
    - --enable-optimizations enables profile-guided optimizations
    - --with-lto enables link time optimizations
    - --enable-shared allows dynamic linking

    ## Build and install
    - Run ```make -j$(nproc)``` to compile using all cores
    - Run ```make install``` to install
    - Compile using all cores
    ```sh
    make -j$(nproc)
    ```
    - Install
    ```sh
    make install
    ```
  3. joseph0x45 revised this gist Jun 23, 2025. 1 changed file with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions build.md
    Original file line number Diff line number Diff line change
    @@ -3,18 +3,19 @@
    ## Download the source code from Python's website

    ## Instsall required dependencies for compiling Python
    `sudo xbps-install -S \
    ```
    sudo xbps-install -S \
    gcc make libffi-devel zlib-devel \
    bzip2-devel xz-devel sqlite-devel \
    openssl-devel readline-devel ncurses-devel \
    gdbm-devel tk-devel libuuid-devel libnsl-devel`

    gdbm-devel tk-devel libuuid-devel libnsl-devel
    ```
    ## Configure Build
    Run `./configure --prefix=<PATH> --enable-optimizations --with-lto --enable-shared`
    Run ```./configure --prefix=<PATH> --enable-optimizations --with-lto --enable-shared```
    - --enable-optimizations enables profile-guided optimizations
    - --with-lto enables link time optimizations
    - --enable-shared allows dynamic linking

    ## Build and install
    - Run `make -j$(nproc)` to compile using all cores
    - Run `make install` to install
    - Run ```make -j$(nproc)``` to compile using all cores
    - Run ```make install``` to install
  4. joseph0x45 revised this gist Jun 23, 2025. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions build.md
    Original file line number Diff line number Diff line change
    @@ -16,5 +16,5 @@ Run `./configure --prefix=<PATH> --enable-optimizations --with-lto --enable-shar
    - --enable-shared allows dynamic linking

    ## Build and install
    Run `make -j$(nproc)` to compile using all cores
    Run `make install` to install
    - Run `make -j$(nproc)` to compile using all cores
    - Run `make install` to install
  5. joseph0x45 revised this gist Jun 23, 2025. 1 changed file with 16 additions and 1 deletion.
    17 changes: 16 additions & 1 deletion build.md
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,19 @@

    ## Download the source code from Python's website

    ##
    ## Instsall required dependencies for compiling Python
    `sudo xbps-install -S \
    gcc make libffi-devel zlib-devel \
    bzip2-devel xz-devel sqlite-devel \
    openssl-devel readline-devel ncurses-devel \
    gdbm-devel tk-devel libuuid-devel libnsl-devel`

    ## Configure Build
    Run `./configure --prefix=<PATH> --enable-optimizations --with-lto --enable-shared`
    - --enable-optimizations enables profile-guided optimizations
    - --with-lto enables link time optimizations
    - --enable-shared allows dynamic linking

    ## Build and install
    Run `make -j$(nproc)` to compile using all cores
    Run `make install` to install
  6. joseph0x45 created this gist Jun 23, 2025.
    5 changes: 5 additions & 0 deletions build.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # How to build Python from source

    ## Download the source code from Python's website

    ##