-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change import statements and updated install script
change import statements and updated install script to support both python2 and python3 virtual environments The change in the import statements is required to allow the extension to run properly under the python3 virtual environment for Klipper Install script was updated and reorganized; Added the following functions to the install script: validate_printer_config_dir function, change_printer_config_dir function, check_env_version, validate_python3_installed, change_py3, check_existing, create_requirements_file, prompt_user_update, validate_user_response, copy_moonraker_update_file, and create_moonraker_file Since this install script must handle both python2 and python3 virtual environments the install script will generate the following files while the script is running based on the version of python running in Klipper virtual environment: requirements.txt and extended_template_update.conf The install script will now prompt the user to see if they want this extension automatically updated via moonraker's update manager. If they answer Yes, then the install script will append an [include statement] to the EOF for the moonraker.conf and save the extended_template_update.conf file to the printer's config directory. Since moonraker changed directory structures, this install script will validate the printer's config file directory. If the user is in python2 virtual env then the printer config directory should be /home/pi/klipper_config If the user is in python3 virtual env then the printer config directory should be /home/pi/printer_data/config This script defaults to a printer config directory of /home/pi/printer_data/config Since this install script can now detect when this extension has already been installed, then need for another script file for updates in no longer necessary. This install scripts' function called check_existing will produce a 1 if the symbolic links to the .py files already exists. If the symbolic links are not present then check_existing will return a 0. This logic is used to stop the script reinstalling the additional software packages after this extension has been installed. Since the moonraker update manager will automatically restart Klipper after an update, this script prevents Klipper from restarting once the extension has been installed. When an moonraker update does occur this script will re-verify all the directories and refresh the symbolic links to this extensions .py files. choose a different instantance variable name for the class in the module Removed unnecessary spaces from the files ensure the execute bit is set for install.sh file
- Loading branch information
1 parent
5b8d687
commit 62bf23b
Showing
7 changed files
with
371 additions
and
155 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.vscode | ||
.old | ||
**.pyc |
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.