From owner-freebsd-python@FreeBSD.ORG Tue Nov 20 02:22:28 2007 Return-Path: <owner-freebsd-python@FreeBSD.ORG> Delivered-To: python@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8821516A418; Tue, 20 Nov 2007 02:22:28 +0000 (UTC) (envelope-from perky@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 58B2613C459; Tue, 20 Nov 2007 02:22:28 +0000 (UTC) (envelope-from perky@FreeBSD.org) Received: from freefall.freebsd.org (perky@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lAK2MSS8089558; Tue, 20 Nov 2007 02:22:28 GMT (envelope-from perky@freefall.freebsd.org) Received: from localhost (localhost [[UNIX: localhost]]) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lAK2MSPv089557; Tue, 20 Nov 2007 02:22:28 GMT (envelope-from perky) Date: Tue, 20 Nov 2007 11:22:08 +0900 From: Hye-Shik Chang <perky@FreeBSD.org> To: Pav Lucistnik <pav@FreeBSD.org> Message-ID: <20071120022208.GA35947@FreeBSD.org> References: <1195327576.76722.6.camel@ikaros.oook.cz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline In-Reply-To: <1195327576.76722.6.camel@ikaros.oook.cz> User-Agent: Mutt/1.4.2.3i X-Accept-Language: ko, en Cc: python@FreeBSD.org Subject: Re: site.py woes X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Python issues <freebsd-python.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-python>, <mailto:freebsd-python-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-python> List-Post: <mailto:freebsd-python@freebsd.org> List-Help: <mailto:freebsd-python-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-python>, <mailto:freebsd-python-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 20 Nov 2007 02:22:28 -0000 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 17, 2007 at 08:26:16PM +0100, Pav Lucistnik wrote: > Hi, >=20 > recently a lot of python ports developed a leftover site.py, and > pointyhat scripts does not like that. >=20 > I checked into the easy_install source, and it seems it will copy > site.py from it's .egg subdir to PYTHON_SITELIBDIR on every install. >=20 > Since I don't see a way to force it to delete it on deinstall, my > suggestion is as follows - what if we plant site.py into > PYTHON_SITELIBDIR in py-setuptools post-install, and delete it on it's > deinstall? I couldn't find a neat way to force not to install the file, either. The idea sounds good to me. py-setuptools tries to touch the file for various purposes, it'll be quite hard to fix for every time new usage is found. Thanks for the investigation. Here's a patch. Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/pcvs/ports/devel/py-setuptools/Makefile,v retrieving revision 1.15 diff -u -r1.15 Makefile --- Makefile 10 Sep 2007 00:09:34 -0000 1.15 +++ Makefile 20 Nov 2007 02:20:32 -0000 @@ -7,6 +7,7 @@ =20 PORTNAME=3D setuptools PORTVERSION=3D 0.6c7 +PORTREVISION=3D 1 CATEGORIES=3D devel python MASTER_SITES=3D ${MASTER_SITE_CHEESESHOP} MASTER_SITE_SUBDIR=3D source/s/setuptools @@ -32,6 +33,12 @@ .endif =20 post-install: + ${INSTALL_DATA} ${WRKSRC}/site.py ${PYTHON_SITELIBDIR} +.for opt in -Qold -O + ${PYTHON_CMD} ${opt} -m compileall -l -x \ + '^[^s][^i]?[^t]?[^e]?[^.][^p][^y]$$' ${PYTHON_SITELIBDIR} +.endfor + .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/*.txt ${DOCSDIR} Index: pkg-plist =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/pcvs/ports/devel/py-setuptools/pkg-plist,v retrieving revision 1.10 diff -u -r1.10 pkg-plist --- pkg-plist 1 Sep 2007 22:12:58 -0000 1.10 +++ pkg-plist 20 Nov 2007 02:20:33 -0000 @@ -3,6 +3,9 @@ bin/easy_install-%%PYVER%% %%PYTHON_SITELIBDIR%%/easy-install.pth %%PYTHON_SITELIBDIR%%/setuptools.pth +%%PYTHON_SITELIBDIR%%/site.py +%%PYTHON_SITELIBDIR%%/site.pyc +%%PYTHON_SITELIBDIR%%/site.pyo %%PYTHON_CURRENT%%%%PYTHON_SITELIBDIR%%/setuptools-%%VERSION%%-py%%PYVER%%= .egg %%PYTHON_OLD%%%%PYTHON_SITELIBDIR%%/setuptools-%%VERSION%%-py%%PYVER%%.egg= /EGG-INFO/PKG-INFO %%PYTHON_OLD%%%%PYTHON_SITELIBDIR%%/setuptools-%%VERSION%%-py%%PYVER%%.egg= /EGG-INFO/SOURCES.txt Hye-Shik --ikeVEW9yuYc//A+q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHQkTQDWUsWc/bS6QRAj2bAKC/D+PMy/qi+HXJI8+H1NgjShEDcQCg01bF iZWhcpLBzyNMeODEvvgnkfw= =zB/Z -----END PGP SIGNATURE----- --ikeVEW9yuYc//A+q--