From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Sep 2 11:00:20 2011 Return-Path: Delivered-To: freebsd-ports-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 4C8F4106567E for ; Fri, 2 Sep 2011 11:00:19 +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 66DE98FC0C for ; Fri, 2 Sep 2011 11:00:19 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p82B0JAS058584 for ; Fri, 2 Sep 2011 11:00:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p82B0JCM058583; Fri, 2 Sep 2011 11:00:19 GMT (envelope-from gnats) Resent-Date: Fri, 2 Sep 2011 11:00:19 GMT Resent-Message-Id: <201109021100.p82B0JCM058583@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ruslan Mahmatkhanov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBB011065672 for ; Fri, 2 Sep 2011 10:58:32 +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 CB86D8FC20 for ; Fri, 2 Sep 2011 10:58:32 +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 p82AwW4A078784 for ; Fri, 2 Sep 2011 10:58:32 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p82AwWBl078783; Fri, 2 Sep 2011 10:58:32 GMT (envelope-from nobody) Message-Id: <201109021058.p82AwWBl078783@red.freebsd.org> Date: Fri, 2 Sep 2011 10:58:32 GMT From: Ruslan Mahmatkhanov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/160390: [PATCH] devel/py-ToscaWidgets: depend on simplejson conditionally X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 11:00:20 -0000 >Number: 160390 >Category: ports >Synopsis: [PATCH] devel/py-ToscaWidgets: depend on simplejson conditionally >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Sep 02 11:00:19 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Ruslan Mahmatkhanov >Release: 9.0-BETA1 >Organization: >Environment: 9.0-BETA1 i386 >Description: Right now this port uncoditionally depends on devel/py-simplejson, but it actually should not. They use native json module if running on python 2.6+ and use external simplejson if python < 2.6. In setup.py: """ if sys.version_info < (2, 6): _install_requires.append("simplejson >= 2.0") """ In other code: """ try: from json import JSONEncoder except ImportError: # Python < 2.6 from simplejson import JSONEncoder """ This patch make it depend on devel/py-simplejson only if python version < 2.6. tag: simplejson26 >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruNa py-ToscaWidgets.orig/Makefile py-ToscaWidgets/Makefile --- py-ToscaWidgets.orig/Makefile 2011-08-26 04:11:06.000000000 +0400 +++ py-ToscaWidgets/Makefile 2011-09-02 14:52:09.000000000 +0400 @@ -6,6 +6,7 @@ PORTNAME= ToscaWidgets PORTVERSION= 0.9.12 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -13,11 +14,16 @@ MAINTAINER= wen@FreeBSD.org COMMENT= A python framework for building reusable web components -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}webob>=0:${PORTSDIR}/www/py-webob \ - ${PYTHON_PKGNAMEPREFIX}simplejson>=2.0:${PORTSDIR}/devel/py-simplejson +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}webob>=0:${PORTSDIR}/www/py-webob RUN_DEPENDS= ${BUILD_DEPENDS} USE_PYTHON= 2.5+ USE_PYDISTUTILS= easy_install -.include +.include + +.if ${PYTHON_REL} < 260 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}simplejson>=2.0.9:${PORTSDIR}/devel/py-simplejson +.endif + +.include >Release-Note: >Audit-Trail: >Unformatted: