From nobody Sun Jan 23 08:42:34 2022 X-Original-To: python@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 8FAA4197D656 for ; Sun, 23 Jan 2022 08:43:02 +0000 (UTC) (envelope-from loader@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JhRTL3fjsz4pSC; Sun, 23 Jan 2022 08:43:02 +0000 (UTC) (envelope-from loader@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642927382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vSmS0afYuBCoKY/7rU5cxTKhAkcYzm3hUkelN7vbg+o=; b=ch2XVvJyOuY5+HAzOzNZC2GUAEXSiFyQi1VaMSrf3A17Ov9R3oaygBlGwTFAO+hwC7IKXn +9Pj3maHAxG/kARzaSNvf2hTVFC21iouu6QqNv6gBLU6Pnrr0enE3cFFIknAOtCHSQZK8H jeED1QSE7qLGDAGSc4akGFLSts6w7Irz1cYJr5U3iLvjh91I+6sgEfrVZxcFQ8CoAXFUYA 9ieLbxbejee2WYFcHLmQ2b2+3daSeFRj4h5sc9ugYoCZhluHu2eEy8N3GJmOVyqxysW2oD +O3tQbwj6f0Bi8DV5jU40rlX1DInUgF3AACUeBpvlf38FlRk6Z+5AD0FsqAe1g== Received: from localhost (unknown [127.0.1.132]) by freefall.freebsd.org (Postfix) with ESMTP id AD2ABC1DD; Sun, 23 Jan 2022 08:43:01 +0000 (UTC) (envelope-from loader@freebsd.org) Date: Sun, 23 Jan 2022 08:42:34 +0000 From: loader To: koobs@FreeBSD.org Cc: Stefan Esser , python@freebsd.org Subject: Re: PLIST issues in more ports? In-Reply-To: (Kubilay Kocak's message of "Fri, 21 Jan 2022 13:34:19 +1100") References: <20220116152934.D2BEC10CD2@freefall.freebsd.org> List-Id: FreeBSD-specific Python issues List-Archive: https://lists.freebsd.org/archives/freebsd-python List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-python@freebsd.org X-BeenThere: freebsd-python@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-Id: <20220123084301.AD2ABC1DD@freefall.freebsd.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642927382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vSmS0afYuBCoKY/7rU5cxTKhAkcYzm3hUkelN7vbg+o=; b=AvgGbJXj2cRwRj6JY3zWPmBVgYaKdHTsvD4Aulyqg6Us0swy/7fGiPhOK7vIS45CYZfQvJ di3fr4fAK6Om0AFO8hQ2dMLrKa2IoEJu/3vEBLmGLkkAXiwcO0/7n8HYSxtlX3xpVBCXNl C69FzVa63jtBJm8IVemZpZVkhGlKPuM1Ae+uRayUWfWXqL/ue4mJywr4dQNKVXJ7XBfYeJ mslQAOR+nJl+td6sadHYssOJjgHNpRPcUtLJlPjMbNJHjSVDuGrDfgiS0nYGAcRf3nyRPN 5IMNDP1doaeMG9pb4E+wU4WJJYIoYQD3YaMZpGlhFCb7/FVCLjiT4s36xwFRzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642927382; a=rsa-sha256; cv=none; b=ETdPuSeFBX+OKh9DtMARmz1se8pWUd1xfelOom8SRnQ/XVEqANLdGLIrTxV/PwGxP4OsIb 9QDiwzAFPlFSYoele2BCfEFmjvrH1nX4AuSwPjFakvUdh+dY3ZdJrVXHJ6TKk9Kprsb5JL R/G/80vGyj29DKTRn9RVIzD5eMpBTQXTno6wAd+4BxFwbb/mJByvVsLNjiI93uClGRwB0N FN+RgcP82DuERbLPi0S1bDHtzsD6zIj6/cIR+GznM+J5H+gcf1Cy90AegLjXFN9VLINi56 cenojOPJFic8z2rv57t++Ap+GSxCcbluXN5Rp+OMImg6VOTDbBpAmGN3aDBqzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --=-=-= Content-Transfer-Encoding: quoted-printable On Fri, 21 Jan 2022 13:34:19 +1100, Kubilay Kocak wrote: > On 17/01/2022 2:29 am, loader wrote: >> On Sat, 15 Jan 2022 01:28:09 +0100, Stefan Esser wrote: >> >>> Hi Python Maintainers, >>> >>> the following packages conflict with each other since they install >>> files that do not depend on the package: >>> >>> py38-scikit-bio >>> py38-ddtrace >>> >>> They contain files like >>> >>> lib/python3.8/site-packages/benchmarks/__pycache__/__init__.cpython-38.= pyc >>> >>> which probably should be excluded from the PLIST. >>> >>> Similarily: >>> >>> py38-mycli >>> py38-beziers >>> py38-grizzled >>> py38-gtfslib >>> py38-habanero >>> py38-molecule >>> py38-onnx-tf >>> py38-ont-fast5-api >>> py38-puppetboard >>> py38-pysmartdl >>> py38-pysodium >>> py38-pyzipper >>> py38-streamparse >>> >>> which all contain: >>> >>> lib/python3.8/site-packages/test/__init__.py >>> lib/python3.8/site-packages/test/conftest.py >>> lib/python3.8/site-packages/test/__pycache__/__init__.cpython-38.pyc >>> lib/python3.8/site-packages/test/__pycache__/conftest.cpython-38.pyc >>> >>> I have not checked for individual maintainers, but this is IMHO a >>> framework issue that should have a generic solution ... >>> >>> Should I create a PR for this issue? >>> >>> Regards, STefan >> >> Just a thought, maybe site-packages/test/ could be removed during >> autoplist, but not sure whether there's a port really needs be to >> installed into this directory. >> >> diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk >> index 6c5d11dc9d08..37aa53759698 100644 >> --- a/Mk/Uses/python.mk >> +++ b/Mk/Uses/python.mk >> @@ -616,6 +616,7 @@ _RELLIBDIR=3D ${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} >> _USES_stage+=3D 934:add-plist-pymod >> add-plist-pymod: >> @${SED} -e 's|^"\(.*\)"$$|\1|' \ >> + -e '\|^${PYTHON_SITELIBDIR}/test/|d' \ >> -e 's|^${STAGEDIR}${PREFIX}/||' \ >> -e 's|^${PREFIX}/||' \ >> -e 's|^\(man/.*man[0-9]\)/\(.*\.[0-9]\)$$|\1/\2.gz|' \ >> >> Cheers, >> loader > > Ideally and if possible, these issues should be (1) detected (sanity.mk > python.mk or similar: fatal error) and (2) reported upstream so that > they can be resolved permanently. > > Happy to discuss any time. #freebsd-python @ Libera Chat IRC Just some random thoughts: diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 6c5d11dc9d08..1c179e98e34d 100644 =2D-- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -502,6 +502,10 @@ PYTHONPREFIX_SITELIBDIR=3D ${PYTHON_SITELIBDIR:S;${PYT= HONBASE};${PREFIX};} # Used for recording the installed files. _PYTHONPKGLIST=3D ${WRKDIR}/.PLIST.pymodtmp =20 +# Installing Python package files into these directories +# in ${PYTHON_SITELIBDIR} may conflict with each other. +_PYTHON_CONFLICT_DIRS=3D benchmarks test + # Ports bound to a certain python version SHOULD # - use the PYTHON_PKGNAMEPREFIX # - use directories using the PYTHON_PKGNAMEPREFIX @@ -643,6 +647,14 @@ add-plist-python: .endif # ${PYTHON_REL} >=3D 30200 && defined(_PYTHON_FEATURE_PY3KPLIST) .endif # defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DIS= TUTILS) =20 +_USES_stage+=3D 936:check-conflict-directories +check-conflict-directories: + @for _d in ${_PYTHON_CONFLICT_DIRS}; do \ + if ${GREP} -e "^${PYTHON_SITELIBDIR:S;${PREFIX}/;;}/$${_d}/" ${TMPPLIST}= ; then \ + ${ECHO_MSG} "=3D=3D=3D> This port installs a *$${_d}* directory into PY= THON_SITELIBDIR which may conflict with the files installed by other Python= packages, please consider adding it to the find_packages() exclude filter = in setup.py, for example: packages=3Dfind_packages(exclude=3D('$${_d}',))";= exit 1; \ + fi; \ + done + # Fix for programs that build python from a GNU auto* environment CONFIGURE_ENV+=3D PYTHON=3D"${PYTHON_CMD}" =20 and an example to patch setup.py to exclude the test directory: diff --git a/security/py-pysodium/Makefile b/security/py-pysodium/Makefile index f7aeeee314ce..38145dd1f254 100644 =2D-- a/security/py-pysodium/Makefile +++ b/security/py-pysodium/Makefile @@ -2,6 +2,7 @@ =20 PORTNAME=3D pysodium PORTVERSION=3D 0.7.10 +PORTREVISION=3D 1 CATEGORIES=3D security python MASTER_SITES=3D CHEESESHOP PKGNAMEPREFIX=3D ${PYTHON_PKGNAMEPREFIX} diff --git a/security/py-pysodium/files/patch-setup.py b/security/py-pysodi= um/files/patch-setup.py new file mode 100644 index 000000000000..f64c530b0cad =2D-- /dev/null +++ b/security/py-pysodium/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2022-01-22 11:58:59 UTC ++++ setup.py +@@ -18,7 +18,7 @@ setup( + license=3D"BSD", + keywords=3D"cryptography API NaCl libsodium", + url=3D"https://github.com/stef/pysodium", +- packages=3Dfind_packages(), ++ packages=3Dfind_packages(exclude=3D('test',)), + long_description=3Dread('README.md'), + requires=3D["libsodium"], + classifiers=3D["Development Status :: 4 - Beta", Cheers, loader --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iL4EARYKAGYFAmHtFJVfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl bnBncC5maWZ0aGhvcnNlbWFuLm5ldEY0REMyN0YxQkIzMjVCMkZCNEMwOUZEMzU2 RDBBOTYxRDZDQkFEMDYACgkQVtCpYdbLrQZoQAEAP1jDf08XKZGsLnPXqUbwUkSW 5/S/wi18ar3ncO9iTpwBAMfDiPkmx7ZtnY3+UmnzKWGzNkD+EwLbUyVWWD+MGOgI =DobM -----END PGP SIGNATURE----- --=-=-=--