From nobody Thu Feb 09 15:20:28 2023 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 4PCLCd3KJlz3pdyn; Thu, 9 Feb 2023 15:20:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PCLCd0wjMz4406; Thu, 9 Feb 2023 15:20:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675956029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bUyb/0RLwjuAtxG006TJHh0NXxwrpsepOBxKPTD4oBc=; b=KkiTF9nf1ZaFSI3Ws2PseXmsvAsRI6lAfzfmyVhwIh6r4O2rL6Tt9/UbamcsBgGExadY2/ lc22h6d0vB3cOZTsp/4MkuI6txLC5kof9w+LxH3leV38JM7wSD1iazK5TWjY7v9K96VriH KdBlHRC2hSHP1Rhsn75kwwhNOeeu8yMa5FOwcdDZa7abCN2WXTQgyo9BXTWgqzkDMNM4/f tnvxDayh/IIh6yHsnZM+4+uqXUlAS7YT2xUV03u/k7k87k8J1dYah2QkjTgkcxeT0GD2Of KtlMHdV67G1ZEurIRTdM8CH2AzRSTzV038FlAq4593+mMtfnUTa0eruHSW5SzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675956029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bUyb/0RLwjuAtxG006TJHh0NXxwrpsepOBxKPTD4oBc=; b=Z9ntJD7MJkOpNym9ZKdDN/WkEu2xyc3AUAEX6/0Czns/AhWNpXPjxvnPSUIM5WquEevCrI PqoN974i71XCYTHy/fpIWblbd/kp7gAZLYuwOYJps8JJTp75hLHp2EI7TpZKyhCcZUgopj n+oU6Vb6aE/GwNManT55dYwrVF0USBRZmdA1Wm0RbeX7hqzfb+536y86WkBxomZWqkux+S J0IKzy/hj7NuKtzE5FT1Nv4Nje+IryLhVw9j8l5B4qgZT8vMm0OaRLPoJDtzkDvAYeMrRH tj5VqFpD2s2/sPBoHCq5+CJrLY8hBo/cy38jSb34EDgXeVplctSAKfbD1WpI0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675956029; a=rsa-sha256; cv=none; b=UFvDfEST+c/hIC++MefYVBVZNgnFYDDd+UpXeXr3Ca1r88255570WdjBJ2xfFbHxwIk1ds U8glCj68AWDkLNqEBdrGb8yhWFI0sEzjR39/JmfASAfmx9zYlMCezejlZJwB92AkE+wEOZ LTCXPs/PXxWG19+ubUJGwgLSGJNCZ4pf7g/qtj1+oePZW3Lu1nz2e9nT/c14oQNkNnejIn UcWUBImYaa9tUTLWtP/24X0RlJeVTXW3iPXl9F1OevJDIR3h2lUuAr4OpLBzFqq1zcnz79 8W38X+GG/5BMO8ed+BW7zLERjIsakkPoxQP9YMWRoQQvUFkuqA0YDBqXKA6EWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PCLCc5F3GzhNb; Thu, 9 Feb 2023 15:20:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 319FKSS2031103; Thu, 9 Feb 2023 15:20:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 319FKShi031102; Thu, 9 Feb 2023 15:20:28 GMT (envelope-from git) Date: Thu, 9 Feb 2023 15:20:28 GMT Message-Id: <202302091520.319FKShi031102@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Nicola Vitale Subject: git: 0e61c307e7c5 - main - devel/py-virtualenv: Update to 20.18.0 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: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nivit X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e61c307e7c5150b2589d0cd5234ca87c47f6431 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by nivit: URL: https://cgit.FreeBSD.org/ports/commit/?id=0e61c307e7c5150b2589d0cd5234ca87c47f6431 commit 0e61c307e7c5150b2589d0cd5234ca87c47f6431 Author: Nicola Vitale AuthorDate: 2023-02-09 15:14:36 +0000 Commit: Nicola Vitale CommitDate: 2023-02-09 15:20:05 +0000 devel/py-virtualenv: Update to 20.18.0 - Use Python pep517 feature, because the upstream removed setuptools support - Compile and install Python bytecode (pending a definitive decision regarding this: see: https://reviews.freebsd.org/D38429 ) - Update build/test dependencies - Add a patch to pyproject.toml to fix the following Exception (build stage): from virtualenv.version import __version__ ImportError: cannot import name '__version__' from 'virtualenv.version' (/usr/local/poudriere/ports/default/devel/py-virtualenv/work-py39/virtualenv-20.18.0/dist/virtualenv-20.18.0-py3-none-any.whl/virtualenv/ version.py) Changes: https://github.com/pypa/virtualenv/releases/tag/20.18.0 --- devel/py-virtualenv/Makefile | 40 ++++++++++++++++++-------- devel/py-virtualenv/distinfo | 6 ++-- devel/py-virtualenv/files/patch-docs_conf.py | 21 ++++++++------ devel/py-virtualenv/files/patch-pyproject.toml | 16 +++++++++++ 4 files changed, 60 insertions(+), 23 deletions(-) diff --git a/devel/py-virtualenv/Makefile b/devel/py-virtualenv/Makefile index 7baa62fa77ed..1e3d9b54aefb 100644 --- a/devel/py-virtualenv/Makefile +++ b/devel/py-virtualenv/Makefile @@ -1,5 +1,5 @@ PORTNAME= virtualenv -PORTVERSION= 20.17.0 +PORTVERSION= 20.18.0 PORTREVISION= 0 CATEGORIES= devel python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -10,14 +10,12 @@ WWW= https://virtualenv.pypa.io LICENSE= MIT -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}distlib>=0.3.6:devel/py-distlib@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pip>=0:devel/py-pip@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}distlib>=0.3.6:devel/py-distlib@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}distlib>=0.3.6:devel/py-distlib@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}filelock>=3.4.1:sysutils/py-filelock@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}platformdirs>=2.4:devel/py-platformdirs@${PY_FLAVOR} -TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}coverage_enable_subprocess>=1.0:devel/py-coverage_enable_subprocess@${PY_FLAVOR} \ +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}covdefaults>=2.2.2:devel/py-covdefaults@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}coverage_enable_subprocess>=1.0:devel/py-coverage_enable_subprocess@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}flaky>=3.7.0:devel/py-flaky@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>=21.3:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest-env>=0.6.2:devel/py-pytest-env@${PY_FLAVOR} \ @@ -26,13 +24,23 @@ TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}coverage_enable_subprocess>=1.0:devel/py-co ${PYTHON_PKGNAMEPREFIX}pytest-randomly>=3.10.3:devel/py-pytest-randomly@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest-timeout>=2.1.0:devel/py-pytest-timeout@${PY_FLAVOR} -USES= cpe python:3.6+ +USES= cpe python:3.7+ USE_GITHUB= yes GH_ACCOUNT= pypa -USE_PYTHON= autoplist concurrent distutils pytest +USE_PYTHON= autoplist concurrent pep517 pytest + +PEP517_BUILD_DEPEND= ${PYTHON_PKGNAMEPREFIX}hatch-vcs>=0.3:devel/py-hatch-vcs@${PY_FLAVOR} +PEP517_BUILD_CMD= ${PYTHON_CMD} -m hatchling build --target wheel +PEP517_INSTALL_DEPEND= ${PKGNAMEPREFIX}pip>=22.3.1:devel/py-pip@${PY_FLAVOR} +PEP517_INSTALL_CMD= ${PYTHON_CMD} -m pip install --no-color --compile \ + --no-deps --no-warn-script-location --prefix ${PREFIX} \ + --progress-bar off --root ${STAGEDIR} \ + --root-user-action ignore --verbose \ + ${BUILD_WRKSRC}/dist/${PORTNAME:C/[-_]+/_/g}-${PORTVERSION}-*.whl # Fix the LookupError: setuptools-scm was unable to detect version (build target) MAKE_ENV= SETUPTOOLS_SCM_PRETEND_VERSION="${PORTVERSION}" + .if make(test) TEST_DEPENDS+= python2:lang/python2 TEST_ENV= PYTHONIOENCODING=utf-8 \ @@ -46,23 +54,30 @@ OPTIONS_DEFINE= DOCS DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click-default-group>0:devel/py-click-default-group@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}filelock>0:sysutils/py-filelock@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}furo>=2022.12.7:textproc/py-furo@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}platformdirs>0:devel/py-platformdirs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}proselint>0:devel/py-proselint@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sphinx-argparse>0:textproc/py-sphinx-argparse@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sphinx>=1.8.0,1:textproc/py-sphinx@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}towncrier>=22.8.0:textproc/py-towncrier@${PY_FLAVOR} DOCS_BINARY_ALIAS= towncrier=towncrier-${PYTHON_VER} DOCS_PLIST_FILES= man/man1/virtualenv.1.gz DOCS_PORTDOCS= * .buildinfo -# Note: we install a temporary egg_info so that virtualenv can discover its stuff, -# while sphinx builds docs. Otherwise an Exception occurs: + +# Fix the Exception: # # File "/build/lib/virtualenv/run/plugin/discovery.py", line 20, in get_discover # default=next(iter(choices)), # StopIteration # -DOCS_VARS= PYDISTUTILS_BUILD_TARGET+="install_egg_info --install-dir build/lib" +# Apparently it doesn't work setting PYTHONPATH environment variable... +VIRTUALENV_WHEEL= ${WRKSRC}/dist/${PORTNAME}-${PORTVERSION}-py${PYTHON_MAJOR_VER}-none-any.whl + +post-patch: + @${SED} -i.bak -e 's,%%VIRTUALENV_WHEEL%%,${VIRTUALENV_WHEEL},1' ${WRKSRC}/docs/conf.py + +post-install: + ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -s ${STAGEDIR} -f ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} post-install-DOCS-on: ${LOCALBASE}/bin/sphinx-build-${PYTHON_VER} -d ${WRKDIR} -b html -n ${WRKSRC}/docs ${STAGEDIR}${DOCSDIR} @@ -72,6 +87,7 @@ post-install-DOCS-on: .if "${PYTHON_VER}" == "3.7" RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=4.8.1:devel/py-importlib-metadata@${PY_FLAVOR} + .endif .include diff --git a/devel/py-virtualenv/distinfo b/devel/py-virtualenv/distinfo index 485de442d080..13167d1f9546 100644 --- a/devel/py-virtualenv/distinfo +++ b/devel/py-virtualenv/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1669666632 -SHA256 (pypa-virtualenv-20.17.0_GH0.tar.gz) = a5a67b65ffc21677ddb9f8fae0a38f23e4f34c082844f465f27433cb228572f4 -SIZE (pypa-virtualenv-20.17.0_GH0.tar.gz) = 12254220 +TIMESTAMP = 1675762684 +SHA256 (pypa-virtualenv-20.18.0_GH0.tar.gz) = 17fada8694de7adc3fa7dfc1a6bcb400403b9b129891fee116d8f3ebb5c0ba7c +SIZE (pypa-virtualenv-20.18.0_GH0.tar.gz) = 12108429 diff --git a/devel/py-virtualenv/files/patch-docs_conf.py b/devel/py-virtualenv/files/patch-docs_conf.py index 9d0dd6d85969..a29883882f74 100644 --- a/devel/py-virtualenv/files/patch-docs_conf.py +++ b/devel/py-virtualenv/files/patch-docs_conf.py @@ -1,15 +1,20 @@ ---- docs/conf.py.orig 2022-11-12 21:38:58 UTC +--- docs/conf.py.orig 2023-02-06 17:33:30 UTC +++ docs/conf.py -@@ -1,9 +1,12 @@ -+import os - import subprocess - import sys +@@ -3,6 +3,8 @@ import sys from datetime import date, datetime from pathlib import Path - import sphinx_rtd_theme ++sys.path.insert(0, '%%VIRTUALENV_WHEEL%%') + -+sys.path.insert(0, os.path.abspath('../build/lib')) - from virtualenv.version import __version__ + company = "PyPA" +@@ -48,7 +50,7 @@ extlinks = { + def setup(app): + here = Path(__file__).parent + root, exe = here.parent, Path(sys.executable) +- towncrier = exe.with_name(f"towncrier{exe.suffix}") ++ towncrier = exe.with_name(f"towncrier") + cmd = [str(towncrier), "build", "--draft", "--version", "NEXT"] + new = subprocess.check_output(cmd, cwd=root, text=True, stderr=subprocess.DEVNULL) + (root / "docs" / "_draft.rst").write_text("" if "No significant changes" in new else new) diff --git a/devel/py-virtualenv/files/patch-pyproject.toml b/devel/py-virtualenv/files/patch-pyproject.toml new file mode 100644 index 000000000000..bed8e63cfe23 --- /dev/null +++ b/devel/py-virtualenv/files/patch-pyproject.toml @@ -0,0 +1,16 @@ +--- pyproject.toml.orig 2023-02-06 17:33:30 UTC ++++ pyproject.toml +@@ -100,6 +100,13 @@ pip = "virtualenv.seed.embed.pip_invoke:PipInvoke" + + [tool.hatch] + build.hooks.vcs.version-file = "src/virtualenv/version.py" ++build.hooks.vcs.template = """\ ++# coding: utf-8 ++# file generated by setuptools_scm ++# don't change, don't track in version control ++__version__ = {version!r} ++__version_tuple__ = {version_tuple!r} ++""" + build.targets.sdist.include = ["/src", "/tests"] + version.source = "vcs" +