py39-recommonmark has a missing dependency: py39-sphinx and then make: stopped in ...

I ran the following:

portmaster --check-depends

Code:
Checking all packages: 100%
py39-recommonmark has a missing dependency: py39-sphinx

So I tried to reinstall textproc/py-recommonmark

Code:
===>>> The following actions will be taken if you choose to proceed:
        Re-install py39-recommonmark-0.5.0_2
        Install textproc/py-sphinx@py39
        Install devel/py-importlib-metadata@py39
        Install devel/py-zipp@py39
===>>> Proceed? y/n [y]

But then I'm getting the following make error:

Code:
  File "/usr/local/lib/python3.9/site-packages/setuptools/_importlib.py", line 31, in <listcomp>
    if isinstance(ob, importlib_metadata.MetadataPathFinder)
AttributeError: module 'importlib_metadata' has no attribute 'MetadataPathFinder'
*** Error code 1
Stop.
make: stopped in /usr/ports/

===>>> make build failed for textproc/py-recommonmark
===>>> Aborting update
===>>> You can restart from the point of failure with this command line:
portmaster <flags> textproc/py-recommonmark textproc/py-sphinx@py39 devel/py-importlib-metadata@py39 devel/py-zipp@py39

This command has been saved to ~/portmasterfail.txt

I also tried to reinstall python but with no luck.
Anyone know what's happening here?

Thanks,
 
Building on a live system is prone to such errors unfortunately … it looks like the build is picking up things already installed in your system.

You could try the big hammer: Uninstall all python packages, check there are no remains in /usr/local/lib/python3.9, then do a clean rebuild/reinstall.

You can also avoid such problems by using poudriere instead to build your own package repository.
 
See also: https://forums.freebsd.org/threads/cant-build-devel-py-setuptools.88105/#post-600811

The issue seems to be that it tries to build Python-something before it's got the importlib library up-to-date. Hence this:
Code:
AttributeError: module 'importlib_metadata' has no attribute 'MetadataPathFinder'

So this worked for me, YMMV, this is just trying something that seemed to work, you are on your own etc:
Code:
# cd /usr/ports/devel/py-importlib-metadata/
# make install
 
Back
Top