From owner-freebsd-bugs@FreeBSD.ORG Mon Jan 9 09:00:27 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7819106567A for ; Mon, 9 Jan 2012 09:00:27 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A3B168FC16 for ; Mon, 9 Jan 2012 09:00:27 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0990Rvs020411 for ; Mon, 9 Jan 2012 09:00:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0990RB2020410; Mon, 9 Jan 2012 09:00:27 GMT (envelope-from gnats) Resent-Date: Mon, 9 Jan 2012 09:00:27 GMT Resent-Message-Id: <201201090900.q0990RB2020410@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kevin McAleavey Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7974A1065675 for ; Mon, 9 Jan 2012 08:55:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 685CA8FC20 for ; Mon, 9 Jan 2012 08:55:43 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q098thcb020413 for ; Mon, 9 Jan 2012 08:55:43 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q098thIL020412; Mon, 9 Jan 2012 08:55:43 GMT (envelope-from nobody) Message-Id: <201201090855.q098thIL020412@red.freebsd.org> Date: Mon, 9 Jan 2012 08:55:43 GMT From: Kevin McAleavey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/163948: Python incompatibility on ports: deskutils/calibre X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 09:00:28 -0000 >Number: 163948 >Category: misc >Synopsis: Python incompatibility on ports: deskutils/calibre >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 09 09:00:27 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Kevin McAleavey >Release: 9.0-RC3, but *any* >Organization: KNOS Project >Environment: Not required here >Description: Calibre uses Python 2.7. However, many ports/packages are now using Python 3.x. Calibre is not compatible with 3.x versions of python, and when packages/ports are added which use Python 3, the default scripts in calibre want to use python 3.2 (currently) which are hopelessly incompatible with code written for 2.7 as is calibre and likely others as well. Calibre is broken when 3.x version of python is in the environment. >How-To-Repeat: Install anything which adds Python 3.2 such as /graphics/blender and calibre no longer loads with dyntax errors in python 3.2. >Fix: Spoke to Kovid Goyal, developer of calibre and he *insists* that his /usr/bin/python scripts all have "#!/usr/bin/env python2" in the scripts that he generates. In BSD however, each script is marked with "#!/usr/bin/env python" instead, which by default will call 3.2 and break. Obviously "python2" was modified for BSD since "python2" will not call the 2.7 python which is shipped with this port/package. Kovid suggests the following: calibre uses #!/usr/bin/env python2 It has for a long time. How did you get a version that uses bare python? I'm afraid I don't maintain the BSD calibre packages, you should contact Rusty. I will say that having a python2 symlink pointing to the latest python2 binary is good practice and should be encouraged. See http://www.python.org/dev/peps/pep-0394/ Attempted to edit the offending calls, and "python2" fails, however "python2.7" *works* and calls properly where that is in the header. Since python2.7 is shipped with the port/package, HIGHLY recommend modifying those files to call python2.7 in the header so long as PY27 is shipped WITH the port/package. Lovid has *NO* intentions of supporting PY3.x in the near future, so this would be a long-term solution for this port. >Release-Note: >Audit-Trail: >Unformatted: