diff --git a/math/py-minorminer/Makefile b/math/py-minorminer/Makefile index 9a6d29bd3bf2..8bc07c4242c4 100644 --- a/math/py-minorminer/Makefile +++ b/math/py-minorminer/Makefile @@ -1,43 +1,58 @@ PORTNAME= minorminer -DISTVERSION= 0.2.19 -PORTREVISION= 2 +DISTVERSION= 0.2.22 CATEGORIES= math python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Heuristic tool for minor embedding of graphs WWW= https://docs.ocean.dwavesys.com/projects/minorminer/en/latest/ \ https://github.com/dwavesystems/minorminer LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}fasteners>=0.19:devel/py-fasteners@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}homebase>=1.0.1:devel/py-homebase@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}networkx>=3.2.1:math/py-networkx@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}dwave-networkx>=0.8.15:science/py-dwave-networkx@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dwave-graphs>=1:science/py-dwave-graphs@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}numpy>=2:math/py-numpy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}rectangle-packer>=2.0.1:math/py-rectangle-packer@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}scipy>=1.13.1:science/py-scipy@${PY_FLAVOR} -BUILD_DEPENDS= ${PY_DEPENDS} +BUILD_DEPENDS= ${PY_DEPENDS} \ + boost-libs>0:devel/boost-libs RUN_DEPENDS= ${PY_DEPENDS} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}parameterized>0:devel/py-parameterized@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-subtests>0:devel/py-pytest-subtests@${PY_FLAVOR} -USES= python +USES= localbase python USE_PYTHON= distutils cython autoplist pytest USE_GITHUB= yes GH_ACCOUNT= dwavesystems -GH_TUPLE= boothby:glasgow-subgraph-solver:568c45f:glasgow_subgraph_solver/external/glasgow-subgraph-solver \ - nemequ:portable-snippets:84abba9:portable_snippets/external/portable-snippets +GH_TUPLE= boothby:glasgow-subgraph-solver:e544b549c0e6:glasgow_subgraph_solver/external/glasgow-subgraph-solver \ + nemequ:portable-snippets:84abba9:portable_snippets/external/portable-snippets TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} TEST_WRKSRC= ${WRKSRC}/tests +pre-test: + @${CP} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/minorminer/_extern/rpack/_core${PYTHON_TAG}.so \ + ${WRKSRC}/minorminer/_extern/rpack/_core${PYTHON_TAG}.so + @${CP} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/minorminer/_minorminer${PYTHON_TAG}.so \ + ${WRKSRC}/minorminer/_minorminer${PYTHON_TAG}.so + @${CP} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/minorminer/busclique${PYTHON_TAG}.so \ + ${WRKSRC}/minorminer/busclique${PYTHON_TAG}.so + @${CP} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/minorminer/subgraph${PYTHON_TAG}.so \ + ${WRKSRC}/minorminer/subgraph${PYTHON_TAG}.so + post-install: @${STRIP_CMD} \ ${STAGEDIR}${PYTHON_SITELIBDIR}/minorminer/_extern/rpack/_core${PYTHON_TAG}.so \ ${STAGEDIR}${PYTHON_SITELIBDIR}/minorminer/_minorminer${PYTHON_TAG}.so \ ${STAGEDIR}${PYTHON_SITELIBDIR}/minorminer/busclique${PYTHON_TAG}.so \ ${STAGEDIR}${PYTHON_SITELIBDIR}/minorminer/subgraph${PYTHON_TAG}.so +# tests as of 0.2.22: 200 passed, 1 skipped, 392 warnings in 136.24s + .include diff --git a/math/py-minorminer/distinfo b/math/py-minorminer/distinfo index adeb280676d3..65d6a488edff 100644 --- a/math/py-minorminer/distinfo +++ b/math/py-minorminer/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1758997678 -SHA256 (dwavesystems-minorminer-0.2.19_GH0.tar.gz) = f4207bed0a74bbe89fd5a1d8657bc611106a67ac733aa034877d27f306afdf6a -SIZE (dwavesystems-minorminer-0.2.19_GH0.tar.gz) = 1290750 -SHA256 (boothby-glasgow-subgraph-solver-568c45f_GH0.tar.gz) = efe3971ee56bc5acf8d64a9e9f98e38962f9c4514b4356e1f7f662873a9fc8b9 -SIZE (boothby-glasgow-subgraph-solver-568c45f_GH0.tar.gz) = 80856 +TIMESTAMP = 1784506307 +SHA256 (dwavesystems-minorminer-0.2.22_GH0.tar.gz) = 9b052cd07e5a43200a91f15a2dd7edd0725456504a61a2f24d7f218ac440b2ce +SIZE (dwavesystems-minorminer-0.2.22_GH0.tar.gz) = 1293544 +SHA256 (boothby-glasgow-subgraph-solver-e544b549c0e6_GH0.tar.gz) = 5f1cc143e9678060550ee0f57b3586e01c48091c70dc5275af7e9c27c4971e27 +SIZE (boothby-glasgow-subgraph-solver-e544b549c0e6_GH0.tar.gz) = 75836 SHA256 (nemequ-portable-snippets-84abba9_GH0.tar.gz) = 934157a2892aa9afcab81229b089b0255fdba45727ccec7a017e270fa32f7e4f SIZE (nemequ-portable-snippets-84abba9_GH0.tar.gz) = 73895 diff --git a/math/py-minorminer/files/patch-pyproject.toml b/math/py-minorminer/files/patch-pyproject.toml new file mode 100644 index 000000000000..698081b4cfc0 --- /dev/null +++ b/math/py-minorminer/files/patch-pyproject.toml @@ -0,0 +1,26 @@ +-- Move `license-files` from `[project]` to `[tool.setuptools]`. +-- FreeBSD's setuptools does not yet recognize `license-files` under +-- `[project]`, which causes `ValueError: invalid pyproject.toml config: project`. +-- This preserves the license file list while using the setuptools-specific +-- configuration section supported by the installed version. + +--- pyproject.toml.orig 2026-07-20 00:03:29 UTC ++++ pyproject.toml +@@ -15,7 +15,6 @@ maintainers = [ + maintainers = [ + {name = "D-Wave Inc.", email = "tools@dwavesys.com"}, + ] +-license-files = ["LICENSE", "external/glasgow-subgraph-solver/LICENCE", "minorminer/_extern/rpack/LICENSE.md"] + classifiers = [ + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", +@@ -49,6 +48,9 @@ Download = "https://github.com/dwavesystems/minorminer + [project.urls] + Homepage = "https://github.com/dwavesystems/minorminer" + Download = "https://github.com/dwavesystems/minorminer/releases" ++ ++[tool.setuptools] ++license-files = ["LICENSE", "external/glasgow-subgraph-solver/LICENCE", "minorminer/_extern/rpack/LICENSE.md"] + + [tool.cibuildwheel] + build-verbosity = "1" diff --git a/math/py-minorminer/files/patch-setup.py b/math/py-minorminer/files/patch-setup.py new file mode 100644 index 000000000000..55a462a4687c --- /dev/null +++ b/math/py-minorminer/files/patch-setup.py @@ -0,0 +1,17 @@ +-- Add missing commas between include_dirs entries for the subgraph extension. +-- Without the commas Python concatenates the strings into a single invalid +-- path, so the glasgow-subgraph-solver headers cannot be found. + +--- setup.py.orig 2026-07-20 00:04:15 UTC ++++ setup.py +@@ -122,8 +122,8 @@ extensions = [ + name="minorminer.subgraph", + sources=["./minorminer/subgraph.pyx"] + glasgow_cc, + include_dirs=['', './include', './external', +- './external/glasgow-subgraph-solver' +- './external/glasgow-subgraph-solver/src' ++ './external/glasgow-subgraph-solver', ++ './external/glasgow-subgraph-solver/src', + './external/glasgow-subgraph-solver/gss'], + library_dirs=['./include', './external', './external/glasgow-subgraph-solver/gss/formats'], + language='c++',