[MacPorts] #56863: py-enchant: update to version 2.0.0

MacPorts noreply at macports.org
Thu Aug 16 00:16:55 UTC 2018


#56863: py-enchant: update to version 2.0.0
--------------------------+----------------------
  Reporter:  josephsacco  |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch
      Port:  py-enchant   |
--------------------------+----------------------

Comment (by josephsacco):

 Frank,

 I admire your tenacity, which has nudged me to take another look... :-).

 To build py-enchant using enchant2 rather than enchant1,  it is sufficient
 to tweak the original patch file, replacing {{{libenchant.dylib ->
 libenchant-2.dylib}}}:
 {{{
 --- enchant/_enchant.orig.py
 +++ enchant/_enchant.py
 @@ -76,7 +76,7 @@
      yield find_library("libenchant-1")
      # Special-case handling for enchant installed by macports.
      if sys.platform == 'darwin':
 -         yield "/opt/local/lib/libenchant.dylib"
 +         yield "@PREFIX@/lib/libenchant-2.dylib"


  # On win32 we ship a bundled version of the enchant DLLs.
 }}}

 The reason this works is seen by looking at:

 {{{
 cavandish:lib jsacco$ ls -l /opt/local/lib/libenchant*
 -rwxr-xr-x  1 root  admin  42348 Mar 11 18:43
 /opt/local/lib/libenchant-2.2.dylib
 -rw-r--r--  1 root  admin  41984 Mar 11 18:43
 /opt/local/lib/libenchant-2.a
 lrwxr-xr-x  1 root  admin     20 Mar 11 18:43
 /opt/local/lib/libenchant-2.dylib -> libenchant-2.2.dylib
 -rwxr-xr-x  1 root  admin  43064 Nov  2  2017
 /opt/local/lib/libenchant.1.dylib
 -rw-r--r--  1 root  admin  45712 Nov  2  2017 /opt/local/lib/libenchant.a
 lrwxr-xr-x  1 root  admin     18 Nov  2  2017
 /opt/local/lib/libenchant.dylib -> libenchant.1.dylib
 }}}

 That "fixes" the problem when building with enchant2, but... The enchant2
 build of py36-enchant fails more tests than the enchant1 build:

 {{{
 $ sudo port build py36-enchant
 $ cd work/pyenchant-2.0.0
 $ sudo sh -c "python3.6 setup.py test 2>&1 | tee test.log"
 }}}


 '''enchant1'''
 {{{
 Ran 57 tests in 3.028s

 FAILED (failures=6)
 Test failed: <unittest.runner.TextTestResult run=57 errors=0 failures=6>
 error: Test failed: <unittest.runner.TextTestResult run=57 errors=0
 failures=6>
 }}}

 '''enchant2'''
 {{{
 Ran 57 tests in 2.926s

 FAILED (failures=12, errors=2)
 Test failed: <unittest.runner.TextTestResult run=57 errors=2 failures=12>
 error: Test failed: <unittest.runner.TextTestResult run=57 errors=2
 failures=12>
 }}}

 What to do?

 In the short term, use enchant1 rather than enchant2:
 * Use the original patch
 * Edit the dependency in the Portfile to use enchant rather than enchant2

 In the longer term pour over the test errors and figure out the problems.

 It should be noted that pyenchant is currently lacking a maintainer. See

 https://github.com/rfk/pyenchant/



 -Joseph

-- 
Ticket URL: <https://trac.macports.org/ticket/56863#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list