git: 230e18ea5858 - main - math/py-CyLP: update 0.92.3 → 0.94.0

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 25 Jul 2026 04:25:05 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=230e18ea58581f6a11a66379cccd25f37deba530

commit 230e18ea58581f6a11a66379cccd25f37deba530
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-07-23 18:08:25 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-07-25 04:24:24 +0000

    math/py-CyLP: update 0.92.3 → 0.94.0
---
 math/py-CyLP/Makefile                   | 18 ++++++++++-------
 math/py-CyLP/distinfo                   |  6 +++---
 math/py-CyLP/files/patch-cython         | 10 ----------
 math/py-CyLP/files/patch-pyproject.toml | 34 ++++++++++++++++++++-------------
 math/py-CyLP/files/patch-setup.py       | 15 ++++-----------
 5 files changed, 39 insertions(+), 44 deletions(-)

diff --git a/math/py-CyLP/Makefile b/math/py-CyLP/Makefile
index 4c578e9abf50..fca80820b8ce 100644
--- a/math/py-CyLP/Makefile
+++ b/math/py-CyLP/Makefile
@@ -1,16 +1,14 @@
 PORTNAME=	CyLP
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.92.3
-PORTREVISION=	3
+DISTVERSION=	0.94.0
 CATEGORIES=	math python
+MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	Python interface to CLP, CBC, and CGL to solve LPs and MIPs
 WWW=		https://github.com/coin-or/CyLP
 
-BROKEN=		fails to build with NumPy 2.x
-
 LICENSE=	CPL10
 LICENSE_NAME=	Common Public License Version 1.0
 LICENSE_FILE=	${WRKSRC}/LICENSE
@@ -38,10 +36,16 @@ GH_ACCOUNT=	coin-or
 
 MAKE_ENV=	COIN_INSTALL_DIR=${LOCALBASE}
 
-TEST_WRKSRC=	${WRKSRC}/cylp
 TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 
-post-install:
-	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cylp/cy/Cy*.so
+do-test:
+	# deselect tests:
+	# * test_PySolve.py: it SEGVs, see https://github.com/coin-or/CyLP/issues/232
+	# * test_removeVar2: it fails with Python error, see https://github.com/coin-or/CyLP/issues/231
+	@cd ${WRKDIR} && ${SETENV} ${TEST_ENV} pytest -rs --pyargs cylp \
+		--ignore=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/cylp/py/test_PySolve.py \
+		-k 'not test_removeVar2'
+
+# tests as of 0.94.0: 12 passed, 1 deselected, 36 warnings in 0.20s
 
 .include <bsd.port.mk>
diff --git a/math/py-CyLP/distinfo b/math/py-CyLP/distinfo
index ad854ba22b18..2e2e04404294 100644
--- a/math/py-CyLP/distinfo
+++ b/math/py-CyLP/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1724314436
-SHA256 (coin-or-CyLP-v0.92.3_GH0.tar.gz) = 5e1ff29ff218a4a946b1d5839c9283503da9b505c18b1db3d48b49594762f1e8
-SIZE (coin-or-CyLP-v0.92.3_GH0.tar.gz) = 7666683
+TIMESTAMP = 1784748664
+SHA256 (coin-or-CyLP-v0.94.0_GH0.tar.gz) = 6da6c2638a18b32db0b469c7d789b6114c3be5085e9cb0aa9dae3f5ed6cae942
+SIZE (coin-or-CyLP-v0.94.0_GH0.tar.gz) = 7666702
diff --git a/math/py-CyLP/files/patch-cython b/math/py-CyLP/files/patch-cython
deleted file mode 100644
index 790d2e24b939..000000000000
--- a/math/py-CyLP/files/patch-cython
+++ /dev/null
@@ -1,10 +0,0 @@
---- cylp/cy/CyClpSimplex.pyx.orig	2024-08-20 08:36:08 UTC
-+++ cylp/cy/CyClpSimplex.pyx
-@@ -20,6 +20,7 @@ from cylp.cy cimport CyCoinMpsIO
- from cylp.py.pivots.DualPivotPythonBase import DualPivotPythonBase
- from cylp.py.modeling.CyLPModel import CyLPModel
- from cylp.cy cimport CyCoinMpsIO
-+from ctypes import c_long as long
- 
- # Initialize numpy
- np.import_array()
diff --git a/math/py-CyLP/files/patch-pyproject.toml b/math/py-CyLP/files/patch-pyproject.toml
index 5476121381fd..23c09aef6050 100644
--- a/math/py-CyLP/files/patch-pyproject.toml
+++ b/math/py-CyLP/files/patch-pyproject.toml
@@ -1,15 +1,23 @@
---- pyproject.toml.orig	2024-08-20 08:36:08 UTC
+-- Set the project name to match the FreeBSD PORTNAME so the built wheel
+-- is staged as CyLP-${PORTVERSION}*.whl instead of cylp-*.
+-- Fix pyproject.toml project.license for older setuptools.
+-- The in-tree setuptools does not yet support PEP 639 SPDX license strings,
+-- so use the legacy PEP 621 `license = {text = "..."}` form instead.
+--- pyproject.toml.orig	2025-12-03 14:09:23 UTC
 +++ pyproject.toml
