git: 8d1defa4bf66 - main - devel/py-avocado-framework: update to 112.0

From: Roman Bogorodskiy <novel_at_FreeBSD.org>
Date: Sun, 19 Oct 2025 04:58:18 UTC
The branch main has been updated by novel:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8d1defa4bf6641680bddd0a977a787d273aed047

commit 8d1defa4bf6641680bddd0a977a787d273aed047
Author:     Roman Bogorodskiy <novel@FreeBSD.org>
AuthorDate: 2025-10-18 17:27:31 +0000
Commit:     Roman Bogorodskiy <novel@FreeBSD.org>
CommitDate: 2025-10-19 04:56:26 +0000

    devel/py-avocado-framework: update to 112.0
    
     - Update to 112.0
     - Switch to the upstream suggested approach for /usr/local prefix
       handling rather than keeping a local patch
    
    Sponsored by:   The FreeBSD Foundation
---
 devel/py-avocado-framework/Makefile                |   7 +-
 devel/py-avocado-framework/distinfo                |   8 +-
 .../files/patch-allow-to-override-etc-dir-location | 122 ---------------------
 3 files changed, 9 insertions(+), 128 deletions(-)

diff --git a/devel/py-avocado-framework/Makefile b/devel/py-avocado-framework/Makefile
index 05c7e6c836cc..42ea8627d249 100644
--- a/devel/py-avocado-framework/Makefile
+++ b/devel/py-avocado-framework/Makefile
@@ -1,8 +1,11 @@
 PORTNAME=	avocado-framework
-DISTVERSION=	111.0
+DISTVERSION=	112.0
 CATEGORIES=	devel python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+=	dcfd5a7.patch:-p1 # https://github.com/avocado-framework/avocado/pull/6171/
+
 MAINTAINER=	novel@FreeBSD.org
 COMMENT=	Set of tools and libraries to help with automated testing
 WWW=		https://avocado-framework.github.io/
@@ -18,8 +21,6 @@ GH_ACCOUNT=	${PORTNAME}
 GH_PROJECT=	avocado
 USE_PYTHON=	autoplist distutils
 
-PYDISTUTILS_INSTALLARGS+=	--etcprefix="${PREFIX}"
-
 NO_ARCH=	yes
 
 .include <bsd.port.mk>
