git: 1a764f0739ef - main - math/py-qats: update 4.11.1 → 5.2.1

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 10 Apr 2025 08:04:30 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1a764f0739ef39ea83aa63b35f266cd4a2a7560b

commit 1a764f0739ef39ea83aa63b35f266cd4a2a7560b
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-04-10 06:48:53 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-04-10 08:04:26 +0000

    math/py-qats: update 4.11.1 → 5.2.1
---
 math/py-qats/Makefile                     | 25 +++++++++++++++---------
 math/py-qats/distinfo                     |  6 +++---
 math/py-qats/files/patch-pyproject.toml   | 32 +++++++++++++++++++++++++++++++
 math/py-qats/files/patch-qats_app_gui.py  | 11 -----------
 math/py-qats/files/patch-requirements.txt | 20 -------------------
 math/py-qats/files/patch-setup.py         | 27 --------------------------
 6 files changed, 51 insertions(+), 70 deletions(-)

diff --git a/math/py-qats/Makefile b/math/py-qats/Makefile
index 5db9ca321534..dab2034110a7 100644
--- a/math/py-qats/Makefile
+++ b/math/py-qats/Makefile
@@ -1,8 +1,8 @@
 PORTNAME=	qats
-DISTVERSION=	4.11.1
-PORTREVISION=	1
+DISTVERSIONPREFIX=	v
+DISTVERSION=	5.2.1
 CATEGORIES=	math
-MASTER_SITES=	PYPI
+#MASTER_SITES=	PYPI # no tests
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -12,13 +12,12 @@ WWW=		https://github.com/dnvgl/qats
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools-scm>=3.4.3:devel/py-setuptools-scm@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}sphinx>0:textproc/py-sphinx@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}poetry-core>0:devel/py-poetry-core@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}poetry-dynamic-versioning>0:devel/py-poetry-dynamic-versioning@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}QtPy>=1.9.0:devel/py-QtPy@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}furo>=2022.12.7:textproc/py-furo@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}h5py>0:science/py-h5py@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}h5py>=3.5.0:science/py-h5py@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}matplotlib>=3.3.3:math/py-matplotlib@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}myst-parser>=0.18.1:textproc/py-myst-parser@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}npTDMS>=1.1.0:misc/py-npTDMS@${PY_FLAVOR} \
 		${PYNUMPY} \
@@ -29,9 +28,17 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}QtPy>=1.9.0:devel/py-QtPy@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}scipy>=1.7.2:science/py-scipy@${PY_FLAVOR}
 
 USES=		pyqt:5 python
-USE_PYTHON=	distutils concurrent autoplist pytest
+USE_PYTHON=	pep517 concurrent autoplist pytest
 USE_PYQT=	pyqt5
 
+USE_GITHUB=	yes
+GH_ACCOUNT=	dnvgl
+
 NO_ARCH=	yes
 
+post-patch:
+	@${REINPLACE_CMD} -e 's/version = "0.0.0"/version = "${DISTVERSION}"/' ${WRKSRC}/pyproject.toml
+
+# tests as of 5.2.1: 121 passed, 26 warnings in 26.41s
+
 .include <bsd.port.mk>
