Attempting to add a PyPi package to kit-app-template

I am attempting to follow the instructions here:
Using Python pip Packages — kit-manual 105.1 documentation (nvidia.com)

I get the below error however on a repo build. Any suggestions as to how to make the ext value visible in premake5.lua would be appreciated.

Error: D:/projects/omniverse/omnidotnet/premake5.lua:31: attempt to index a nil value (global ‘ext’)
[04/11/24 14:13:00] ERROR error running: utils.py:212
D:/projects/omniverse/omnidotnet/_build/ho
st-deps\premake\premake5.exe
–file=D:/projects/omniverse/omnidotnet/pr
emake5.lua vs2019
–platform-host=windows-x86_64
–scripts=D:\projects\omniverse\pm_package
s\chk\repo_build\0.60.1\lua
–platform-target=windows-x86_64
–solution-name=kit-app-template, code: 1,
message: “”
ERROR SystemExit exception stack trace dumped to log.py:135
logfile
D:/projects/omniverse/omnidotnet/_repo/repo.
log. Stacks dumped to console via
--verbose or --tracebacks.
SystemExit: 1
SystemExit exception stack trace dumped to logfile D:/projects/omniverse/omnidotnet/_repo/repo.log. Stacks dumped to console via --verbose or --tracebacks.
SystemExit: 1

I figured it out. The extension has its own premake5.lua

SO… its building clean now but never fetches the PyPi package.

If i manually put it into the pip_prebundle directory, it all works.

Update : fetching from pypi on the builddoesnt work.
If i manually put the python net folder in pip_prebundle it sees them in the editor

But itdoes NOT see the package at run time. I get this error:

2024-04-11 19:40:15 [46,105ms] [Error] [omni.ext._impl.custom_importer] Failed to im

                                                                               mport python module purdue.profk.omnidotnet. Error: No module named 'pythonnet'. Traceback:

Traceback (most recent call last):
File “d:\projects/omniverse/omnidotnet/build/windows-x86_64/release/kit/kernel/py\omni\ext_impl\custom_importer.py", line 76, in import_module
return importlib.import_module(name)
File "d:\projects\omniverse\omnidotnet_build\windows-x86_64\release\kit\python\lib\importlib_init
.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1006, in _find_and_load_unlocked
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “d:/projects/omniverse/omnidotnet/_build/windows-x86_64/release/exts/purdue.profk.omnidotnet/purdue/profk/omnidotnet/init.py”, line 1, in
from .python_ext import *
File “d:/projects/omniverse/omnidotnet/_build/windows-x86_64/release/exts/purdue.profk.omnidotnet/purdue/profk/omnidotnet/python_ext.py”, line 2, in
from pythonnet import load
ModuleNotFoundError: No module named ‘pythonnet’

2024-04-11 19:40:15 [46,107ms] [Error] [carb.scripting-python.plugin] Exception: Extension python module: ‘purdue.profk.omnidotnet’ in ‘d:\projects\omniverse\omnidotnet_build\windows-x86_64\release\exts\purdue.profk.omnidotnet’ failed to load.

At:
d:\projects/omniverse/omnidotnet/_build/windows-x86_64/release/kit/kernel/py\omni\ext_impl_internal.py(213): startup
d:\projects/omniverse/omnidotnet/_build/windows-x86_64/release/kit/kernel/py\omni\ext_impl_internal.py(328): startup_extension
PythonExtension.cpp::startup()(2):
d:/projects/omniverse/omnidotnet/_build/windows-x86_64/release/extscache/omni.kit.window.extensions-1.3.0+de96b556/omni/kit/window/extensions/ext_commands.py(29): do
d:/projects/omniverse/omnidotnet/_build/windows-x86_64/release/extscache/omni.kit.commands-1.4.6+de96b556.wx64.r.cp310/omni/kit/undo/undo.py(80): execute
d:/projects/omniverse/omnidotnet/_build/windows-x86_64/release/extscache/omni.kit.commands-1.4.6+de96b556.wx64.r.cp310/omni/kit/commands/command.py(463): execute
d:/projects/omniverse/omnidotnet/_build/windows-x86_64/release/extscache/omni.kit.window.extensions-1.3.0+de96b556/omni/kit/window/extensions/common.py(288): toggle_extension
d:/projects/omniverse/omnidotnet/_build/windows-x86_64/release/extscache/omni.kit.window.extensions-1.3.0+de96b556/omni/kit/window/extensions/ext_components.py(93): toggle

2024-04-11 19:40:15 [46,109ms] [Error] [omni.ext.plugin] [ext: purdue.profk.omnidotnet-0.1.0] Failed to startup python extension.