diff --git a/devel/py-avocado-framework/distinfo b/devel/py-avocado-framework/distinfo
index 1d64a1fd2be7..466aade9f58a 100644
--- a/devel/py-avocado-framework/distinfo
+++ b/devel/py-avocado-framework/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1749475588
-SHA256 (avocado-framework-avocado-111.0_GH0.tar.gz) = 13334cf3c36c271f0babbaf0508186bc028b09eda9f2e3518e1a8150c3afb9c3
-SIZE (avocado-framework-avocado-111.0_GH0.tar.gz) = 1567600
+TIMESTAMP = 1760808223
+SHA256 (avocado-framework-avocado-112.0_GH0.tar.gz) = cdae785ad8a0c2de20972a8bcfb8b73a2b558e62b06a26b36301c33ee3ae01f8
+SIZE (avocado-framework-avocado-112.0_GH0.tar.gz) = 1594377
+SHA256 (dcfd5a7.patch) = 06c4b6cc1be2218730b7ff0f36284fba549f04276a3602588d4008c563900ef5
+SIZE (dcfd5a7.patch) = 2670
diff --git a/devel/py-avocado-framework/files/patch-allow-to-override-etc-dir-location b/devel/py-avocado-framework/files/patch-allow-to-override-etc-dir-location
deleted file mode 100644
index 55af28d4fd5c..000000000000
--- a/devel/py-avocado-framework/files/patch-allow-to-override-etc-dir-location
+++ /dev/null
@@ -1,122 +0,0 @@
-From 4612dfa7a36c9f5520b427557dc0150bbe3af887 Mon Sep 17 00:00:00 2001
-From: Roman Bogorodskiy <bogorodskiy@gmail.com>
-Date: Sun, 18 May 2025 07:11:18 +0200
-Subject: [PATCH] Allow to override /etc dir location
-
-Some systems, e.g. FreeBSD, place third-part software configuration
-files in /usr/local/etc instead of /etc.
-
-Extend the install command to accept "etcprefix" option used for global
-configuration paths. By default it's "/", so it keeps the current
-behaviour unchanged.
-
-Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
----
- avocado/core/settings.py   |  3 ++-
- avocado/core/utils/path.py |  4 +++-
- avocado/paths.py           |  2 ++
- setup.py                   | 23 +++++++++++++++++++++++
- 4 files changed, 30 insertions(+), 2 deletions(-)
- create mode 100644 avocado/paths.py
-
-diff --git avocado/core/settings.py avocado/core/settings.py
-index b497bf0f..b76d0d0d 100644
---- avocado/core/settings.py
-+++ avocado/core/settings.py
-@@ -46,6 +46,7 @@ import re
- from pkg_resources import resource_exists, resource_filename
- 
- from avocado.core.settings_dispatcher import SettingsDispatcher
-+from avocado import paths
- 
- 
- def sorted_dict(dict_object):
-@@ -407,7 +408,7 @@ class Settings:
-             self.all_config_paths.append(self._config_path_local)
- 
-     def _prepare_base_dirs(self):
--        cfg_dir = "/etc"
-+        cfg_dir = os.path.join(paths.ETCPREFIX, "/etc")
-         user_dir = os.path.expanduser("~")
- 
-         if "VIRTUAL_ENV" in os.environ:
-diff --git avocado/core/utils/path.py avocado/core/utils/path.py
-index 8037bdd5..5f1f9ce5 100644
---- avocado/core/utils/path.py
-+++ avocado/core/utils/path.py
-@@ -1,5 +1,7 @@
- import os
- 
-+from avocado import paths
-+
- from pkg_resources import get_distribution
- 
- 
-@@ -32,7 +34,7 @@ def system_wide_or_base_path(file_path):
-     if os.path.isabs(file_path):
-         abs_path = file_path
-     else:
--        abs_path = os.path.join(os.path.sep, file_path)
-+        abs_path = os.path.join(paths.ETCPREFIX, file_path)
-     if os.path.exists(abs_path):
-         return abs_path
-     return prepend_base_path(file_path)
-diff --git avocado/paths.py avocado/paths.py
-new file mode 100644
-index 00000000..4d2b2f88
---- /dev/null
-+++ avocado/paths.py
-@@ -0,0 +1,2 @@
-+# To be overriden by setup.py
-+ETCPREFIX = "/"
-diff --git setup.py setup.py
-index d9e1d795..58671d03 100755
---- setup.py
-+++ setup.py
-@@ -23,6 +23,7 @@ from pathlib import Path
- from subprocess import CalledProcessError, run
- 
- import setuptools.command.develop
-+import setuptools.command.install
- from setuptools import Command, find_packages, setup
- 
- # pylint: disable=E0611
-@@ -203,6 +204,27 @@ class Develop(setuptools.command.develop.develop):
-                 self.handle_uninstall()
- 
- 
-+class Install(setuptools.command.install.install):
-+    """Custom install command."""
-+
-+    user_options = setuptools.command.install.install.user_options + [
-+        ("etcprefix=", None, "The etc directory prefix [default: /]"),
-+    ]
-+
-+    def initialize_options(self):
-+        super().initialize_options()
-+        self.etcprefix = "/usr/local"  # pylint: disable=W0201
-+
-+    def run(self):
-+        pkg_dir = os.path.join(self.build_lib, 'avocado')
-+        os.makedirs(pkg_dir, exist_ok=True)
-+
-+        with open(os.path.join(pkg_dir, 'paths.py'), 'w') as f:
-+            f.write(f'ETCPREFIX = "{self.etcprefix}"')
-+
-+        super().run()
-+
-+
- class SimpleCommand(Command):
-     """Make Command implementation simpler."""
- 
-@@ -504,6 +526,7 @@ if __name__ == "__main__":
-         cmdclass={
-             "clean": Clean,
-             "develop": Develop,
-+            "install": Install,
-             "lint": Linter,
-             "man": Man,
-             "plugin": Plugin,
--- 
-2.49.0
-