pyenchant-2.0.0 built for me with enchant-2.1.2, so this might be due to the change of library name to enchant-2 (just guessing). Seems similar to bug 676920, bug 676918, and others. I have not added this to the general tracker for packages not compiling with enchant2 (bug 629838).
Steps to Reproduce:
>>> Compiling source in /usr/portage/tmpdir/portage/dev-python/pyenchant-2.0.0/work/pyenchant-2.0.0 ...
* python3_6: running distutils-r1_run_phase distutils-r1_python_compile
python3.6 setup.py build -j 3
Traceback (most recent call last):
File "setup.py", line 212, in <module>
File "/usr/portage/tmpdir/portage/dev-python/pyenchant-2.0.0/work/pyenchant-2.0.0/enchant/__init__.py", line 92, in <module>
from enchant import _enchant as _e
File "/usr/portage/tmpdir/portage/dev-python/pyenchant-2.0.0/work/pyenchant-2.0.0/enchant/_enchant.py", line 145, in <module>
ImportError: The 'enchant' C library was not found. Please install it via your OS package manager, or use a pre-built binary wheel from PyPI.
(let me know if full build log is necessary)
I'm no python expert, but it appears this requires a change to the site-packages/enchant for each python version.
Turns out the patch is much simpler than I expected - just add the line
yield find_library("enchant-2") right after yield find_library("enchant") in enchant/_enchant.py. The URL I added is for the PR to pyenchant, and it can be followed to the patch itself - just the one line addition.