diff --git a/python/packaging/frontend_sdist/setup.py b/python/packaging/frontend_sdist/setup.py index 4acbdaff0..074c829b2 100644 --- a/python/packaging/frontend_sdist/setup.py +++ b/python/packaging/frontend_sdist/setup.py @@ -14,54 +14,30 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import platform -import sys from setuptools import setup 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 -if sys.platform == "linux": - platform_marker = "manylinux_2_17" -else: - raise RuntimeError("TensorRT currently only builds wheels for linux") - -if sys.implementation.name == "cpython": - implementation_marker = "cp{}".format("".join(platform.python_version_tuple()[:2])) -else: - raise RuntimeError("TensorRT currently only builds wheels for CPython") - -machine_marker = platform.machine() -if machine_marker != "x86_64": - raise RuntimeError("TensorRT currently only builds wheels for x86_64 processors") - -libs_wheel = "{}/{}-libs/{}_libs-{}-py2.py3-none-{}_{}.whl".format( - index_url, - tensorrt_module, - tensorrt_module, - tensorrt_version, - platform_marker, - machine_marker, -) -bindings_wheel = "{}/{}-bindings/{}_bindings-{}-{}-none-{}_{}.whl".format( - index_url, - tensorrt_module, - tensorrt_module, - tensorrt_version, - implementation_marker, - platform_marker, - machine_marker, -) setup( name=tensorrt_module, version=tensorrt_version, description="A high performance deep learning inference library", - long_description="A high performance deep learning inference library", + long_description="""A high performance deep learning inference library + +To install, please execute the following: +``` +pip install tensorrt --extra-index-url https://pypi.nvidia.com +``` +Or put the index URL in the (comma-separated) PIP_EXTRA_INDEX_URL environment variable: +``` +export PIP_EXTRA_INDEX_URL=https://pypi.nvidia.com +pip install tensorrt +``` +""", + long_description_content_type="text/markdown", author="NVIDIA Corporation", license="Proprietary", classifiers=[ @@ -71,10 +47,9 @@ ], packages=[tensorrt_module], install_requires=[ - "{}_libs @ {}".format(tensorrt_module, libs_wheel), - "{}_bindings @ {}".format(tensorrt_module, bindings_wheel), + "{}_libs=={}".format(tensorrt_module, tensorrt_version), + "{}_bindings=={}".format(tensorrt_module, tensorrt_version), ], - python_requires=">=3.6", # ref https://pypi.nvidia.com/tensorrt-bindings/ extras_require={"numpy": "numpy"}, package_data={tensorrt_module: ["*.so*", "*.pyd", "*.pdb"]}, include_package_data=True,