please help test the upcoming pyenchant-1.6.6 release

419 views
Skip to first unread message

Ryan Kelly

unread,
Jun 10, 2014, 5:59:16 PM6/10/14
to pyencha...@googlegroups.com

Hi Everyone,


I am *finally* getting around to making a new release of PyEnchant.

The python packaging ecosystem has changed quite a bit since the last
release back in 2010. In particular, "eggs" are out and "wheels" are
in. So it would be great if you could help test the new bundles before
I push them live.

I've uploaded some preview versions here:

https://rfk.id.au/static/scratch/pyenchant-1.6.6/

Can you successfully install from one or more of these files?

If so, great! Please let me know (in private reply).

If not, I want to fix that! Please reply with as much info as you can
about your platform and whatever errors were encountered during the install.

You can ask pip to install from this preview by doing:

pip install -v --extra-index-url
https://rfk.id.au/static/scratch/pyenchant-1.6.6 pyenchant

And check that you got the right version by doing:

python -c "import enchant; print enchant.__version__"

There are a couple of platforms that almost certainly won't work just
yet, with win64 being the main one. I'll keep working on these over the
next few days.


Thanks,

Ryan

Chris Barker

unread,
Jun 10, 2014, 7:13:50 PM6/10/14
to pyencha...@googlegroups.com
Ryan,

Great news!

The python packaging ecosystem has changed quite a bit since the last
release back in 2010.  In particular, "eggs" are out and "wheels" are
in.  So it would be great if you could help test the new bundles before
I push them live.

great idea. 

I've uploaded some preview versions here:

   https://rfk.id.au/static/scratch/pyenchant-1.6.6/

I see these:


What does py2.py3 mean? I didn't think you could build a binary wheel that would run under both...


Also, for OS-X, it would be great to support older versions than 10.9. If you build with, for instance the python.org binaries, you should get OS-X 10.6+ Of course, there may be issues with third-party libs, but it's worth a shot, and hopefully we can test for you.

-Chris





 


 
Can you successfully install from one or more of these files?

If so, great!  Please let me know (in private reply).

If not, I want to fix that!  Please reply with as much info as you can
about your platform and whatever errors were encountered during the install.

You can ask pip to install from this preview by doing:

    pip install -v --extra-index-url
https://rfk.id.au/static/scratch/pyenchant-1.6.6 pyenchant

And check that you got the right version by doing:

    python -c "import enchant; print enchant.__version__"

There are a couple of platforms that almost certainly won't work just
yet, with win64 being the main one.  I'll keep working on these over the
next few days.


Thanks,

  Ryan

--
You received this message because you are subscribed to the Google Groups "pyenchant users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyenchant-use...@googlegroups.com.
To post to this group, send email to pyencha...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyenchant-users.
For more options, visit https://groups.google.com/d/optout.



--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris....@noaa.gov

Ryan Kelly

unread,
Jun 10, 2014, 7:44:54 PM6/10/14
to pyencha...@googlegroups.com
On 11/06/2014 8:18 AM, Chris Barker wrote:
> I see these:
>
> pyenchant-1.6.6-py2.py3-none-macosx_10_9_intel.whl <https://rfk.id.au/static/scratch/pyenchant-1.6.6/pyenchant/pyenchant-1.6.6-py2.py3-none-macosx_10_9_intel.whl> 10-Jun-2014 12:06 2056647
> pyenchant-1.6.6-py2.py3-none-win32.whl <https://rfk.id.au/static/scratch/pyenchant-1.6.6/pyenchant/pyenchant-1.6.6-py2.py3-none-win32.whl>
>
>
> What does py2.py3 mean? I didn't think you could build a binary wheel
> that would run under both...

Well, that's part of what I'm trying to figure out :-)

The binary wheels don't ship any compiled python modules, only
platform-specific support DLLs. This is explicitly called out as a
possibility in the release-tagging pep:

http://legacy.python.org/dev/peps/pep-0425/#id1

But pip doesn't seem to support it quite right, so I'm still digging
into the details.

> Also, for OS-X, it would be great to support older versions than 10.9.
> If you build with, for instance the python.org <http://python.org>
> binaries, you should get OS-X 10.6+ Of course, there may be issues with
> third-party libs, but it's worth a shot, and hopefully we can test for you.

