1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-07-05 11:29:15 -04:00
ports/devel/py-virtualenv/files/patch-docs_conf.py
Dima Panov f4bc59d503
devel/py-virtualenv: unbreak DOCS build with non-default python (+)
We should always use versioned python-related stuff

Approved by:	portmgr blanket

Sponsored by:	Serenity Cybersecurity, LLC
2023-03-04 14:58:58 +03:00

20 lines
767 B
Python

--- docs/conf.py.orig 2023-02-06 17:33:30 UTC
+++ docs/conf.py
@@ -3,6 +3,8 @@ import sys
from datetime import date, datetime
from pathlib import Path
+sys.path.insert(0, '%%VIRTUALENV_WHEEL%%')
+
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-%%PYTHON_VER%%")
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)