[SOLVED] Using wapt-get

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
sebastien4444
Messages: 22
Registration: Sep 14, 2023 - 08:53

June 3, 2024 - 4:53 PM

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.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

June 3, 2024 - 5:32 PM

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?
sebastien4444
Messages: 22
Registration: Sep 14, 2023 - 08:53

June 3, 2024 - 6:52 PM

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.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

June 4, 2024 - 09:45

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
Locked