Re: git: 0e61c307e7c5 - main - devel/py-virtualenv: Update to 20.18.0

From: Dima Panov <fluffy_at_FreeBSD.org>
Date: Tue, 14 Feb 2023 11:30:07 UTC
Moin-moin!

On 09.02.2023 18:20, Nicola Vitale wrote:
> The branch main has been updated by nivit:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=0e61c307e7c5150b2589d0cd5234ca87c47f6431
> 
> commit 0e61c307e7c5150b2589d0cd5234ca87c47f6431
> Author:     Nicola Vitale <nivit@FreeBSD.org>
> AuthorDate: 2023-02-09 15:14:36 +0000
> Commit:     Nicola Vitale <nivit@FreeBSD.org>
> CommitDate: 2023-02-09 15:20:05 +0000
> 
>      devel/py-virtualenv: Update to 20.18.0

[skip]
>      
> 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)

Nope. You shouldn't rely on unversioned python stuff, it will break build with non-default python

https://people.freebsd.org/~fluffy/-patches/0001-devel-py-virtualenv-unbreak-DOCS-build-with-non-defa.patch


-- 
Sincerely,
Dima (fluffy@FreeBSD.org, https://t.me/FluffyBSD)
(desktop, kde, x11, office, ports-secteam)@FreeBSD team