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...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: enchant-2
  Show dependency tree
 
Reported: 2019-03-23 18:02 UTC by Jack
Modified: 2019-03-24 12:30 UTC (History)
0 users

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


Attachments

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 setup.py build -j 3
Traceback (most recent call last):
  File "setup.py", line 212, in <module>
    import enchant
  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>
    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/_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.