From 9835819b1618767d0085ba3df1627df7bb68b9c3 Mon Sep 17 00:00:00 2001 From: Armin Friedl Date: Mon, 12 Oct 2020 06:34:07 +0200 Subject: [PATCH] Fix links in PyPi --- README.md | 7 +++++-- setup.py | 10 ++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2c73847..54d0893 100644 --- a/README.md +++ b/README.md @@ -75,12 +75,15 @@ t.insert(b"Helo", "Welsh") print("Where to say 'Hi' with 'He'?") print(f"{[(n.key(), n.value()) for n in t.find(b'He')]}") +# [(b'Hei', ['Romanian']), (b'Hej', ['Swedish', 'Polish']), (b'Helo', ['Welsh']), (b'Hello', ['English'])] print("Where to say 'Hi' with 'Ha'?") -print(f"{[(n.key().decode('utf-8'), n.value()) for n in t.find(b'Ha')]}") +print(f"{[(n.key().decode(), n.value()) for n in t.find(b'Ha')]}") +# [('Halló', ['Icelandic']), ('Hallo', ['German', 'Dutch'])] print("Where to say 'Hi' with 'Hē'?") -print(f"Say 'Hi' with utf-8: {[(n.key().decode('utf-8'), n.value()) for n in t.find('Hē'.encode('utf-8'))]}") +print(f"Say 'Hi' with utf-8: {[(n.key().decode(), n.value()) for n in t.find('Hē'.encode())]}") +# [('Hē', ['Hindi'])] ``` # Contribute diff --git a/setup.py b/setup.py index 17ee7a1..db886d4 100644 --- a/setup.py +++ b/setup.py @@ -1,18 +1,24 @@ import setuptools +import re with open("README.md", "r") as fh: long_description = fh.read() +# prepend all relative links with +# https://git.friedl.net/incubator/bytetrie/raw/branch/master/ +# to make them absolute +long_description = re.sub("\[(.*)\]\((?!http)(.*)\)", r"[\1](https://git.friedl.net/incubator/bytetrie/raw/branch/master/\2)", long_description) + setuptools.setup( name="bytetrie", - version="0.0.5", + version="0.0.7", url="https://git.friedl.net/incubator/bytetrie", license="MIT", author="Armin Friedl", author_email="dev@friedl.net", - description="A self-compressing radix trie with radix 256 in pure python", + description="A self-compressing, dependency-free radix trie", long_description=long_description, long_description_content_type="text/markdown",