diff --git a/setup.py b/setup.py index b4f4c84..b4b91ca 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,6 @@ import distutils.command.build_py import distutils.command.sdist import distutils.core -import packaging.version import os import os.path import re @@ -128,12 +127,12 @@ def get_readme_lines(): yield '\n' with codecs.open('version-history.rst', 'r', 'utf-8') as fd: - min_version = packaging.version.parse('2.0') - version_re = re.compile(r'^- ([0-9.]*):') + min_major_version = 2 + version_re = re.compile(r'^([0-9]+)\.[0-9.]+:') cleanup_re = re.compile(r':(?:class|func|const):`([^`]*)`') for line in fd: m = version_re.search(line) - if m and packaging.version.parse(m.group(1)) < min_version: + if m and int(m.group(1)) < min_major_version: break line, _ = cleanup_re.subn(r'``\1``', line) yield line @@ -146,7 +145,6 @@ def get_readme_lines(): 'name': 'pygtrie', 'version': release, 'description': 'A pure Python trie data structure implementation.', - 'long_description_content_type': 'text/x-rst', 'long_description': readme, 'author': 'Michal Nazarewicz', 'author_email': 'mina86@mina86.com', diff --git a/version-history.rst b/version-history.rst index 79555c9..eae2b57 100644 --- a/version-history.rst +++ b/version-history.rst @@ -1,7 +1,13 @@ Version History --------------- -2.4.0: 2020/11/19 +2.4.1: 2020/11/20 + +- Remove dependency on ``packaging`` module from ``setup.py`` to fix + installation on systems without that package. [Thanks to Eric + McLachlan for reporting] + +2.4.0: 2020/11/19 [pulled back from PyPi] - Change ``children`` argument of the ``node_factory`` passed to :func:`Trie.traverse` from a generator to an iterator with a custom