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,47 +1,51 @@ 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 LICENSE_PERMS= auto-accept dist-mirror dist-sell pkg-mirror pkg-sell BUILD_DEPENDS= ${PY_SETUPTOOLS} \ ${PYTHON_PKGNAMEPREFIX}hypothesis>0:devel/py-hypothesis@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} LIB_DEPENDS= libblas.so:math/blas \ libCbc.so:math/cbc \ libCgl.so:math/cgl \ libClp.so:math/clp \ libCoinUtils.so:math/coinutils \ liblapack.so:math/lapack \ libOsi.so:math/osi RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}scipy>=0.10.0:science/py-scipy@${PY_FLAVOR} USES= compiler:c++11-lang python USE_PYTHON= autoplist cython pep517 pytest USE_GITHUB= yes 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 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,20 +1,13 @@ ---- 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'] -elif operatingSystem == 'linux': +elif operatingSystem == 'linux' or operatingSystem.startswith('freebsd'): 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,