From owner-freebsd-python@FreeBSD.ORG Wed Jan 23 18:28:32 2013 Return-Path: Delivered-To: python@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 02B54485 for ; Wed, 23 Jan 2013 18:28:32 +0000 (UTC) (envelope-from mva@FreeBSD.org) Received: from smtprelay06.ispgateway.de (smtprelay06.ispgateway.de [80.67.31.96]) by mx1.freebsd.org (Postfix) with ESMTP id 8700F709 for ; Wed, 23 Jan 2013 18:28:31 +0000 (UTC) Received: from [89.182.14.160] (helo=localhost) by smtprelay06.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1Ty53f-0004S6-4K for python@FreeBSD.org; Wed, 23 Jan 2013 19:28:23 +0100 Date: Wed, 23 Jan 2013 19:28:26 +0100 From: Marcus von Appen To: python@FreeBSD.org Subject: Re: bsd.python.mk: python3 plist shim Message-ID: <20130123182826.GB1978@medusa.sysfault.org> Mail-Followup-To: python@FreeBSD.org References: <50FFD7C0.9060208@yandex.ru> <20130123165053.GA1978@medusa.sysfault.org> <5100273E.6010300@yandex.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IrhDeMKUP4DT/M7F" Content-Disposition: inline In-Reply-To: <5100273E.6010300@yandex.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-Df-Sender: MTEyNTc0Mg== X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Marcus von Appen List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2013 18:28:32 -0000 --IrhDeMKUP4DT/M7F Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On, Wed Jan 23, 2013, Ruslan Makhmatkhanov wrote: > Marcus von Appen wrote on 23.01.2013 20:50: > > Hi, > > > > On, Wed Jan 23, 2013, Ruslan Makhmatkhanov wrote: > > > >> > >> Hello, > >> > >> I'm planning to apply this patch to Mk/bsd.python.mk soon. It's an > >> nivit's solution from devel/py-virtualenv for changes, introduced in PEP > >> 3147 [1]. It will not affect default packages build, because packages > >> are not yet building for python3 on cluster, but it will affect python > >> ports, built with python3, that already has fix like that applied > >> locally. I tested it with dozen of ports and everything seems fine. > >> Local fixes will be removed right after this change. Please tell me if > >> there is any objections or suggestions on this. Thanks. > > > > [...] > > > > I still do not get what the patch should exactly do and I am too lazy to > > refresh my awk skills and try it out myself. If that patch is just about > > the [INSERT cpython-correct-XX].pyc stuff, there is no need for it in my > > opinion. > > Can you please provide details on what the patch does? > > > > Cheers > > Marcus > > Yes, it does just that by adding __pycache__ directories with compiled > and optimized bytecode into pkg-plist. This allows us to make packages > for python 3.2+ successfully. > > I can't explain more than that, because I treat that as some magic > sequence for fixing py3 packages and that already applied locally in > many ports, so it's time to just stop duplicating this pattern over the > tree. [...] Okay, understood. If we have a pkg-plist with a file entry /path/foo.pyc it changes the file path in .TMPPLIST to /path/__pycache__/foo.pyc without the need for us to fix up hundreds of plist files, correct? Is that automated patch safe for pkg usage? As far as I remember, pkg picks up .TMPPLIST rather than pkg-plist or anything else, so I assume it to be safe and working without any problem, but we should follow up on that with the pkg@ team, if you did not verify that already. Also, we have to bear in mind existing python3.2+ ports within the ports tree, for which the pkg-plist files might need a cleanup regarding the already existing __pycache__ entries (or does the patch deal with them properly?). And just to throw in something else: we really, really should support $PYTHONDONTWRITECODE (or the -B flag), remove all the pyc/pyo stuff completely from the pkg-plist files and move the logic conditionally into bsd.python.mk (somewhat similar to your patch)[0]. Would it make sense to merge that idea[0] with your patch? [0] https://wiki.freebsd.org/Ports/Python/CompiledPackages http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/168640 Cheers Marcus --IrhDeMKUP4DT/M7F Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlEAK8oACgkQi68/ErJnpkd0oQCfXxlcYuAG6SRcHyWUso9VygXk UWAAmgIEm9QyFI8Xj9dZcvQsHjBRKyPs =4l3M -----END PGP SIGNATURE----- --IrhDeMKUP4DT/M7F--