Date: 25 Jan 2007 20:48:51 -0000 From: Nicola Vitale <nivit@email.it> To: FreeBSD-gnats-submit@FreeBSD.org Cc: python@FreeBSD.org Subject: ports/108353: [PATCH] devel/py-simplejson: doesn't delete/add its own entry from/to easy-install.pth Message-ID: <20070125204851.40529.qmail@furbetto> Resent-Message-ID: <200701252130.l0PLUEP4093973@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 108353 >Category: ports >Synopsis: [PATCH] devel/py-simplejson: doesn't delete/add its own entry from/to easy-install.pth >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: Thu Jan 25 21:30:13 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Nicola Vitale >Release: FreeBSD 6.2-STABLE amd64 >Organization: >Environment: System: FreeBSD furbetto.domo.sva 6.2-STABLE FreeBSD 6.2-STABLE #2: Sun Jan 21 11:41:41 CET 2007 >Description: py-simplejson does not delete its own entry from ${PYTHON_SITELIBDIR}/easy-install.pth, when you remove/unistall the package/port. Further, it does not register it when you use pkg_add. Port maintainer (python@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: [neither py-setuptools nor py-simplejson installed] root # cd /usr/ports/devel/py-simplejson root # make package [...] Registering depends: py24-setuptools-0.6c3_1 python24-2.4.3_3. Creating bzip'd tar ball in '/usr/ports/devel/py-simplejson/py24-simplejson-1.4.tbz' root # make deinstall ===> Deinstalling for devel/py-simplejson ===> Deinstalling py24-simplejson-1.4 root # cd ../py-setuptools root # make deinstall ===> Deinstalling for devel/py-setuptools ===> Deinstalling py24-setuptools-0.6c3_1 pkg_delete: '/usr/local/lib/python2.4/site-packages/easy-install.pth' fails original MD5 checksum - deleted anyway. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ root # make reinstall [...] ===> Registering installation for py24-setuptools-0.6c3_1 root # cd ../py-simplejson root # pkg_add py24-simplejson-1.4.tbz root # cat /usr/local/lib/python2.4/site-packages/easy-install.pth import sys; sys.__plen = len(sys.path) ./setuptools-0.6c3-py2.4.egg import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new) [there is not simplejson and the module is not available] root # python Python 2.4.3 (#2, Nov 27 2006, 19:13:07) [GCC 3.4.6 [FreeBSD] 20060305] on freebsd6 Type "help", "copyright", "credits" or "license" for more information. >Fix: --- py24-simplejson-1.4_1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/devel/py-simplejson/Makefile /usr/ports/devel/py-simplejson.fix-1.4_1/Makefile --- /usr/ports/devel/py-simplejson/Makefile Mon Nov 27 21:09:54 2006 +++ /usr/ports/devel/py-simplejson.fix-1.4_1/Makefile Thu Jan 25 21:05:45 2007 @@ -7,6 +7,7 @@ PORTNAME= simplejson PORTVERSION= 1.4 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= http://cheeseshop.python.org/packages/source/s/simplejson/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -19,5 +20,10 @@ USE_PYTHON= yes USE_PYDISTUTILS= yes + +PYSIMPLEJSON_EGG= ${PORTNAME}-${PORTVERSION}-py${PYTHON_VER}.egg + +PLIST_SUB+= PYSIMPLEJSON_EGG=${PYSIMPLEJSON_EGG} \ + EGG_VER="${PORTNAME}==${PORTVERSION}" .include <bsd.port.mk> diff -ruN --exclude=CVS /usr/ports/devel/py-simplejson/pkg-plist /usr/ports/devel/py-simplejson.fix-1.4_1/pkg-plist --- /usr/ports/devel/py-simplejson/pkg-plist Thu Sep 7 10:10:45 2006 +++ /usr/ports/devel/py-simplejson.fix-1.4_1/pkg-plist Thu Jan 25 21:03:01 2007 @@ -1 +1,4 @@ -%%PYTHON_SITELIBDIR%%/simplejson-1.4-py2.4.egg +@comment $FreeBSD$ +@unexec easy_install -q -m -S %D/%%PYTHON_SITELIBDIR%% %%EGG_VER%% +%%PYTHON_SITELIBDIR%%/%%PYSIMPLEJSON_EGG%% +@exec easy_install -q -N -S %D/%%PYTHON_SITELIBDIR%% %%EGG_VER%% --- py24-simplejson-1.4_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: >>> import simplejson Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named simplejson ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070125204851.40529.qmail>