diff --git a/math/py-qats/distinfo b/math/py-qats/distinfo
index ba36b59e21b9..6e6c984b0ddb 100644
--- a/math/py-qats/distinfo
+++ b/math/py-qats/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1689899243
-SHA256 (qats-4.11.1.tar.gz) = 63766918714dc71087bf4af4d357eb11ce5dddd910d0dae3421134e91acb7a44
-SIZE (qats-4.11.1.tar.gz) = 51717904
+TIMESTAMP = 1744258304
+SHA256 (dnvgl-qats-v5.2.1_GH0.tar.gz) = 41316f424a014e4d6d3847ff061969d19bc5cefcab4ae71fb1bcd503460bca94
+SIZE (dnvgl-qats-v5.2.1_GH0.tar.gz) = 52576438
diff --git a/math/py-qats/files/patch-pyproject.toml b/math/py-qats/files/patch-pyproject.toml
new file mode 100644
index 000000000000..8d5422619e47
--- /dev/null
+++ b/math/py-qats/files/patch-pyproject.toml
@@ -0,0 +1,32 @@
+--- pyproject.toml.orig	2025-04-10 04:12:24 UTC
++++ pyproject.toml
+@@ -70,29 +70,6 @@ qats = "qats.cli:main"
+ [tool.poetry.scripts]
+ qats = "qats.cli:main"
+ 
+-# enable dynamic versioning using Git tags
+-# https://pypi.org/project/poetry-dynamic-versioning/
+-[tool.poetry-dynamic-versioning]
+-enable = true
+-vcs = "git"
+-format-jinja = """
+-    {%- if distance == 0 -%}
+-        {{ serialize_pep440(base, stage, revision) }}
+-    {%- elif revision is not none -%}
+-        {{ serialize_pep440(base, stage, revision + 1, dev=distance, metadata=[commit]) }}
+-    {%- else -%}
+-        {{ serialize_pep440(bump_version(base), stage, revision, dev=distance, metadata=[commit]) }}
+-    {%- endif -%}
+-"""
+-
+-[tool.poetry-dynamic-versioning.files."qats/_version.py"]
+-persistent-substitution = true
+-initial-content = """
+-# file generated by poetry dynamic versioning during poetry build/install
+-# don't change, don't track in version control
+-__version__ = "0.0.0"
+-__version_tuple__ = (0, 0, 0)
+-"""
+ [build-system]
+ # https://pypi.org/project/poetry-dynamic-versioning/
+ requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.1.1,<2.0.0"]
diff --git a/math/py-qats/files/patch-qats_app_gui.py b/math/py-qats/files/patch-qats_app_gui.py
deleted file mode 100644
index 92c9af373967..000000000000
--- a/math/py-qats/files/patch-qats_app_gui.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- qats/app/gui.py.orig	2023-01-03 17:37:48 UTC
-+++ qats/app/gui.py
-@@ -48,7 +48,7 @@ LOGGING_LEVELS = dict(
- if sys.platform == "win32":
-     SETTINGS_FILE = os.path.join(os.getenv("APPDATA", os.getenv("USERPROFILE", "")), "qats.settings")
- else:
--    SETTINGS_FILE = os.path.join("var", "lib", "qats.settings")
-+    SETTINGS_FILE = os.path.join("/home", os.getlogin(), ".config", "qats.settings")
- ICON_FILE = resource_filename("qats.app", "qats.ico")
- 
- STATS_ORDER = ["name", "min", "max", "mean", "std", "skew", "kurt", "tz", "wloc", "wscale", "wshape",
diff --git a/math/py-qats/files/patch-requirements.txt b/math/py-qats/files/patch-requirements.txt
deleted file mode 100644
index 77be16a56eda..000000000000
--- a/math/py-qats/files/patch-requirements.txt
+++ /dev/null
@@ -1,20 +0,0 @@
---- requirements.txt.orig	2023-07-21 05:35:07 UTC
-+++ requirements.txt
-@@ -1,12 +1,12 @@
--h5py>=3.5.0, <=3.7.0
-+h5py>=3.5.0
- pymatreader==0.0.24
--matplotlib>=3.3.3, <=3.6
-+matplotlib>=3.3.3
- npTDMS==1.1.0
--numpy>=1.21.6, <=1.24.*
-+numpy>=1.21.6
- openpyxl==3.0.5
--pandas>=1.1.4, <=1.5
-+pandas>=1.1.4
- QtPy==1.9.0
--pyside2>=5.15.2, <5.16
-+pyside2>=5.15.2
- PyQt5>=5.15.2, <=5.15.7
- scipy>=1.7.2, <=1.9.2   # in accordance with https://docs.scipy.org/doc/scipy/dev/toolchain.html#numpy
- setuptools-scm>=7.1.0, <=8
diff --git a/math/py-qats/files/patch-setup.py b/math/py-qats/files/patch-setup.py
deleted file mode 100644
index ccf1d7d950ae..000000000000
--- a/math/py-qats/files/patch-setup.py
+++ /dev/null
@@ -1,27 +0,0 @@
---- setup.py.orig	2023-07-21 05:37:29 UTC
-+++ setup.py
-@@ -22,15 +22,15 @@ setup(
-     python_requires=">=3.7, <3.11",
-     setup_requires=["setuptools_scm"],
-     install_requires=[
--        "numpy>=1,<2",
--        "openpyxl>=3,<4",
--        "scipy>=1,<2",
--        "matplotlib>=3,<4",
--        "npTDMS>=1,<2",
--        "h5py>=2.7,<4",
--        "QtPy>=1,<2",
--        "pandas>=1,<2",
--        "pymatreader>=0.0.20,<1",
-+        "numpy>=1",
-+        "openpyxl>=3",
-+        "scipy>=1",
-+        "matplotlib>=3",
-+        "npTDMS>=1",
-+        "h5py>=2.7",
-+        "QtPy>=1",
-+        "pandas>=1",
-+        "pymatreader>=0.0.20",
-         "pywin32; platform_system == 'Windows'"
-     ],
-     entry_points={