Bug 237179 - mail/archivemail: Doesn't work with Python 3.x
Summary: mail/archivemail: Doesn't work with Python 3.x
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-10 11:31 UTC by Helge Oldach
Modified: 2019-04-15 05:58 UTC (History)
1 user (show)

See Also:
koobs: merge-quarterly-


Attachments
Patch (329 bytes, patch)
2019-04-10 11:31 UTC, Helge Oldach
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helge Oldach 2019-04-10 11:31:39 UTC
Created attachment 203564 [details]
Patch

Today's switch to default python3 (ports r498529) broke mail/archivemail which heavily depends on python2 modules. Amend the Makefile accordingly.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-14 06:57:57 UTC
Thank you for the report Helge
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-14 08:07:16 UTC
Port needs work to level up port compliance, working on it.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-04-14 08:49:00 UTC
A commit references this bug:

Author: koobs
Date: Sun Apr 14 08:48:03 UTC 2019
New revision: 498876
URL: https://svnweb.freebsd.org/changeset/ports/498876

Log:
  mail/archivemail: Limit to Python 2.7, level up port compliance

  archivemail fails to build with Python 3.x [1]:

      print too_old_error
                        ^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean print(too_old_error)?

  Limit to Python 2.7 accordingly.

  While I'm here, level up port compliance:

    - Update COMMENT to match setup.py:description
    - Use distutils/autoplist/concurrent (package uses a setup.py). Remove
      NO_BUILD, do-install target, amend pkg-plist accordingly.
    - Patch setup.py to install man pages in /usr/local not /usr/local/share
    - Add test target to assist QA

  PR:		237179 [1]
  Reported by:	Helge Oldach <freebsd oldach net> [1]
  MFH:		2019Q2

Changes:
  head/mail/archivemail/Makefile
  head/mail/archivemail/files/
  head/mail/archivemail/files/patch-setup.py
  head/mail/archivemail/pkg-plist
Comment 4 Helge Oldach 2019-04-14 18:37:14 UTC
(In reply to commit-hook from comment #3)
Somehow the compliance part broke this port:

copying archivemail.1 -> /usr/obj/usr/ports/mail/archivemail/work-py27/stage/usr/local/man/man1
running install_egg_info
running egg_info
creating archivemail.egg-info
writing archivemail.egg-info/PKG-INFO
writing top-level names to archivemail.egg-info/top_level.txt
writing dependency_links to archivemail.egg-info/dependency_links.txt
writing manifest file 'archivemail.egg-info/SOURCES.txt'
reading manifest file 'archivemail.egg-info/SOURCES.txt'
writing manifest file 'archivemail.egg-info/SOURCES.txt'
Copying archivemail.egg-info to /usr/obj/usr/ports/mail/archivemail/work-py27/stage/usr/local/lib/python2.7/site-packages/archivemail-0.9.0-py2.7.egg-info
running install_scripts
copying build/scripts-2.7/archivemail -> /usr/obj/usr/ports/mail/archivemail/work-py27/stage/usr/local/bin
changing mode of /usr/obj/usr/ports/mail/archivemail/work-py27/stage/usr/local/bin/archivemail to 755
writing list of installed files to '/usr/obj/usr/ports/mail/archivemail/work-py27/.PLIST.pymodtmp'
cd /usr/obj/usr/ports/mail/archivemail/work-py27/archivemail-0.9.0 && install  -m 0644 CHANGELOG FAQ NEWS README TODO /usr/obj/usr/ports/mail/archivemail/work-py27/stage/usr/local/share/doc/py27-archivemail
cd /usr/obj/usr/ports/mail/archivemail/work-py27/archivemail-0.9.0 && install  -m 555 test_archivemail examples/archivemail_all /usr/obj/usr/ports/mail/archivemail/work-py27/stage/usr/local/share/examples/py27-archivemail
===> Creating unique files: Move MAN files needing SUFFIX
Move: man/man1/archivemail.1 --> man/man1/archivemail-2.7.1
Link: @man/man1/archivemail.1 --> man/man1/archivemail-2.7.1
===> Creating unique files: Move files needing SUFFIX
Move: bin/archivemail --> bin/archivemail-2.7
Link: @bin/archivemail --> bin/archivemail-2.7
====> Compressing man pages (compress-man)
===>  Installing for py27-archivemail-0.9.0_4
===>  Checking if py27-archivemail is already installed
===>   py27-archivemail-0.9.0_4 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of py27-archivemail
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop.
Comment 5 Helge Oldach 2019-04-14 18:43:14 UTC
(In reply to Helge Oldach from comment #4)
Please ignore, this is an artifact from my local metaport which collects all ports that I have chosen to install.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-15 05:58:43 UTC
This wont be merged to quarterly because it changes PKGBASE name (due to adding PYTHON_PKGNAMEPREFIX)

Thank you for the report Helge