miyuchina / mistletoe

A fast, extensible and spec-compliant Markdown parser in pure Python.
MIT License
841 stars 119 forks source link

Contrib sub-package is missing in the mistletoe 1.0.0 PyPI version #177

Closed franferrax closed 1 year ago

franferrax commented 1 year ago

If I'm not misunderstanding #167, the contrib sub-package should be shipped as part of mistletoe, however it is missing from the PyPI's mistletoe==1.0.0 package, in either mistletoe-1.0.0.tar.gz or mistletoe-1.0.0-py3-none-any.whl.

Steps to reproduce

virtualenv -q venv && ./venv/bin/pip3 install mistletoe==1.0.0
./venv/bin/python -c "from mistletoe.contrib.jira_renderer import JIRARenderer"
rm -rf venv

Expected behavior

No errors occur

Actual behavior

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'mistletoe.contrib'
pbodnar commented 1 year ago

@franferrax, thanks for reporting this issue. It looks like we need to list all exported packages explicitly here: https://github.com/miyuchina/mistletoe/blob/v1.0.0/setup.py#L11, i.e.:

- packages=['mistletoe'],
+ packages=['mistletoe', 'mistletoe.contrib'],

I will check it out on this weekend probably.

pbodnar commented 1 year ago

Fixed in 1.0.1 - and the version has just been released. :)

franferrax commented 1 year ago

Thanks a lot @pbodnar!