Skip to content

Commit

Permalink
Factor out index_url
Browse files Browse the repository at this point in the history
Signed-off-by: ddelange <[email protected]>
  • Loading branch information
ddelange committed Jun 24, 2023
1 parent 6e0d24e commit 4809249
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/packaging/frontend_sdist/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

tensorrt_module = "##TENSORRT_MODULE##"
tensorrt_version = "##TENSORRT_PYTHON_VERSION##"
index_url = "https://pypi.nvidia.com"

# cherry-pick information from `packaging.markers.default_environment()` needed to find the right wheel
# https://github.com/pypa/packaging/blob/23.1/src/packaging/markers.py#L175-L190
Expand All @@ -38,14 +39,16 @@
if machine_marker != "x86_64":
raise RuntimeError("TensorRT currently only builds wheels for x86_64 processors")

libs_wheel = "https://pypi.nvidia.com/{}-libs/{}_libs-{}-py2.py3-none-{}_{}.whl".format(
libs_wheel = "{}/{}-libs/{}_libs-{}-py2.py3-none-{}_{}.whl".format(
index_url,
tensorrt_module,
tensorrt_module,
tensorrt_version,
platform_marker,
machine_marker,
)
bindings_wheel = "https://pypi.nvidia.com/{}-bindings/{}_bindings-{}-{}-none-{}_{}.whl".format(
bindings_wheel = "{}/{}-bindings/{}_bindings-{}-{}-none-{}_{}.whl".format(
index_url,
tensorrt_module,
tensorrt_module,
tensorrt_version,
Expand Down

0 comments on commit 4809249

Please sign in to comment.