Bug 239106 - textproc/unoconv: SyntaxError: Missing parentheses in call to 'print' with Python 3.x
Summary: textproc/unoconv: SyntaxError: Missing parentheses in call to 'print' with Py...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-07-10 09:25 UTC by Gerasimos Melissaratos
Modified: 2019-07-10 15:30 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback? (koalative)
koobs: merge-quarterly?


Attachments
patch to make unoconv 0.6_1 run successfully with python3 (8.08 KB, patch)
2019-07-10 09:25 UTC, Gerasimos Melissaratos
no flags Details | Diff
patch to make unoconv 0.6_1 run successfully with python3 (15.57 KB, patch)
2019-07-10 09:34 UTC, Gerasimos Melissaratos
no flags Details | Diff
Makefile for unoconv 0.7 (1.71 KB, text/plain)
2019-07-10 14:54 UTC, Gerasimos Melissaratos
no flags Details
distinfo for unoconv 0.7 (270 bytes, text/plain)
2019-07-10 14:55 UTC, Gerasimos Melissaratos
no flags Details
patch for Makefile for unoconv 0.7 (818 bytes, patch)
2019-07-10 15:30 UTC, Gerasimos Melissaratos
no flags Details | Diff
patch for distinfo for unoconv 0.7 (538 bytes, patch)
2019-07-10 15:30 UTC, Gerasimos Melissaratos
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gerasimos Melissaratos 2019-07-10 09:25:32 UTC
Created attachment 205651 [details]
patch to make unoconv 0.6_1 run successfully with python3

When starting `/usr/local/bin/unoconv --listener` it crashes with error message:
-----
  File "/usr/local/share/unoconv/unoconv", line 241
    print 'PATH=%s' % os.environ['PATH']
                  ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('PATH=%s' % os.environ['PATH'])?
-----
From what I saw it calls python3, but its code still uses python2 functions. The attached patch modifies the code from python2 to use python3 and starts unoconv successfully.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-07-10 09:29:55 UTC
@Gerasimos Thank you for the report and patch. Could you update it to be in unified diff format please
Comment 2 Gerasimos Melissaratos 2019-07-10 09:34:55 UTC
Created attachment 205652 [details]
patch to make unoconv 0.6_1 run successfully with python3

modified to use unified diff format
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2019-07-10 09:39:28 UTC
Looks like upstream fixed this a while ago in:

https://github.com/unoconv/unoconv/pull/111

Upstream (github) is now at 0.8.2

0.7.0 is the latest mentioned on http://dag.wiee.rs/home-made/unoconv/ (homepage)

This port has incorrectly not restricted USES=python to only 2.7 (0.6 does not appear to support Python 3)
Comment 4 Gerasimos Melissaratos 2019-07-10 10:13:03 UTC
In that case the new version needs to become available in the pkg colection, because it still downloads version 0.6_1.
Comment 5 Gerasimos Melissaratos 2019-07-10 14:54:45 UTC
Created attachment 205660 [details]
Makefile for unoconv 0.7
Comment 6 Gerasimos Melissaratos 2019-07-10 14:55:12 UTC
Created attachment 205661 [details]
distinfo for unoconv 0.7
Comment 7 Gerasimos Melissaratos 2019-07-10 14:58:29 UTC
Uploaded Makefile and distfile for version 0.7 of unoconv.
Comment 8 Gerasimos Melissaratos 2019-07-10 15:30:18 UTC
Created attachment 205662 [details]
patch for Makefile for unoconv 0.7

diff of Makefile
Comment 9 Gerasimos Melissaratos 2019-07-10 15:30:59 UTC
Created attachment 205663 [details]
patch for distinfo for unoconv 0.7

patch for distinfo