Date: Tue, 20 Nov 2007 11:22:08 +0900 From: Hye-Shik Chang <perky@FreeBSD.org> To: Pav Lucistnik <pav@FreeBSD.org> Cc: python@FreeBSD.org Subject: Re: site.py woes Message-ID: <20071120022208.GA35947@FreeBSD.org> In-Reply-To: <1195327576.76722.6.camel@ikaros.oook.cz> References: <1195327576.76722.6.camel@ikaros.oook.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071120022208.GA35947>