-@@ -1,10 +1,10 @@ requires = [
- [build-system]
- requires = [
-   'setuptools',
--  'Cython == 3.0.10',
-+  'Cython >= 3.0.10',
-   # https://numpy.org/devdocs/user/depending_on_numpy.html#build-time-dependency
-   # from https://github.com/scipy/oldest-supported-numpy/pull/78#issuecomment-1747936818:
--  "oldest-supported-numpy; platform_python_implementation != 'PyPy'",
-+  "numpy; platform_python_implementation != 'PyPy'",
-   "numpy < 2.0.0; platform_python_implementation=='PyPy'",
-   'hypothesis'
+@@ -1,5 +1,5 @@
+ [project]
+-name = "cylp"
++name = "CyLP"
+ version = "0.94.0"
+ description="A Python interface for CLP, CBC, and CGL"
+ readme="README.rst"
+@@ -12,7 +12,7 @@ dependencies = [
+   "numpy >= 1.26.0",
+   "scipy >= 0.10.0",
  ]
+-license='EPL-2.0'
++license={text='EPL-2.0'}
+ 
+ [project.urls]
+ "Home Page"="https://github.com/coin-or/CyLP"
diff --git a/math/py-CyLP/files/patch-setup.py b/math/py-CyLP/files/patch-setup.py
index a7d9511dcb83..45cc1cb4ee34 100644
--- a/math/py-CyLP/files/patch-setup.py
+++ b/math/py-CyLP/files/patch-setup.py
@@ -1,6 +1,8 @@
---- setup.py.orig	2023-11-01 20:21:56 UTC
+-- Add FreeBSD to the Unix platform branch so -lrt is used and the Windows
+-- /EHsc flag is not added on FreeBSD.
+--- setup.py.orig	2026-07-22 22:18:35 UTC
 +++ setup.py
-@@ -124,7 +124,7 @@ ext_modules = []
+@@ -124,7 +124,7 @@ if operatingSystem == 'mac':
  
  if operatingSystem == 'mac':
      extra_link_args = ['-Wl,-framework', '-Wl,Accelerate', '-headerpad_max_install_names']
@@ -9,12 +11,3 @@
      extra_link_args = ['-lrt']
  else:
      # Assuming Windows
-@@ -396,7 +396,7 @@ s_AUTHORS = open('AUTHORS').read()
- 
- extra_files = ['cpp/*.hpp', 'cpp/*.h', 'cy/*.pxd', 'VERSION']
- 
--setup(name='cylp',
-+setup(name='CyLP',
-       version=VERSION,
-       description='A Python interface for CLP, CBC, and CGL',
-       long_description=s_README,