Page 1 of 1
[SOLVED] Using a direct Python script to install an application
Published: January 20, 2020 - 6:05 PM
by d3sys
Hello,
I admit I'm too lazy to search given the number of results and don't know how to properly formulate my request

hence this new topic.
We're looking to install an application whose silent deployment is done via a Python script. I'd like to know exactly how to integrate it into the WAPT console without causing any damage, given the sensitive production environment...

Re: Using a direct Python script to install an application
Published: January 22, 2020 - 1:53 PM
by dcardon
Hello d3sys
d3sys wrote: ↑Jan 20, 2020 - 6:05 PM
I admit I'm too lazy to search given the number of results and don't know how to properly formulate my request,

hence the new topic.
We're looking to install an application whose silent deployment is done via a Python script. I'd like to know exactly how to integrate it into the WAPT console without causing any damage, given the sensitive production environment...
If you have another program that requires a Python environment, it's best to install the corresponding Python package (tis-python 2.7 or tis-python 3.6) because the WAPT Python version can change (in fact, it will soon change from version 2.7 to version 3.6 before the latest release in April). Therefore, your other Python programs should not depend on the WAPT Python version.
If you want to run a Python installation script, you must run it with the executable file itself (other than waptpython.exe), such as c:\python27\bin\python.exe mypythonscript.py. If you run a Python script that you haven't audited directly within the context of setup.py, you risk corrupting the setup.py execution environment (overwriting libraries of different versions, etc.). It is therefore important to do so in a separate context, hence the need to launch another Python interpreter.
Furthermore, if your installation script launches pip3.exe, you must remember that you will need a network connection available at the time of installation (which is not necessarily available in the context of waptexit when the machine shuts down).
In any case, without knowing the script in question, it's difficult to say more. I think there have been other posts on the forum about this.
Sincerely,
Denis
Re: Using a direct Python script to install an application
Published: January 22, 2020 - 3:34 PM
by d3sys
If you want to run a Python installation script, you must run it using the executable file in question (other than waptpython.exe), such as c:\python27\bin\python.exe mypythonscript.py
I think that's it. Basically, to explain everything, the software developer planned regular updates, but these updates always require user intervention. So, to overcome this problem, they developed a script (in Python) that would allow us to silently and automatically deploy their updates via Wapt.
I'm testing the solution and will keep you informed.
Re: Using a direct Python script to install an application
Published: April 3, 2020 - 9:58 PM
by d3sys
I spoke with the software developers and in their new version they have included installation parameters that work very well with WAPT, so thank you very much!