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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Sat, Nov 17, 2007 at 08:26:16PM +0100, Pav Lucistnik wrote:
> Hi,
>
> recently a lot of python ports developed a leftover site.py, and
> pointyhat scripts does not like that.
>
> 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.
>
> 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
===================================================================
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 @@
PORTNAME= setuptools
PORTVERSION= 0.6c7
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_CHEESESHOP}
MASTER_SITE_SUBDIR= source/s/setuptools
@@ -32,6 +33,12 @@
.endif
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
===================================================================
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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)
iD8DBQFHQkTQDWUsWc/bS6QRAj2bAKC/D+PMy/qi+HXJI8+H1NgjShEDcQCg01bF
iZWhcpLBzyNMeODEvvgnkfw=
=zB/Z
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071120022208.GA35947>
