Page 1 of 1

[SOLVED] Adding custom functions to setuphelpers

Published: March 2, 2023 - 11:36
by tuxmania
Good morning,

I would like to create additional functions that I could use with any package using imports.
For example, if I create a functions.py file with all my custom functions in it, I would then like to be able to use them by doing the following in my package:

Code: Select all

from functions import ma_fonction
How can I implement this without creating a functions file for each package, please?
Is it possible to modify the setuphelpers to add these functions?

Thank you in advance for your feedback.

Re: Adding custom functions in setuphelpers

Published: March 6, 2023 - 2:56 PM
by dcardon
Hi David,

you can add your file to your package. I believe the local path isn't taken into account when launching setup.py, so you'll need to add the path with sys.path.append or something similar before importing.

The waptagent.exe installer is no longer rebuilt with innosetup (to avoid antivirus issues with unsigned executables), so it's no longer possible to add a library when creating the agent.

Regards,

Denis

Re: Adding custom functions in setuphelpers

Published: March 7, 2023 - 10:32
by david999
Hello Denis,

noted.
Thank you for your reply!

Best regards.