From nobody Fri May 17 17:19:09 2024 X-Original-To: dev-commits-ports-main@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 4Vgtx90hqnz5LTw5; Fri, 17 May 2024 17:19:25 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vgtx865x1z4bCg; Fri, 17 May 2024 17:19:24 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ua1-f45.google.com with SMTP id a1e0cc1a2514c-7f79ef6704eso284308241.3; Fri, 17 May 2024 10:19:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715966364; x=1716571164; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XvPUeHwAkQnbPJ5IcrZlJqQzj+bOcJTE8/sa2Xbb1Xg=; b=c1VQNUudsYPws9vQ6pa4R4Q+gtGueegnGjNC7IPSRy8KVBLMeCeNPb8GApthmEuGhS Vud9AaJYdO/YOuGzO40P7JvZ8GHIE9d7+IVyN5OipZjj95BB7TWT4ZJIL5By+/LzH6jx kTjWwJ6DgyU0RF1smgr7joZOMvqW1+6oH4SAlqPT5Ju//u3clVtcDGH00HmGXQcMTP+g umkoU8S1gxEDqD7Ft6UY0SCbDKke0vfh8O3xyqY5jF6A26YzfqCqLSa874c1Qnl3K9pe gLoySCX6xYOtR2j3Fr8Xysf9XBOVZbheG4ZjZAG2v2q9W8ayyUJCFqRo/1eTKKiXlmDe uIYg== X-Forwarded-Encrypted: i=1; AJvYcCUmMzdSGrnwEz4h603uHrX4Fy3k2OO93rkXZ0bpnYefcAAItXb38d/uFCkR6YBdv+5reGtGubZq9DDuHnMdZcgzkMx6j7GBxfrx1ejy4adu25E5JN9iE6V6SSiBUkFQ9sLId0apwQFZHNsYXzxfMcqdzGNh3dC6QcanhbQTnXbgsfJWkbTtmffIUqgkwpy9VAwylIc= X-Gm-Message-State: AOJu0YxTzXeI6vdMxUTdrcqqkip/e54c4hlZxpFvCdlijoFBomZmRowB Yqi2u4kKsfD7+QgLn/fQCwvNNUGkN/lGfDbH6P6a64FfzBltgrAxhc5RRZfTOarq34LP4qj5ygk YUmEI1U+JvDqZcCowGLcGaPdGZkWeDg== X-Google-Smtp-Source: AGHT+IGqs9UtZiL4FAwft3uNbDj9DstchLuuPk8Km5ROEJtW/XT5yWCuIbBngGvV0D0l15ZIhJMTXAJ1JECrfmZbkZQ= X-Received: by 2002:a05:6122:31a1:b0:4df:1d07:5ffa with SMTP id 71dfb90a1353d-4df88283d2fmr21736428e0c.3.1715966362176; Fri, 17 May 2024 10:19:22 -0700 (PDT) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 References: <202405170851.44H8pB4I015635@gitrepo.freebsd.org> <5901f7b88216d18c25dd00e3bf4646c4@mail.infomaniak.com> In-Reply-To: <5901f7b88216d18c25dd00e3bf4646c4@mail.infomaniak.com> From: Antoine Brodin Date: Fri, 17 May 2024 19:19:09 +0200 Message-ID: Subject: Re: git: bb5ef640ea2f - main - py-libxml2: Byte compile To: Daniel Engberg Cc: "Jason E. Hale" , ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Vgtx865x1z4bCg On Fri, May 17, 2024 at 7:05=E2=80=AFPM Daniel Engberg wrote: > On 2024-05-17T10:51:11.000+02:00, Jason E. Hale wrote= : > > The branch main has been updated by jhale: > > > > URL: https://cgit.FreeBSD.org/ports/commit/?id=3Dbb5ef640ea2f1756105b9f= 2aea44d85df600dd5e > > > > 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 > > > > py-libxml2: Byte compile > > > > This eliminates annoying fs-violation errors, notably from > > textproc/itstool and textproc/gtk-doc where the byte code is genera= ted > > at build time instead of already having been generated by py-libxml= 2. > > > > It is still peculiar to me that these files are dumped directly int= o > > 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(-) > > > > 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) > > ${STRIP_CMD} ${STAGEDIR}${PYTHON_LIBDIR}/site-packages/libxml2mod= .so > > + ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ > > + -f -d ${PYTHONPREFIX_SITELIBDIR} \ > > + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} > > + ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \ > > + -f -d ${PYTHONPREFIX_SITELIBDIR} \ > > + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} > > .endif > > > > .include ; > > diff --git a/textproc/py-libxml2/Makefile b/textproc/py-libxml2/Makefil= e > > index 33a8d506f52f..84796bac21b3 100644 > > --- a/textproc/py-libxml2/Makefile > > +++ b/textproc/py-libxml2/Makefile > > @@ -1,9 +1,8 @@ > > -PORTREVISION=3D 0 > > +PORTREVISION=3D 1 > > CATEGORIES=3D textproc gnome python > > PKGNAMEPREFIX=3D ${PYTHON_PKGNAMEPREFIX} > > > > COMMENT=3D Python interface for XML parser library for GNOME > > -MASTERDIR=3D ${.CURDIR}/../libxml2 > > > > USES+=3D gnome python shebangfix > > USE_GNOME=3D libxml2 > > @@ -14,19 +13,15 @@ SHEBANG_FILES=3D *.py doc/*.py python/*.py pytho= n/tests/*.py > > # multiple versions are installed > > CMAKE_ARGS=3D -DPython_EXECUTABLE=3D${PYTHON_CMD} > > > > -OPTIONS_EXCLUDE=3D ${OPTIONS_DEFINE} > > +MASTERDIR=3D ${.CURDIR}/../libxml2 > > > > -# Tell master port we're a slave port > > -LIBXML2_SLAVE=3D python > > -# Grab pkg-descr from slave port > > DESCR=3D ${.CURDIR}/pkg-descr > > +PLIST=3D ${.CURDIR}/pkg-plist > > > > -# Don't append pkg-plist from master port > > -PLIST=3D > > +OPTIONS_EXCLUDE=3D ${OPTIONS_DEFINE} > > > > -PLIST_FILES=3D ${PYTHON_SITELIBDIR}/drv_libxml2.py \ > > - ${PYTHON_SITELIBDIR}/libxml2.py \ > > - ${PYTHON_SITELIBDIR}/libxml2mod.so > > +# Tell master port we're a slave port > > +LIBXML2_SLAVE=3D python > > > > do-install: > > ${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} > > diff --git a/textproc/py-libxml2/pkg-plist b/textproc/py-libxml2/pkg-pl= ist > > 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.p= yc > > +%%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 environm= ent variable instead of packaging bytecode files which seems rather fragile= ? This has been already discussed a lot and no. Antoine