Adding a wheel to a python extension

Ive been chasing this for 4 days without luck.
This page talked about it but is vague on the build time details.
Using Python pip Packages — kit-manual 104.0 documentation (nvidia.com)
I found repo_build at app\dev_repo\deps\repo_build but have no idea how to run it.

Can someone give me or point me at a step by step guide to import a python package into my extension project so it is included in the build and release?

Thank you

Prof K

Some more info on what I have tried.:

This is my premake5.lua:

kit = require(“premake5-kit”)
kit.setup_all()

repo_build.prebuild_link {
{ “%{root}/_build/target-deps/pip_prebundle”, ext.target_dir…“/pip_prebundle” },
}

This is my pip.toml in app\dev\deps:

[[dependency]]
packages = [
“pythonnet==3.0.3”, #
]
target = “…/_build/target-deps/pip_prebundle”

I ran premake5.lua from the command line, which returned without any output. then I ran “repo build” and this was the output:

D:\projects\omniverse\omnidotnet\app\dev>repo build
No test suites registered for repo_test

Fetching all dependencies.
Package ‘repo_pip_cache’ at version ‘9d1580dea81c1bab411f314000e5ab14aedd05fd-v2-windows-x86_64-licensed’ is missing from local storage.
Pulling pip packages from ‘D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev\deps\pip.toml’.
[2024-04-09 15:57:39,967][ERROR][omni.repo.man.utils] error running: “C:\Users\jpkessel\ownCloud - jpkessel@jpkfilestore.ecn.purdue.edu\Documents\Applications\packman_repo\python\3.10.5-1-windows-x86_64\python.exe/python.exe” -m pip --isolated install --target=D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev\deps../_build/target-deps/pip_prebundle pythonnet==3.0.3, code: -1, message: “[WinError 2] The system cannot find the file specified”
[2024-04-09 15:57:39,968][ERROR][omni.repo] Exception encountered while running repo_build via [‘D:\projects\omniverse\omnidotnet\app\dev\tools\repoman\repoman.py’, ‘build’]:
Traceback (most recent call last):
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_build\omni\repo\build\pippull.py”, line 356, in pull_pip_dependencies
pull_using_packman_from_config(version, repo_folders, pip_file, platform_target, licenses_path)
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_man\omni\repo\man\nvteamcity.py”, line 146, in wrapper
result = func(*args, **kwargs)
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_build\omni\repo\build\pippull.py”, line 117, in pull_using_packman_from_config
packman_packages = packmanapi.install(
File “C:\Users\jpkessel\ownCloud - jpkessel@jpkfilestore.ecn.purdue.edu\Documents\Applications\packman_repo\packman-common\7.6\packman\utils.py”, line 581, in wrapper_message_block
return func(*args, **kwargs)
File “C:\Users\jpkessel\ownCloud - jpkessel@jpkfilestore.ecn.purdue.edu\Documents\Applications\packman_repo\packman-common\7.6\packman\main.py”, line 453, in install
dep_map = install_with_variable_file(
File “C:\Users\jpkessel\ownCloud - jpkessel@jpkfilestore.ecn.purdue.edu\Documents\Applications\packman_repo\packman-common\7.6\packman\main.py”, line 423, in install_with_variable_file
return pull_dependencies(
File “C:\Users\jpkessel\ownCloud - jpkessel@jpkfilestore.ecn.purdue.edu\Documents\Applications\packman_repo\packman-common\7.6\packman\main.py”, line 1270, in pull_dependencies
raise errors.PackmanErrorFileNotFound(
packman.errors.PackmanErrorFileNotFound: Package not found on specified remote servers! (name: repo_pip_cache, version: 9d1580dea81c1bab411f314000e5ab14aedd05fd-v2-windows-x86_64-licensed)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_man\omni\repo\man\entry.py”, line 596, in run_tool
exit_code = options.func(options)
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_man\omni\repo\man\entry.py”, line 298, in
func=lambda args, func=func, config=merged_tool_config: func(args, config),
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_build\omni\repo\build\main.py”, line 1218, in run_repo_tool
run_build(options, repo_folders, None, config)
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_build\omni\repo\build\main.py”, line 876, in run_build
process_pip_dependencies_fn(
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_man\omni\repo\man\nvteamcity.py”, line 191, in wrapper
result = func(*args, **kwargs)
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_build\omni\repo\build\main.py”, line 414, in process_pip_dependencies
pull_pip_dependencies(repo_folders, fetch_d.get(“pip”, {}), platform_target)
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_man\omni\repo\man\nvteamcity.py”, line 146, in wrapper
result = func(*args, **kwargs)
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_build\omni\repo\build\pippull.py”, line 360, in pull_pip_dependencies
pull_using_pip_from_config(repo_folders, pip_file, platform_target, licenses_path, licensing_enabled)
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_man\omni\repo\man\nvteamcity.py”, line 146, in wrapper
result = func(*args, **kwargs)
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_build\omni\repo\build\pippull.py”, line 304, in pull_using_pip_from_config
repo_man.run_process(pip_cmd, exit_on_error=True)
File “D:\Applications\Omniverse\lib\deps\795f6abc38988ca868180636507b0118\dev_repo\deps\repo_man\omni\repo\man\utils.py”, line 211, in run_process
sys.exit(returncode)
SystemExit: -1
[2024-04-09 15:57:40,628][ERROR][omni.repo.man.nvenv] Error: git command failed:
return code:128
args:“rev-parse --abbrev-ref HEAD”.
stdout:
stderr: fatal: not a git repository (or any of the parent directories): .git

[2024-04-09 15:57:41,259][ERROR][omni.repo.man.nvenv] Error: git command failed:
return code:128
args:“rev-parse --short=8 HEAD”.
stdout:
stderr: fatal: not a git repository (or any of the parent directories): .git