Issues

Issue #37 new

pyEnchant recipe needed

andrewshkovskii
created an issue

I setuped my envirovment like this : port install python27 py27-bdist_mpkg py2-py2app py27-enchant py27-pyqt4 python_select

Used this script to build app bundle https://github.com/shuge/Enjoy-Qt-Python-Binding/blob/master/package_maker/py2app/simple/setup.py

and when i want to load my app with spell-checking.. enchant cant find dictionaries (see this thread http://stackoverflow.com/questions/9514148/what-is-going-on-with-py2app-and-pyenchant )

Comments (3)

  1. Ronald Oussoren repo owner

    py2app included pyenchant inside the site-packages.zip and it likely doesn't work there (in particular because the package contains share libraries that should be outside of the zip file).

    The easiest workaround is to add a "packages" option to setup.py with value ["enchant"].

    Version 0.8 of py2app will include a recipe for pyEnchant that will automaticly add the packages option.

    I can't test this at the moment because it is hard to install pyEnchant from source and I don't have time to debug the issues I ran into while trying to do so.

  2. Ronald Oussoren repo owner

    The packages option only works when the C library is included in the pyEnchant package (for example when using the binary egg on PyPI), when the C library is not in the pyEnchant package you must arrange for it to be copied into the application bundle.

  3. Ronald Oussoren repo owner

    Changeset d0677cbc5637 adds a basic recipe for pyEnchant, making it full features requires more work (and definitly requires me installing the thing).

    The recipe is incomplete because it works only when the enchant C library is embedded in the package, not when using an enchant C library outside of the package.

    Support the latter likely requires adding a prescript (setting environment variables) and a way to explictly include shared libraries (e.g. force py2app to include libenchant.dylib, its dependencies and data files)

  4. Log in to comment