diff options
author | Michael McGeagh <michael.mcgeagh@arm.com> | 2020-12-01 13:24:09 +0000 |
---|---|---|
committer | Tim Hall <tim.hall@arm.com> | 2020-12-03 08:25:14 +0000 |
commit | 44c6fe9e4843a1e6aca72dcac5fce8be625783a0 (patch) | |
tree | e57fed0b9aacbe5cdbbb3b35b7a461cbb976819c | |
parent | b27d8957b1778aa99c6b1160032d8ce1f8af35e3 (diff) | |
download | ethos-u-vela-44c6fe9e4843a1e6aca72dcac5fce8be625783a0.tar.gz |
vela: Improve regex for readme link replacement2.0.1
Instead of just detecting MD files, detect any local files by checking
if they exist
Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com>
Change-Id: I02bd790b5bb148abfe16e4bdb3e38e68750cfb94
-rw-r--r-- | RELEASES.md | 4 | ||||
-rw-r--r-- | setup.py | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/RELEASES.md b/RELEASES.md index ac10e8b4..16cca1ef 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -5,6 +5,10 @@ main feature changes, interface changes and reported defects that have been fixed. The version numbering adheres to the [semantic versioning](https://semver.org/) scheme. +## Release 2.0.1 - 03/12/2020 + +* Fixed a broken link in the long description used by PyPi + ## Release 2.0.0 - 30/11/2020 **Main feature changes:** @@ -26,12 +26,12 @@ from setuptools import setup this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, "README.md"), encoding="utf-8") as f: long_description = f.read() - # Replace local Markdown links with URLs - tag = "2.0.0" + # Replace local file links with URLs + tag = "2.0.1" url = f"https://review.mlplatform.org/plugins/gitiles/ml/ethos-u/ethos-u-vela/+/refs/tags/{tag}/" - for markdown in set(re.findall(r"\(.+\.md\)", long_description)): - link = f"({url}{markdown[1:-1]})" - long_description = long_description.replace(markdown, link) + for link in set(re.findall(r"\[.+\]\((.+?)\)", long_description)): + if path.exists(path.join(this_directory, link)): + long_description = long_description.replace(link, url + link) mlw_module = Extension( "ethosu.mlw_codec", |