diff options
author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-09-27 19:44:11 +0000 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-09-27 19:48:07 +0000 |
commit | 0a304e40cbe2b09d8d62d35c117523156b4bd7ae (patch) | |
tree | ba6dee0285ab8f037363d087c117017ad2174718 /textproc/py-marko/files | |
parent | d08cccaa487fc24db7a691ef29ae48a01dbef2d2 (diff) | |
download | ports-0a304e40cbe2b09d8d62d35c117523156b4bd7ae.tar.gz ports-0a304e40cbe2b09d8d62d35c117523156b4bd7ae.zip |
textproc/py-marko: Add py-marko 1.1.0
Marko is a markdown parser written in pure Python that complies with
CommonMark's spec v0.30. It is designed to be highly extensible.
Among all implementations of Python's markdown parser, it is a common issue that
user can't easily extend it to add his own features. Furthermore,
Python-Markdown and mistune don't comply with CommonMark's spec. It is a good
reason for me to develop a new markdown parser.
Respecting that Marko complies with CommonMark's spec at the same time, which is
a super complicated spec, Marko's performance will be affected. However, using a
parser which doesn't comply with the CommonMark spec may give you unexpected
rendered results from time to time. A benchmark result shows that Marko is 3
times slower than Python-Markdown, but a bit faster than Commonmark-py, much
slower than mistune. If performance is a bigger concern to you than spec
compliance, you'd better choose another parser.
WWW: https://github.com/frostming/marko
Diffstat (limited to 'textproc/py-marko/files')
-rw-r--r-- | textproc/py-marko/files/setup.py | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/textproc/py-marko/files/setup.py b/textproc/py-marko/files/setup.py new file mode 100644 index 000000000000..030fc4e7211e --- /dev/null +++ b/textproc/py-marko/files/setup.py @@ -0,0 +1,66 @@ + +# -*- coding: utf-8 -*- +from setuptools import setup + +import codecs + +with codecs.open('README.md', encoding="utf-8") as fp: + long_description = fp.read() +EXTRAS_REQUIRE = { + 'toc': [ + 'python-slugify', + ], + 'codehilite': [ + 'pygments', + ], + 'benchmark': [ + 'commonmark~=0.9', + 'markdown~=3.3', + 'markdown-it-py~=0.6', + 'mistune~=0.8', + 'mistletoe~=0.7', + ], +} +ENTRY_POINTS = { + 'console_scripts': [ + 'marko = marko.cli:main', + ], +} + +setup_kwargs = { + 'name': 'marko', + 'version': '1.1.0', + 'description': 'A markdown parser with high extensibility.', + 'long_description': long_description, + 'license': 'MIT', + 'author': '', + 'author_email': 'Frost Ming <mianghong@gmail.com>', + 'maintainer': None, + 'maintainer_email': None, + 'url': 'https://github.com/frostming/marko', + 'packages': [ + 'marko', + 'marko.ext', + 'marko.ext.gfm', + ], + 'package_data': {'': ['*']}, + 'long_description_content_type': 'text/markdown', + 'classifiers': [ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + ], + 'extras_require': EXTRAS_REQUIRE, + 'python_requires': '>=3.6', + 'entry_points': ENTRY_POINTS, + +} + + +setup(**setup_kwargs) |