Skip to content

Commit

Permalink
setup.py: Use Absolute links so that the pyPI page renders correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
amilcarlucas committed Apr 9, 2024
1 parent 01d84a9 commit a775a9c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,19 @@ def package_files(directory):
# Add any other development requirements here
]

prj_url = "https://github.com/ArduPilot/MethodicConfigurator"

# Read the long description from the README file
with open('README.md', 'r', encoding='utf-8') as f:
long_description = f.read()
# Use Absolute links so that the pyPI page renders correctly
long_description = long_description.replace("(USERMANUAL.md", f"({prj_url}/blob/master/USERMANUAL.md")
long_description = long_description.replace("(CONTRIBUTING.md", f"({prj_url}/blob/master/CONTRIBUTING.md")
long_description = long_description.replace("(ARCHITECTURE.md", f"({prj_url}/blob/master/ARCHITECTURE.md")
long_description = long_description.replace("(CODE_OF_CONDUCT.md", f"({prj_url}/blob/master/CODE_OF_CONDUCT.md")
long_description = long_description.replace("(LICENSE.md", f"({prj_url}/blob/master/LICENSE.md")
long_description = long_description.replace("(credits/CREDITS.md", f"({prj_url}/blob/master/credits/CREDITS.md")
long_description = long_description.replace("images/App_screenshot1.png", f"{prj_url}/raw/master/images/App_screenshot1.png")

setup(
name='MethodicConfigurator',
Expand All @@ -42,7 +52,7 @@ def package_files(directory):
description='A clear configuration sequence for ArduPilot vehicles',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/ArduPilot/MethodicConfigurator',
url=prj_url,
author='Amilcar do Carmo Lucas',
author_email='[email protected]',
packages=find_packages(),
Expand Down

0 comments on commit a775a9c

Please sign in to comment.