While building jupyter-lab, trimmed for brevity: ----->8----------->8----------->8----------->8------ [...] ===> Installing for py39-docutils-0.17.1,1 ===> Registering installation for py39-docutils-0.17.1,1 as automatic [...] ===> Returning to build of py39-m2r-0.2.1_2 ===> py39-m2r-0.2.1_2 depends on package: py39-mistune0>=0 - not found [...] ===> Configuring for py39-mistune0-0.8.4 running config ===> Building for py39-mistune0-0.8.4 running build running build_py creating build creating build/lib copying mistune.py -> build/lib ===> Staging for py39-mistune0-0.8.4 ===> py39-mistune0-0.8.4 depends on package: py39-setuptools>=63.1.0 - found ===> py39-mistune0-0.8.4 depends on file: /usr/local/bin/python3.9 - found ===> Generating temporary packing list running install /usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py running install_lib creating /tmp/usr/ports/textproc/py-mistune0/work-py39/stage/usr/local/lib/python3.9 creating /tmp/usr/ports/textproc/py-mistune0/work-py39/stage/usr/local/lib/python3.9/site-packages copying build/lib/mistune.py -> /tmp/usr/ports/textproc/py-mistune0/work-py39/stage/usr/local/lib/python3.9/site-packages byte-compiling /tmp/usr/ports/textproc/py-mistune0/work-py39/stage/usr/local/lib/python3.9/site-packages/mistune.py to mistune.cpython-39.pyc writing byte-compilation script '/tmp/tmp8ege10me.py' /usr/local/bin/python3.9 /tmp/tmp8ege10me.py removing /tmp/tmp8ege10me.py running install_egg_info running egg_info writing mistune.egg-info/PKG-INFO writing dependency_links to mistune.egg-info/dependency_links.txt writing top-level names to mistune.egg-info/top_level.txt listing git files failed - pretending there aren't any reading manifest file 'mistune.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files found matching 'mistune.c' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' adding license file 'LICENSE' writing manifest file 'mistune.egg-info/SOURCES.txt' Copying mistune.egg-info to /tmp/usr/ports/textproc/py-mistune0/work-py39/stage/usr/local/lib/python3.9/site-packages/mistune-0.8.4-py3.9.egg-info running install_scripts writing list of installed files to '/tmp/usr/ports/textproc/py-mistune0/work-py39/.PLIST.pymodtmp' ===> Creating unique files: Move MAN files needing SUFFIX ===> Creating unique files: Move files needing SUFFIX ====> Compressing man pages (compress-man) ===> Installing for py39-mistune0-0.8.4 ===> Registering installation for py39-mistune0-0.8.4 as automatic [builder] Installing py39-mistune0-0.8.4... ===> py39-m2r-0.2.1_2 depends on package: py39-mistune0>=0 - found ===> Returning to build of py39-m2r-0.2.1_2 ===> py39-m2r-0.2.1_2 depends on package: py39-setuptools>=63.1.0 - found ===> py39-m2r-0.2.1_2 depends on file: /usr/local/bin/python3.9 - found ===> Generating temporary packing list Traceback (most recent call last): File "<string>", line 1, in <module> File "setup.py", line 14, in <module> from m2r import parse_from_file File "/tmp/usr/ports/textproc/py-m2r/work-py39/m2r-0.2.1/m2r.py", line 59, in <module> class RestBlockGrammar(mistune.BlockGrammar): AttributeError: module 'mistune' has no attribute 'BlockGrammar' *** Error code 1 Stop. make[6]: stopped in /usr/ports/textproc/py-m2r *** Error code 1 Stop. make[5]: stopped in /usr/ports/devel/py-Automat *** Error code 1 Stop. make[4]: stopped in /usr/ports/devel/py-twisted *** Error code 1 Stop. make[3]: stopped in /usr/ports/devel/py-twisted *** Error code 1 Stop. make[2]: stopped in /usr/ports/net-mgmt/py-prometheus-client *** Error code 1 Stop. make[1]: stopped in /usr/ports/devel/py-jupyter-server *** Error code 1 Stop. make: stopped in /usr/ports/devel/py-jupyterlab ----->8----------->8----------->8----------->8------ I don't know what this means... Python is not my strong suit. Also not urgent for me to find a solution... I'm gonna ditch jupyter, it's too much of a pain. But thought it might be worth reporting.
Thank you for the report. A corresponding bug reported upstream [0] blames breaking changes in mistune 2.x for this error. I see that neither textproc/py-mistune0 nor textproc/py-mistune mention the other in CONFLICTS. textproc/py-mistune0 installs as a module in site-packages/mistune.py while textproc/py-mistune installs as a package in site-packages/mistune/. Consequently, pkgng detects no conflict when both are installed. The Python import logic seems to prefer packages over modules. If py39-mistune-2.0.4 is installed on your build system, m2r will use it instead of its stated dependency, py39-mistune0-0.8.4. In the short-term it will be necessary for sunpoet to update the two mistune ports to conflict with each other. Longer term, m2r would have to add support mistune 2.x. Unfortunately, m2r may now be abandonware. The last release was four years ago, almost to the day (2018-10-11 [1]), and the last commit in the canonical repository was over three years ago (2019-06-04 [2]). Unless something changes upstream, the fate of textproc/py-m2r is inseparable from the fate of textproc/py-mistune0. [0] https://github.com/miyakogi/m2r/issues/66 [1] https://github.com/miyakogi/m2r/releases/tag/v0.2.1 [2] https://github.com/miyakogi/m2r/commit/66f4a5a500cdd9fc59085106bff082c9cadafaf3
(In reply to John W. O'Brien from comment #1) The same error happens with the newest update of textproc/py-m2r to v0.3.1 [1], if textproc/py-mistune0 and textproc/py-mistune are both installed. [1] https://cgit.freebsd.org/ports/commit/?id=ac0c7ff164c538f9a220dca7bb50e4272d2bca5a
(In reply to Rainer Hurling from comment #2) m2r's author has explicitly limited mistune support to "<2" [0], and indicated that 0.3.1 will be the project's terminal release [1]. [0] https://github.com/miyakogi/m2r/commit/de7be7969ae8baf73c71c8dff5271f5af2b63500 [1] https://github.com/miyakogi/m2r/commit/f23d0031af40f89ce588f2ba1ff14bed2629f8ac
Created attachment 239232 [details] textproc/py-mistune{,0}: Register mutual conflict Due to the "import" behavior described in comment #1, installing textproc/py-mistune0 and textproc/py-mistune concurrently is always an error because the Python import logic will always use the latter. If textproc/py-mistune0 is desired, it must be the only port installed for the given version of Python. This patch registers the mutual conflict.
This bug is now OBE due to the fix for bug #263956. $ pkg info -x m2r mistune py310-m2r-0.3.1_1 py311-m2r-0.3.1_1 py38-m2r-0.3.1_1 py39-m2r-0.3.1_1 py310-mistune-3.0.1 py310-mistune0-0.8.4_1 py311-mistune-3.0.1 py311-mistune0-0.8.4_1 py38-mistune-3.0.1 py38-mistune0-0.8.4_1 py39-mistune-3.0.1 py39-mistune0-0.8.4_1 $ for v in 8 9 10 11; do python3.$v -c 'import m2r' && echo py3$v OK; done py38 OK py39 OK py310 OK py311 OK