]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Make python a required build dependency (#5784)
authorskullydazed <skullydazed@users.noreply.github.com>
Mon, 6 May 2019 17:56:34 +0000 (10:56 -0700)
committerGitHub <noreply@github.com>
Mon, 6 May 2019 17:56:34 +0000 (10:56 -0700)
* Make python a required build dependency

* Add missing color

* fixup sabayon linux per @BlitzKraft

Makefile
message.mk
util/freebsd_install.sh
util/linux_install.sh
util/macos_install.sh
util/msys2_install.sh

index bf3abbe5289549c7508e57d8a384057a05452799..a6c3ee35b7a715a8e7f8d369b6dac1ac7c480a7f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -534,6 +534,8 @@ endef
 %:
        # Check if we have the CMP tool installed
        cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
+       # Ensure that python3 is installed. This check can be removed after python is used in more places.
+       if ! python3 --version 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi
        # Check if the submodules are dirty, and display a warning if they are
 ifndef SKIP_GIT
        if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi
index 71f37be0b5f8c77ae9196c2fbc1ebcd5345ca3a0..734de86457243a3eb52aa3929d9a8cdc00153b9e 100644 (file)
@@ -81,3 +81,7 @@ MSG_FILE_TOO_BIG = $(ERROR_COLOR)The firmware is too large!$(NO_COLOR) $(CURRENT
 MSG_FILE_TOO_SMALL = The firmware is too small! $(CURRENT_SIZE)/$(MAX_SIZE)\n
 MSG_FILE_JUST_RIGHT = The firmware size is fine - $(CURRENT_SIZE)/$(MAX_SIZE) ($(FREE_SIZE) bytes free)\n
 MSG_FILE_NEAR_LIMIT = The firmware size is approaching the maximum - $(CURRENT_SIZE)/$(MAX_SIZE) ($(FREE_SIZE) bytes free)\n
+MSG_PYTHON_MISSING = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \
+       Python 3 is not installed. It will be required by a future version\n\
+       of qmk_firmware.\n\n\
+       Please run $(BOLD)util/qmk_install.sh$(NO_COLOR) to install all the dependencies QMK requires.\n\n
index 25ea80a7fcb526ec78d8229cc56301339f0e3505..c8696e8cc75165a252879067df5ed0b0a25942ad 100755 (executable)
@@ -15,4 +15,5 @@ pkg install -y \
        arm-none-eabi-gcc \
        arm-none-eabi-binutils \
        arm-none-eabi-newlib \
-       diffutils
+       diffutils \
+       python3
index 608975a91587b262ea9c1165130fb7f975d06eae..5e2afe9998e431898e420ca017ec27f5a00e51c1 100755 (executable)
@@ -25,6 +25,7 @@ if grep ID /etc/os-release | grep -qE "fedora"; then
                kernel-headers \
                make \
                perl \
+               python3 \
                unzip \
                wget \
                zip
@@ -47,6 +48,7 @@ elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then
                gcc-avr \
                git \
                libnewlib-arm-none-eabi \
+               python3 \
                unzip \
                wget \
                zip
@@ -66,6 +68,7 @@ elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then
                diffutils \
                gcc \
                git \
+               python \
                unzip \
                wget \
                zip
@@ -87,6 +90,7 @@ elif grep ID /etc/os-release | grep -q gentoo; then
                        app-arch/zip \
                        app-mobilephone/dfu-util \
                        dev-embedded/avrdude \
+                       dev-lang/python:3.5 \
                        net-misc/wget \
                        sys-devel/gcc \
                        sys-devel/crossdev
@@ -102,6 +106,7 @@ elif grep ID /etc/os-release | grep -q sabayon; then
                app-arch/zip \
                app-mobilephone/dfu-util \
                dev-embedded/avrdude \
+               dev-lang/python \
                net-misc/wget \
                sys-devel/gcc \
                sys-devel/crossdev
@@ -125,6 +130,7 @@ elif grep ID /etc/os-release | grep -qE "opensuse|tumbleweed"; then
                dfu-tool \
                dfu-programmer \
                gcc \
+               python3 \
                unzip \
                wget \
                zip
@@ -143,7 +149,8 @@ elif grep ID /etc/os-release | grep -q slackware; then
                        dfu-util \
                        arm-binutils \
                        arm-gcc \
-                       newlib
+                       newlib \
+                       python3
                echo "Done!"
        else
                echo "Quitting..."
index d2629a8cb4aefb5bf89edc6d8ebdae31814d98d1..93f3ed0b96f09cac051002dd3502e915b5cc8ffe 100755 (executable)
@@ -22,5 +22,5 @@ fi
 brew tap osx-cross/avr
 brew tap PX4/homebrew-px4
 brew update
-brew install avr-gcc@7 gcc-arm-none-eabi dfu-programmer avrdude dfu-util
+brew install avr-gcc@7 gcc-arm-none-eabi dfu-programmer avrdude dfu-util python3
 brew link --force avr-gcc@7
index fcb4882494f865c1d98ee49e5731f39b1fa5956a..bcb628ab21f23c3622b07325c14509534c3f54a8 100755 (executable)
@@ -7,7 +7,7 @@ armtools=gcc-arm-none-eabi
 installflip=false
 
 echo "Installing dependencies needed for the installation (quazip)"
-pacman --needed -S msys/unzip msys/p7zip base-devel msys/git mingw-w64-x86_64-toolchain
+pacman --needed -S base-devel mingw-w64-x86_64-toolchain msys/git msys/p7zip msys/python3 msys/unzip
 
 source "$dir/win_shared_install.sh"