Opened 3 years ago

Closed 3 years ago

#63915 closed defect (fixed)

offlineimap: build broken by py-docutils @0.18_1 update

Reported by: catap (Kirill A. Korinsky) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jmroot (Joshua Root), michaelld (Michael Dickens)
Port: offlineimap py-docutils

Description

Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_mail_offlineimap/offlineimap/work/offlineimap-7.3.4" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build 
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build
running build_py
running build_scripts
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
python2 -msphinx -b html -d html/doctrees doc-src html
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sphinx/__main__.py", line 14, in <module>
    from sphinx.cmd.build import main
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sphinx/cmd/build.py", line 25, in <module>
    from sphinx.application import Sphinx
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sphinx/application.py", line 38, in <module>
    from sphinx.registry import SphinxComponentRegistry
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sphinx/registry.py", line 24, in <module>
    from sphinx.domains.std import GenericObject, Target
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sphinx/domains/std.py", line 24, in <module>
    from sphinx.directives import ObjectDescription
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sphinx/directives/__init__.py", line 29, in <module>
    from sphinx.directives.patches import (  # noqa
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sphinx/directives/patches.py", line 13, in <module>
    from docutils.parsers.rst.directives import images, html, tables
ImportError: cannot import name html
make[1]: *** [api] Error 1
make: *** [docs] Error 2
Command failed: PATH='/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' make docs
Exit code: 2
Error: Failed to build offlineimap: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_mail_offlineimap/offlineimap/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port offlineimap failed

Attachments (1)

main.log (20.6 KB) - added by catap (Kirill A. Korinsky) 3 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:2 Changed 3 years ago by mascguy (Christopher Nielsen)

Kirill, it looks like your port is building successfully on all of our buildbots:

https://ports.macports.org/port/offlineimap/builds/

Is this a local build attempt that's failing? If so, can you attach the full main.log?

comment:3 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: reneeotten jmroot michaelld added

CCing a few other folks who might have some ideas.

comment:4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mascguy reneeotten jmroot michaelld removed
Summary: Can't build offlineimapofflineimap @7.3.4: ImportError: cannot import name html
Last edited 3 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mascguy reneeotten jmroot michaelld added

Changed 3 years ago by catap (Kirill A. Korinsky)

Attachment: main.log added

comment:6 Changed 3 years ago by catap (Kirill A. Korinsky)

Summary: offlineimap @7.3.4: ImportError: cannot import name htmlCan't build offlineimap

Christopher, I build offlineimap on this machine a while ago, and it works.

Anyway, I've attached logs.

Thus, I see that you have merged https://github.com/macports/macports-ports/pull/12913 => let me test it.

comment:7 Changed 3 years ago by reneeotten (Renee Otten)

Cc: reneeotten removed

that should be fixed already; please make sure your ports are up-to-date before submitting a ticket...

comment:8 Changed 3 years ago by catap (Kirill A. Korinsky)

@reneeotten the root cause of issue that offlineimap is stuck on python-2.7.

comment:9 in reply to:  6 ; Changed 3 years ago by mascguy (Christopher Nielsen)

Replying to catap:

Christopher, I build offlineimap on this machine a while ago, and it works.

Anyway, I've attached logs.

Thus, I see that you have merged https://github.com/macports/macports-ports/pull/12913 => let me test it.

Kirill, let us know if that fixes the issue. If not, we'll try to help you diagnose.

comment:10 in reply to:  9 ; Changed 3 years ago by catap (Kirill A. Korinsky)

Replying to mascguy:

Replying to catap:

Thus, I see that you have merged https://github.com/macports/macports-ports/pull/12913 => let me test it.

Kirill, let us know if that fixes the issue. If not, we'll try to help you diagnose.

Christopher, it doesn't.

The root cause that offlineimap is stuck on python-2.7 and for sphinx is quite old for python-2.7. I see a few ways to fix it:

  1. Backport support for docutils-0.18 to sphinx-1.8.5 which is used for python-2.7; I've tried it for https://github.com/macports/macports-ports/pull/12916 but changes much more complicated and it requires to re-develop it near from scratch :(
  2. Use moder python and sphynx to build offlineimap's docs;
  3. Keep docutils-0.17.x for python 2.7.

Personally I feel that (3) is the best way, but maybe someone can do (1)?

comment:11 in reply to:  10 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy removed
Owner: set to mascguy
Status: newassigned

comment:12 Changed 3 years ago by mascguy (Christopher Nielsen)

Port: py-docutils added
Summary: Can't build offlineimapofflineimap: build broken by py-docutils @0.18_1 update

Okay, now I understand the issue.

It appears that the fix just merged for py-docutils - and I take responsibility for it, since I merged the PR - has broken builds for this port:

https://github.com/macports/macports-ports/commit/ebe02cae9dab3d68ac6f69c53d3df124b7922b84

However, it's unclear how we should handle this.

@michaelld/@jmroot, any thoughts on how we proceed?

comment:13 Changed 3 years ago by michaelld (Michael Dickens)

How about move py27-docutils back to 0.17.1 ? I don't see this as a big deal since it's clear that there are issues moving this specific port version to 0.18. I think this will meet the needs of all ports dependencies.

comment:14 Changed 3 years ago by reneeotten (Renee Otten)

that PR should not have been merged so quickly. It’s Josh his port and Michael could have committed this directly to master if he had wanted. Instead he opened a PR for the maintainer to look at. Per the guidelines such a PR should inly be merged by the maintainer or the PR submitter.

comment:15 in reply to:  14 Changed 3 years ago by mascguy (Christopher Nielsen)

Replying to reneeotten:

that PR should not have been merged so quickly. It’s Josh his port and Michael could have committed this directly to master if he had wanted. Instead he opened a PR for the maintainer to look at. Per the guidelines such a PR should inly be merged by the maintainer or the PR submitter.

Yep, no argument there Renee! Serves me right for having an itchy merge finger...

comment:16 in reply to:  12 Changed 3 years ago by catap (Kirill A. Korinsky)

Replying to mascguy:

Okay, now I understand the issue.

It appears that the fix just merged for py-docutils - and I take responsibility for it, since I merged the PR - has broken builds for this port:

https://github.com/macports/macports-ports/commit/ebe02cae9dab3d68ac6f69c53d3df124b7922b84

However, it's unclear how we should handle this.

@michaelld/@jmroot, any thoughts on how we proceed?

I've opened this issue before you merge it. It is a side effect from upgrade docutils at the first place.

comment:17 in reply to:  13 Changed 3 years ago by catap (Kirill A. Korinsky)

Replying to michaelld:

How about move py27-docutils back to 0.17.1 ? I don't see this as a big deal since it's clear that there are issues moving this specific port version to 0.18. I think this will meet the needs of all ports dependencies.

If I run port echo depends:'\ypy27-docutils\y' I may see that a few ports depends on py27-docutils:

bzr                             
gajim                           
py27-kivy                       
py27-pybtex-docutils            
py27-rstcheck                   
py27-sphinx                     
rst2pdf                         
trac                            
trac-devel                      
cicada                          
coherence                       
expgram                         
gr37-gsm                        
offlineimap                     
py27-python-daemon              
pypy                            
pypy36                          
pypy37                          
pypy38                          
py27-m2r                        
py27-readme_renderer

I not sure does all of them is broken, or switch to smaller version will broke them...

comment:18 Changed 3 years ago by jmroot (Joshua Root)

Yes, rolling back the docutils version for py27 is probably the best plan. Of course it's also preferable to move things off of python 2.7 whenever possible (I know it's sometimes not).

comment:19 in reply to:  18 Changed 3 years ago by catap (Kirill A. Korinsky)

Replying to jmroot:

Yes, rolling back the docutils version for py27 is probably the best plan. Of course it's also preferable to move things off of python 2.7 whenever possible (I know it's sometimes not).

Some work are made for support python3 for offlineimap but I never tried it. The work: https://github.com/OfflineIMAP/offlineimap3

comment:20 Changed 3 years ago by catap (Kirill A. Korinsky)

Good, offlineimap3 was released.

Let me updated offlineimap port to switch to version 8.0.0 which supports python 3 :)

comment:21 Changed 3 years ago by catap (Kirill A. Korinsky)

Resolution: fixed
Status: assignedclosed

In 48eadbe410c6cae1a69bd0aa544947496801abc1/macports-ports (master):

offlineimap: update to 8.0.0

The best part of this update is moving away from python 2.7!

Closes: #63915

Note: See TracTickets for help on using tickets.