client icon indicating copy to clipboard operation
client copied to clipboard

Python package install misplaces a license file outside of tritonclient directories

Open hanlaur opened this issue 2 months ago • 0 comments

Hello, and thanks for maintaining the tritonclient.

As minor issue, when installing tritonclient Python package, it places a LICENSE.txt file outside of the tritonclient package directory:

$ docker run --rm -it python:3.12 bash
root@14c2553b300f:/# python -m venv virtenv
root@14c2553b300f:/# virtenv/bin/pip install --no-deps --quiet tritonclient
root@14c2553b300f:/# find virtenv -name LICENSE.txt
virtenv/LICENSE.txt
virtenv/lib/python3.12/site-packages/pip-25.0.1.dist-info/LICENSE.txt
virtenv/lib/python3.12/site-packages/tritonclient-2.61.0.dist-info/LICENSE.txt
root@14c2553b300f:/# diff virtenv/LICENSE.txt virtenv/lib/python3.12/site-packages/tritonclient-2.61.0.dist-info/LICENSE.txt 
# No output from 'diff' - files are the same
root@14c2553b300f:/# virtenv/bin/python
>>> import importlib.metadata
>>> dist = importlib.metadata.distribution('tritonclient')
>>> [ file for file in dist.files if '..' in str(file) ]
[PackagePath('../../../LICENSE.txt')]

File virtenv/LICENSE.txt file is installed outside the tritonclient package directories. I believe this is not a best practise as it is a shared location. Also file is unnecessary as the license file is already included as site-packages/tritonclient-2.61.0.dist-info/LICENSE.txt.

It would be good to remove the extra misplaced license file from the Python package. I came across this as the file confused some tooling that scans package license information.

hanlaur avatar Oct 22 '25 05:10 hanlaur