From nobody Fri May 17 17:05:36 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VgtdH6wF3z5LSmy for ; Fri, 17 May 2024 17:05:39 +0000 (UTC) (envelope-from daniel.engberg.lists@pyret.net) Received: from smtp-8fab.mail.infomaniak.ch (smtp-8fab.mail.infomaniak.ch [83.166.143.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "relay.mail.infomaniak.ch", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VgtdH46H3z4Z4b for ; Fri, 17 May 2024 17:05:39 +0000 (UTC) (envelope-from daniel.engberg.lists@pyret.net) Authentication-Results: mx1.freebsd.org; none Received: from smtp-3-0000.mail.infomaniak.ch (smtp-3-0000.mail.infomaniak.ch [10.4.36.107]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4VgtdF1SphzT2b; Fri, 17 May 2024 19:05:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pyret.net; s=20231006; t=1715965537; bh=mnDEJ1EbQ/DYzKSimSPzE+NrFns18m72Rb6YnGl7ynQ=; h=Date:Subject:From:Reply-To:To:Cc:References:In-Reply-To:From; b=kLP5TF1TmaWIgtlVeKY43BZb25apJBUS1/EMhaKjmLaXBEydvBqnswrOAbIAOc8Jx 3tA4kMEKLe3LbFO826pfu94VLtJWZQPqyq4g3Fs4RtmgMu/YfKHth0ySuNn06PB1KJ wG35f2dmk0jh/zKDzblhifs2faAyIhOA4eeo1oJ0/0mDH7iXKzRePjKmMzBhkp3CXN Yfoic15ZCI/kNW3xS8CQWxITNbQahsRAuucwsBQVdeMuOeVfVaBUaerKExTSjgVGRW kUYifnNccr92btEmPMc706KO0eld2ZB4UPkYYh4ltGM+N1gZVzE6ssq5ihM7hKYOYG BWaJJ6lm+SFiw== Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4VgtdD62ghz9ZY; Fri, 17 May 2024 19:05:36 +0200 (CEST) Message-ID: <5901f7b88216d18c25dd00e3bf4646c4@mail.infomaniak.com> Date: Fri, 17 May 2024 19:05:36 +0200 Subject: Re: git: bb5ef640ea2f - main - py-libxml2: Byte compile From: Daniel Engberg Reply-To: Daniel Engberg To: "Jason E. Hale" Cc: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-WS-User-Origin: eyJpdiI6IlZrWnNtL0VXdmpYUkJ6ZE1ZUVNQV3c9PSIsInZhbHVlIjoiV0VLQ3R4UTlTb1NvUDVJejFmUUFXZz09IiwibWFjIjoiMzQ0NjAwOTAwODhlZTk1N2JkY2U3MmI4YmJhY2UzMzg1ZTQ4NWVhMjAyYzEzZjZlODQwNDU0YzI5NzdkZTc3MyIsInRhZyI6IiJ9 X-WS-User-Mbox: eyJpdiI6IkQvV2l4VWxOeWtzcmtkdG13ZHR3U1E9PSIsInZhbHVlIjoiem9GWXQ0U2l5VjJ3OERjeldkR2ZTdz09IiwibWFjIjoiMjAzODc4NDBlOWNlNWQ2NGQ4MTI3N2QzNDg4OTFiNGYwOTlmMDYwMmMxNjFjM2VmZDJkNzZmYzI3MzgyZDgzMCIsInRhZyI6IiJ9 X-WS-Location: eJxzKUpMKykGAAfpAmU- X-Mailer: Infomaniak Workspace (1.3.684) References: <202405170851.44H8pB4I015635@gitrepo.freebsd.org> In-Reply-To: <202405170851.44H8pB4I015635@gitrepo.freebsd.org> X-Infomaniak-Routing: alpha X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29222, ipnet:83.166.128.0/19, country:CH] X-Rspamd-Queue-Id: 4VgtdH46H3z4Z4b On 2024-05-17T10:51:11.000+02:00, Jason E. Hale wrote: > The branch main has been updated by jhale: >=20 > URL: https://cgit.FreeBSD.org/ports/commit/?id=3Dbb5ef640ea2f1756105b9f2a= ea44d85df600dd5e >=20 > commit bb5ef640ea2f1756105b9f2aea44d85df600dd5e > Author: Jason E. Hale > AuthorDate: 2024-05-17 07:51:35 +0000 > Commit: Jason E. Hale > CommitDate: 2024-05-17 08:51:04 +0000 >=20 > py-libxml2: Byte compile > =20 > This eliminates annoying fs-violation errors, notably from > textproc/itstool and textproc/gtk-doc where the byte code is generate= d > at build time instead of already having been generated by py-libxml2. > =20 > It is still peculiar to me that these files are dumped directly into > PYTHON_SITELIBDIR and don't have a subdirectory of their own. > Worth investigating, but hierachical changes are obviously more > intrusive and beyond this scope. > --- > textproc/libxml2/Makefile | 6 ++++++ > textproc/py-libxml2/Makefile | 17 ++++++----------- > textproc/py-libxml2/pkg-plist | 7 +++++++ > 3 files changed, 19 insertions(+), 11 deletions(-) >=20 > diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile > index e69bb22381d7..386af00928be 100644 > --- a/textproc/libxml2/Makefile > +++ b/textproc/libxml2/Makefile > @@ -55,6 +55,12 @@ post-patch: > post-install: > .if defined(LIBXML2_SLAVE) > =09${STRIP_CMD} ${STAGEDIR}${PYTHON_LIBDIR}/site-packages/libxml2mod.so > +=09${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ > +=09=09-f -d ${PYTHONPREFIX_SITELIBDIR} \ > +=09=09${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} > +=09${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \ > +=09=09-f -d ${PYTHONPREFIX_SITELIBDIR} \ > +=09=09${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} > .endif > =20 > .include ; > diff --git a/textproc/py-libxml2/Makefile b/textproc/py-libxml2/Makefile > index 33a8d506f52f..84796bac21b3 100644 > --- a/textproc/py-libxml2/Makefile > +++ b/textproc/py-libxml2/Makefile > @@ -1,9 +1,8 @@ > -PORTREVISION=3D=090 > +PORTREVISION=3D=091 > CATEGORIES=3D=09textproc gnome python > PKGNAMEPREFIX=3D=09${PYTHON_PKGNAMEPREFIX} > =20 > COMMENT=3D=09Python interface for XML parser library for GNOME > -MASTERDIR=3D=09${.CURDIR}/../libxml2 > =20 > USES+=3D=09=09gnome python shebangfix > USE_GNOME=3D=09libxml2 > @@ -14,19 +13,15 @@ SHEBANG_FILES=3D=09*.py doc/*.py python/*.py python/t= ests/*.py > # multiple versions are installed > CMAKE_ARGS=3D=09-DPython_EXECUTABLE=3D${PYTHON_CMD} > =20 > -OPTIONS_EXCLUDE=3D=09${OPTIONS_DEFINE} > +MASTERDIR=3D=09${.CURDIR}/../libxml2 > =20 > -# Tell master port we're a slave port > -LIBXML2_SLAVE=3D=09python > -# Grab pkg-descr from slave port > DESCR=3D=09=09${.CURDIR}/pkg-descr > +PLIST=3D=09=09${.CURDIR}/pkg-plist > =20 > -# Don't append pkg-plist from master port > -PLIST=3D > +OPTIONS_EXCLUDE=3D=09${OPTIONS_DEFINE} > =20 > -PLIST_FILES=3D=09${PYTHON_SITELIBDIR}/drv_libxml2.py \ > -=09=09${PYTHON_SITELIBDIR}/libxml2.py \ > -=09=09${PYTHON_SITELIBDIR}/libxml2mod.so > +# Tell master port we're a slave port > +LIBXML2_SLAVE=3D=09python > =20 > do-install: > =09=09${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} > diff --git a/textproc/py-libxml2/pkg-plist b/textproc/py-libxml2/pkg-plis= t > new file mode 100644 > index 000000000000..9cd0595dabe2 > --- /dev/null > +++ b/textproc/py-libxml2/pkg-plist > @@ -0,0 +1,7 @@ > +%%PYTHON_SITELIBDIR%%/__pycache__/drv_libxml2%%PYTHON_EXT_SUFFIX%%.opt-1= .pyc > +%%PYTHON_SITELIBDIR%%/__pycache__/drv_libxml2%%PYTHON_EXT_SUFFIX%%.pyc > +%%PYTHON_SITELIBDIR%%/__pycache__/libxml2%%PYTHON_EXT_SUFFIX%%.opt-1.pyc > +%%PYTHON_SITELIBDIR%%/__pycache__/libxml2%%PYTHON_EXT_SUFFIX%%.pyc > +%%PYTHON_SITELIBDIR%%/drv_libxml2.py > +%%PYTHON_SITELIBDIR%%/libxml2.py > +%%PYTHON_SITELIBDIR%%/libxml2mod.so Hi, Wouldn't the correct solution to use the PYTHONDONTWRITEBYTECODE environmen= t variable instead of packaging bytecode files which seems rather fragile? Best regards, Daniel