Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 681564 - dev-python/pyenchant-2.0.0 with app-text/enchant-2.2.3 - src_compile(): ImportError: The 'enchant' C library was not found.
Summary: dev-python/pyenchant-2.0.0 with app-text/enchant-2.2.3 - src_compile(): Impor...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
Depends on:
Blocks: enchant-2
  Show dependency tree
Reported: 2019-03-23 18:02 UTC by Jack
Modified: 2020-10-22 18:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2019-03-23 18:02:01 UTC
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).

Reproducible: Always

Steps to Reproduce:
1.Emerge app-text/enchant=2.2.3
2.Emerge dev-python/pyenchant-2.0.0

Actual Results:  
>>> 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 build -j 3
Traceback (most recent call last):
  File "", line 212, in <module>
    import enchant
  File "/usr/portage/tmpdir/portage/dev-python/pyenchant-2.0.0/work/pyenchant-2.0.0/enchant/", 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/", line 145, in <module>
    raise ImportError(msg)
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)

Expected Results:  
successful emerge

I'm no python expert, but it appears this requires a change to the site-packages/enchant for each python version.
Comment 1 Jack 2019-03-23 18:42:25 UTC
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/  The URL I added is for the PR to pyenchant, and it can be followed to the patch itself - just the one line addition.
Comment 2 Mart Raudsepp gentoo-dev 2020-02-02 19:48:25 UTC
I've updated the existing versions to require enchant:0, with which it works.
Once there is a pyenchant that can use enchant-2 instead, it should really check for that first, and the dep should be enchant:2 then, as we want to get rid of enchant:0 as soon as possible.
Comment 3 Jack 2020-10-22 18:34:58 UTC
I no longer use pyenchangt, but I wonder if this has been resolved with upgrades to pyenchant (currently 3.1.0) and enchant (1.6.1-r1:0 and 2.2.8:2).  In the pyenchant ebuild, I see "RDEPEND="app-text/enchant:*"".