My OSX build skills are very rusty - can you suggest appropriate CFLAGS
to build the support lib on 10.9, but have it work ok on older versions?
I think that should be the only trick involved here.

As an experiment, I've just made a copy of the 10.9 wheel and changed
its name to indicate 10.6 compatibility. If you've got an older mac,
can you please try it out and let me know what breaks, if anything?

Cheers,

Ryan

Chris Barker

unread,
Jun 11, 2014, 12:38:00 AM6/11/14
to pyencha...@googlegroups.com
On Tue, Jun 10, 2014 at 4:43 PM, Ryan Kelly <ry...@rfk.id.au> wrote:
> What does py2.py3 mean? I didn't think you could build a binary wheel
> that would run under both...

Well, that's part of what I'm trying to figure out :-)

The binary wheels don't ship any compiled python modules, only
platform-specific support DLLs.

so ctypes to call the dlls? I suppose it _should_ be possible to ship one binary wheel that supports multiple versions then, yes. (though in general, the whole distutils, pip, etc. ecosystem doen't really play with with third-party libs...)
 
 This is explicitly called out as a
possibility in the release-tagging pep:

It's mentioned, yes, but doesn't really say much about what to do in that case...
 
But pip doesn't seem to support it quite right, so I'm still digging
into the details.

yeah, kind of ugly.

> Also, for OS-X, it would be great to support older versions than 10.9.
> If you build with, for instance the python.org <http://python.org>
> binaries, you should get OS-X 10.6+ Of course, there may be issues with
> third-party libs, but it's worth a shot, and hopefully we can test for you.

My OSX build skills are very rusty - can you suggest appropriate CFLAGS
to build the support lib on 10.9, but have it work ok on older versions?
 I think that should be the only trick involved here.

I'll see what I can dig up -- I've mostly solved the problem by  simply building on an older system...
(which I could do for you if you've got straightforward build scripts set up...)
 
As an experiment, I've just made a copy of the 10.9 wheel and changed
its name to indicate 10.6 compatibility.  If you've got an older mac,
can you please try it out and let me know what breaks, if anything?

pip wont install it as is:

pyenchant-1.6.6-py2.py3-none-macosx_10_6_intel.whl is not a supported wheel on this platform.

I tried removing the extra py3, and still no luck.

(I sure wish there was more info in that message!)

then I re-named it to:

pyenchant-1.6.6-cp27-none-macosx_10_6_intel.whl

and it would install -- but you dop'nt want to be restriced to cp27 -- however, you might want to be restricted to c python, so I tried:

pyenchant-1.6.6-cp2-none-macosx_10_6_intel.whl

but no luck. This:

pyenchant-1.6.6-cp27.cp33-none-macosx_10_6_intel.whl

did work -- so that may be the way to go -- but it doesn't look like it will work for other minor version of py3

maybe time for a msg to the distutils list here....

meanwhile, let's see if I can test it:

In [1]: import enchant
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-1-be94a407aebb> in <module>()
----> 1 import enchant

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/enchant/__init__.py in <module>()
     90
     91 try:
---> 92     from enchant import _enchant as _e
     93 except ImportError:
     94     if not os.environ.get("PYENCHANT_IGNORE_MISSING_LIB",False):

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/enchant/_enchant.py in <module>()
    108       # We fake it by patching the enchant source to expose a char**, which
    109       # we can write the runtime path into ourelves.
--> 110       e = CDLL(e_path)
    111       try:
    112           e_dir = os.path.dirname(os.path.dirname(e_path))

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.pyc in __init__(self, name, mode, handle, use_errno, use_last_error)
    363
    364         if handle is None:
--> 365             self._handle = _dlopen(self._name, mode)
    366         else:
    367             self._handle = handle

OSError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/enchant/lib/libenchant.1.dylib, 6): Symbol not found: ___strlcat_chk
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/enchant/lib/libglib-2.0.0.dylib
  Expected in: /usr/lib/libSystem.B.dylib
 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/enchant/lib/libglib-2.0.0.dylib

Oh well -- I guess we'll need to figure out how to build libenchant against older OS-X libs...

getting closer?

I'll try to do a bit more tomorrow..

-Chris




 

  Cheers,


   Ryan

--
You received this message because you are subscribed to the Google Groups "pyenchant users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyenchant-use...@googlegroups.com.
To post to this group, send email to pyencha...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyenchant-users.
For more options, visit https://groups.google.com/d/optout.

Christophe Bal

unread,
Jun 11, 2014, 5:48:45 PM6/11/14
to pyencha...@googlegroups.com
Hello.

I have a little question . Does pyenchant work on Linux ?

Christophe BAL

Ryan Kelly

unread,
Jun 11, 2014, 5:53:21 PM6/11/14
to pyencha...@googlegroups.com
On 11/06/2014 6:26 PM, Christophe Bal wrote:
> Hello.
>
> I have a little question . Does pyenchant work on Linux ?

It should, yes. I use linux as my primary development platform.

However, you will need to install the underlying "enchant" library from
your package manager, there is no pre-built binary for linux.


Cheers,

Ryan


Christophe Bal

unread,
Jun 12, 2014, 9:09:04 PM6/12/14
to pyencha...@googlegroups.com
I've made an error : I was talking about the new site  http://pythonhosted.org/pyenchant/ .


2014-06-12 9:46 GMT+02:00 Christophe Bal <proj...@gmail.com>:
Here is indeed a solution from grammar checking. Here is a package using LanguageTool.


Piotr Ozarowski

unread,
Jun 12, 2014, 9:09:04 PM6/12/14
to pyencha...@googlegroups.com
[Christophe Bal, 2014-06-11]
> I have a little question . Does pyenchant work on Linux ?

It does. I upgraded my Debian package and it seems to work fine.

Ryan, could you give versioned sonames a higher priority (or hardcode
soname you use while developing pyenchant) as suggested in
https://bugs.debian.org/653402 ?
--
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl www.griffith.cc www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

Christophe Bal

unread,
Jun 12, 2014, 9:09:04 PM6/12/14
to pyencha...@googlegroups.com
This a good news.

You have forgetten to indicate it in this page, that seeems to be the new site. You should also update the link in your PyPi page.

Thanks for this great job.
Christophe BAL

PS: do you know a grammar checker working with Python ?




  Cheers,

   Ryan


Christophe Bal

unread,
Jun 12, 2014, 9:09:04 PM6/12/14
to pyencha...@googlegroups.com

Ryan Kelly

unread,
Jun 12, 2014, 9:11:37 PM6/12/14
to pyencha...@googlegroups.com
On 12/06/2014 5:49 PM, Piotr Ozarowski wrote:
> [Christophe Bal, 2014-06-11]
>> I have a little question . Does pyenchant work on Linux ?
>
> It does. I upgraded my Debian package and it seems to work fine.
>
> Ryan, could you give versioned sonames a higher priority (or hardcode
> soname you use while developing pyenchant) as suggested in
> https://bugs.debian.org/653402 ?

Thanks for the heads-up, I'll take a look and see what I can do...

Ryan

Ryan Kelly

unread,
Jun 13, 2014, 6:34:21 AM6/13/14
to pyencha...@googlegroups.com
On 11/06/2014 12:52 PM, Chris Barker wrote:
> On Tue, Jun 10, 2014 at 4:43 PM, Ryan Kelly <ry...@rfk.id.au
> > Also, for OS-X, it would be great to support older versions than 10.9.
> > If you build with, for instance the python.org <http://python.org>
> <http://python.org>
> > binaries, you should get OS-X 10.6+ Of course, there may be issues
> with
> > third-party libs, but it's worth a shot, and hopefully we can test
> for you.
>
> My OSX build skills are very rusty - can you suggest appropriate CFLAGS
> to build the support lib on 10.9, but have it work ok on older versions?
> I think that should be the only trick involved here.
>
>
> I'll see what I can dig up -- I've mostly solved the problem by simply
> building on an older system...
> (which I could do for you if you've got straightforward build scripts
> set up...)

Thanks for following up on the build process (in private email). I've
decided to do this release using the compiled DLLs from the previous
version, since the underlying C library hasn't actually changed.

That means I can get a release out the door, and then work more
thoroughly on making the DLL-building process better.

(The previous version shipped with three-way universal libs built with
the 10.4 SDK, so they should run fine for you. But the process I used
to build them no longer works on latest OSX)

> then I re-named it to:
>
> pyenchant-1.6.6-cp27-none-macosx_10_6_intel.whl
>
> and it would install -- but you don't want to be restriced to cp27 --
> however, you might want to be restricted to c python, so I tried:
>
> pyenchant-1.6.6-cp2-none-macosx_10_6_intel.whl
>
> but no luck. This:
>
> pyenchant-1.6.6-cp27.cp33-none-macosx_10_6_intel.whl
>
> did work -- so that may be the way to go -- but it doesn't look like it
> will work for other minor version of py3

I've uploaded a version named:

"pyenchant-1.6.6-py2.py3.cp27.cp26.cp32.cp33.cp34.pp27-none-macosx_10_6_intel.whl"

Which is just awful, but should enable pip to install it without
complaint on all major existing python versions, and any hypothetical
future versions that do better tag matching.

Can you please try installing again via pip and see if this version
works better? As before, the following should suffice:

pip install -v --extra-index-url
https://rfk.id.au/static/scratch/pyenchant-1.6.6 pyenchant


Thanks,

Ryan

Antti-Pekka Meronen

unread,
Jun 14, 2014, 2:15:26 AM6/14/14
to pyencha...@googlegroups.com
Hello!

It's great news that you're making a new version of PyEnchant. It's very fast spellchecking library and I wish to use it with my application in the near future. I can use it fine on linux, but when I try to compile applications that use it on windows, I encounter some problems. I attached 2 text files to this message, the output of cx_Freeze and the error message when running the compiled exe. The main problem seems to be missing libraries.

Missing modules:
? _gestalt imported from platform
? _posixsubprocess imported from subprocess
? gobject imported from enchant.checker.GtkSpellCheckerDialog
? gtk imported from enchant.checker.GtkSpellCheckerDialog
? pkg_resources imported from enchant.utils
? py2exe imported from enchant.tests
? wx imported from enchant.checker.wxSpellCheckerDialog

Do I need to install wxPython? I don't think that even has a python 3 compatible version. I am running windows 7 (x86) with python 3.3.3.
building_app_exe_using_cx_freeze.txt
running_the_compiled_app.txt

Chris Barker

unread,
Jun 15, 2014, 7:20:26 PM6/15/14
to pyencha...@googlegroups.com
On Fri, Jun 13, 2014 at 3:32 AM, Ryan Kelly <ry...@rfk.id.au> wrote:
Thanks for following up on the build process (in private email).  I've
decided to do this release using the compiled DLLs from the previous
version, since the underlying C library hasn't actually changed.

sounds like a fine idea.
 
I've uploaded a version named:

 "pyenchant-1.6.6-py2.py3.cp27.cp26.cp32.cp33.cp34.pp27-none-macosx_10_6_intel.whl"

Which is just awful, but should enable pip to install it without
complaint on all major existing python versions, and any hypothetical
future versions that do better tag matching.

makes sense.
 

Can you please try installing again via pip and see if this version
works better?  As before, the following should suffice:

   pip install -v --extra-index-url
https://rfk.id.au/static/scratch/pyenchant-1.6.6 pyenchant

OK, this is weird. Testing on a 10.7 system this time (but latest pip in both cases), I got:

pip install -v --extra-index-url https://rfk.id.au/static/scratch/pyenchant-1.6.6 pyenchant
Downloading/unpacking pyenchant
  Using version 1.6.6 (newest of versions: 1.6.6, 1.6.6, 1.6.5, 1.6.4, 1.6.3, 1.6.2, 1.6.1, 1.6.0, 1.5.3, 1.5.2, 1.5.1, 1.5.0, 1.4.2, 1.3.1, 1.3.0, 1.2.0, 1.1.5, 1.1.4)
  Downloading pyenchant-1.6.6-py2.py3-none-any.whl (61kB): 
...Downloading pyenchant-1.6.6-py2.py3-none-any.whl (61kB): 61kB downloaded
Installing collected packages: pyenchant
Successfully installed pyenchant

why did it pick up the p2.p3 this time?

and where did it get all those "newest versions"?


ahh -- I see -- it picked up the source install -- which is why when I try to use it:

In [1]: import enchant
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-be94a407aebb> in <module>()
----> 1 import enchant

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/enchant/__init__.py in <module>()
     90 
     91 try:
---> 92     from enchant import _enchant as _e
     93 except ImportError:
     94     if not os.environ.get("PYENCHANT_IGNORE_MISSING_LIB",False):

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/enchant/_enchant.py in <module>()
    138 # No usable enchant install was found :-(
    139 if e is None:
--> 140    raise ImportError("enchant C library not found")
    141 
    142 

ImportError: enchant C library not found

Which brings u a point -- it would be nice if someone got an error at install time, but not sure how you could do that, unless pip supported a post-install test script.

But it _may_ be worth adding a nice message to the ImportError here, so that users will have an idea why a seemingly successful "pip install" didn't work.

And I figure out why my system didn't find teh binary:

I've hacked my python to be a i386 only (i.e. only 32 bit). So my platform tag is:

macosx_10_6_i386

now, a universal (intel) binary will work on a i386 python, so it should pick this up. I think there has been a patch submitted and accepted to pip that will fix this.

But in the meantime, I changed the name to:

pyenchant-1.6.6-py2.py3.cp27.cp26.cp32.cp33.cp34.pp27-none-macosx_10_6_i386.whl

and it installed an works on my system.

hacking the install is a weird thing to do, so I think you're good.

I'll try to test on 10.6 when I get home tonight.

Thanks for all this!

-Chris








 

  Thanks,


    Ryan

--
You received this message because you are subscribed to the Google Groups "pyenchant users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyenchant-use...@googlegroups.com.
To post to this group, send email to pyencha...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyenchant-users.
For more options, visit https://groups.google.com/d/optout.

Ryan Kelly

unread,
Jun 16, 2014, 7:57:12 AM6/16/14
to pyencha...@googlegroups.com
On 14/06/2014 4:15 PM, Antti-Pekka Meronen wrote:
> Hello!
>
> It's great news that you're making a new version of PyEnchant. It's very
> fast spellchecking library and I wish to use it with my application in
> the near future. I can use it fine on linux, but when I try to compile
> applications that use it on windows, I encounter some problems. I
> attached 2 text files to this message, the output of cx_Freeze and the
> error message when running the compiled exe. The main problem seems to
> be missing libraries.
>
> Missing modules:
> ? _gestalt imported from platform
> ? _posixsubprocess imported from subprocess
> ? gobject imported from enchant.checker.GtkSpellCheckerDialog
> ? gtk imported from enchant.checker.GtkSpellCheckerDialog
> ? pkg_resources imported from enchant.utils
> ? py2exe imported from enchant.tests
> ? wx imported from enchant.checker.wxSpellCheckerDialog

As far as I can tell, all of these are optional dependencies so it
should be fine that they're not found.

The pyenchant windows installation should have installed some dictionary
files and supporting dlls, which will need to be bundled in with your
frozen app. You can find the names and locations of these files by
doing the following:

>>> import enchant.utils
>>> print enchant.utils.win32_data_files()

It's been a long time since I used cxfreeze, but if you can convince it
to include these files in your bundled app then pyenchant should be able
to find and use them.

(cxfreeze can't automatically find these files because they are loaded
dynamically at runtime)


Cheers,

Ryan

Ryan Kelly

unread,
Jun 16, 2014, 9:17:24 AM6/16/14
to pyencha...@googlegroups.com
On 10/06/2014 10:29 PM, Ryan Kelly wrote:
>
> Hi Everyone,
>
>
> I am *finally* getting around to making a new release of PyEnchant.

Whelp, it's live!

https://pypi.python.org/pypi/pyenchant/1.6.6

Thanks for the feedback everyone. I'll keep on eye out for any issues
over the next few days, please let me know if you run into any problems.

Cheers,

Ryan

Chris Barker

unread,
Jun 16, 2014, 6:14:48 PM6/16/14
to pyencha...@googlegroups.com
On Mon, Jun 16, 2014 at 6:16 AM, Ryan Kelly <ry...@rfk.id.au> wrote:
Whelp, it's live!

    https://pypi.python.org/pypi/pyenchant/1.6.6

nice work, thanks!

One note: on the PyPi page, it says:

"""
For Windows users, there is an executable installer program which can be used to install the software with a minimum of effort. Other users will need to install from source.
"""

You may want to update that with reference to the binary wheels.

-Chris
 


 
Thanks for the feedback everyone.  I'll keep on eye out for any issues
over the next few days, please let me know if you run into any problems.

  Cheers,

    Ryan

--
You received this message because you are subscribed to the Google Groups "pyenchant users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyenchant-use...@googlegroups.com.
To post to this group, send email to pyencha...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyenchant-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages