From 2a55e09ff82260c8e3f1283f325fa115fa39133b Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 1 Apr 2019 22:20:21 -0400 Subject: [PATCH] scripts: Add a new klippy-requirements.txt file for virtualenv installs Place all of the host software python requirements into a config file. This makes it easier to update the python requirements without having to update several installation scripts. Signed-off-by: Kevin O'Connor --- scripts/install-centos.sh | 2 +- scripts/install-octopi.sh | 2 +- scripts/install-ubuntu-18.04.sh | 2 +- scripts/klippy-requirements.txt | 7 +++++++ scripts/travis-install.sh | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 scripts/klippy-requirements.txt diff --git a/scripts/install-centos.sh b/scripts/install-centos.sh index ccd40d33..3c39ca47 100755 --- a/scripts/install-centos.sh +++ b/scripts/install-centos.sh @@ -34,7 +34,7 @@ create_virtualenv() [ ! -d ${PYTHONDIR} ] && virtualenv ${PYTHONDIR} # Install/update dependencies - ${PYTHONDIR}/bin/pip install cffi==1.6.0 pyserial==3.2.1 greenlet==0.4.10 + ${PYTHONDIR}/bin/pip install -r ${SRCDIR}/scripts/klippy-requirements.txt } # Step 3: Install startup script diff --git a/scripts/install-octopi.sh b/scripts/install-octopi.sh index a260daae..bec01d1a 100755 --- a/scripts/install-octopi.sh +++ b/scripts/install-octopi.sh @@ -37,7 +37,7 @@ create_virtualenv() [ ! -d ${PYTHONDIR} ] && virtualenv ${PYTHONDIR} # Install/update dependencies - ${PYTHONDIR}/bin/pip install cffi==1.6.0 pyserial==3.2.1 greenlet==0.4.10 + ${PYTHONDIR}/bin/pip install -r ${SRCDIR}/scripts/klippy-requirements.txt } # Step 3: Install startup script diff --git a/scripts/install-ubuntu-18.04.sh b/scripts/install-ubuntu-18.04.sh index 0c211dab..e21bd142 100755 --- a/scripts/install-ubuntu-18.04.sh +++ b/scripts/install-ubuntu-18.04.sh @@ -40,7 +40,7 @@ create_virtualenv() [ ! -d ${PYTHONDIR} ] && virtualenv ${PYTHONDIR} # Install/update dependencies - ${PYTHONDIR}/bin/pip install cffi==1.6.0 pyserial==3.2.1 greenlet==0.4.10 + ${PYTHONDIR}/bin/pip install -r ${SRCDIR}/scripts/klippy-requirements.txt } # Step 3: Install startup script diff --git a/scripts/klippy-requirements.txt b/scripts/klippy-requirements.txt new file mode 100644 index 00000000..94152f95 --- /dev/null +++ b/scripts/klippy-requirements.txt @@ -0,0 +1,7 @@ +# This file describes the Python virtualenv package requirements for +# the Klipper host software (Klippy). These package requirements are +# typically installed via the command: +# pip install -r virtualenv-requirements.txt +cffi==1.6.0 +pyserial==3.2.1 +greenlet==0.4.10 diff --git a/scripts/travis-install.sh b/scripts/travis-install.sh index 18eb0477..5705e7d3 100755 --- a/scripts/travis-install.sh +++ b/scripts/travis-install.sh @@ -62,4 +62,4 @@ fi echo "=============== Install python virtualenv" cd ${MAIN_DIR} virtualenv ${BUILD_DIR}/python-env -${BUILD_DIR}/python-env/bin/pip install cffi==1.6.0 pyserial==3.2.1 greenlet==0.4.10 +${BUILD_DIR}/python-env/bin/pip install -r ${MAIN_DIR}/scripts/klippy-requirements.txt