Page 1 of 1

[SOLVED] Using wapt-get

Published: June 3, 2024 - 4:53 PM
by sebastien4444
Good morning,

I would prefer to avoid using PyScripter for modifying installation packages during their creation.
My idea is therefore to modify the setup.py file with Notepad++ or VsCode and launch the Run commands (install, remove, etc. which are located under "Run Configuration" in PyScripter) in a Terminal.
And it is on this second point that I have a problem.
Looking at the configuration of a Run command, let's say "install" for example, I understand that it simulates sending a command:

Code: Select all

> wapt-get.py install "Repertoire\ou\se\trouve\setup.py"
To avoid having to install a Python environment on my machine, I thought I could run the following command:

Code: Select all

> wapt-get install "Repertoire\ou\se\trouve\setup.py"
Assuming that wapt-get (which I imagine calls wapt-get.exe) did the same thing as wapt-get.py.
I made this assumption because running the "wapt-get" command does indeed give me the list of possible actions (install, remove, etc.)

But when I run this command, I get the message

Code: Select all

About to speak to waptservice...
Waptservice User :
At this prompt, I enter the username I use to log in to the WAPT console and I immediately get the following error:

Code: Select all

About to speak to waptservice...
Waptservice User :seb
Exception at 00CCF48A: EHTTPException:
401 Client Error: Missing auth for url: http://127.0.0.1:8088/install.json?notify_user=1&package=C:\waptdev\pilote-thunderbird_18.05_Windows_PROD-wapt.
If someone could help me better understand how this works, I would appreciate it. Thanks in advance.

Re: Using wapt-get

Published: June 3, 2024 - 5:32 PM
by sfonteneau
sebastien4444 wrote: June 3, 2024 - 4:53 PM Hello,

I would like to avoid using PyScripter to modify installation packages during their creation.
My idea is to modify the setup.py file with Notepad++ or VsCode and then run the Run commands (install, remove, etc., which are located under "Run Configuration" in PyScripter) in a Terminal.
For your information, the vscode editor is available as a code editor.



To do it manually without an editor:

Code: Select all

wapt-get install c:\waptdev\toto
But beware in an administrator command prompt Otherwise you will get the message you received.

Simple question: why launch them through a terminal rather than the IDE, which is designed for that purpose?

Re: Using wapt-get

Published: June 3, 2024 - 6:52 PM
by sebastien4444
Ah, okay, I wasn't aware of the VsCode issue.
I tried it quickly before leaving the office, adding "code" to the `editor_for_packages` line in the `waptconsole.ini` file, but although the UAC prompt for privilege escalation appeared, it didn't open VsCode (which is definitely installed on my machine) [I also tried "vscode"]. I'll look into debugging it tomorrow...

Regarding the terminal, it's because, apart from PyScripter, it's the only way I see to launch the various pre-configured runs.
There are even pre-configured runs shown in some YouTube videos (for example: building and uploading to the private repository) that I don't have in my PyScripter.

Not to mention all the other available `wapt-get` commands.

Anyway, thanks for the tip; it works well with an admin terminal.

Re: Using wapt-get

Published: June 4, 2024 - 9:45 AM
by sfonteneau
sebastien4444 wrote: June 3, 2024 - 6:52 PM There are even pre-configured Runs that we see in some YouTube videos (example: build and upload to the private repository) that I don't have in my PyScripter.
The Build upload feature has been removed because importing is now done via the console for several reasons:
  • Avoid user context issues (the user profile of an admin is not necessarily the same as the console profile and therefore may not have the correct settings)
  • Avoid retyping the server password multiple times
  • Avoid having to retype the private key password multiple times.
For these different reasons, we have withdrawn build-upload Python IDEs

Tip: If you drag and drop your package's working folder into the private repository, it will offer to import it.
sebastien4444 wrote: June 3, 2024 - 6:52 PM Not to mention all the other wapt-get commands available.
The IDE includes the run configuration necessary for package development.
  • install
  • remove
  • uninstall (for debugging)
  • session-setup
  • audit
  • update-package
The other commands were not necessary for package development, so we did not add them.
That said, you can modify the default psproj file generated by pyscripter by editing this file:

Code: Select all

C:\Program Files (x86)\wapt\templates\wapt.psproj
This way you can add the missing run configurations