pip install github2pypi
import github2pypi
...
with open('README.md') as f:
# e.g.,  ->
# 
long_description = github2pypi.replace_url(
slug='wkentaro/imgviz', content=f.read(), branch="main"
)
setup(
...
long_description=long_description,
long_description_content_type='text/markdown',
)