From 76d020118278e575e0832c040535f3a5b17c9d2a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 9 Oct 2023 22:39:38 -0700 Subject: [PATCH 01/16] build/pkgs/cvxpy: Update to 1.4.0 --- build/pkgs/cvxpy/checksums.ini | 6 +++--- build/pkgs/cvxpy/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/cvxpy/checksums.ini b/build/pkgs/cvxpy/checksums.ini index 128dcda1602..e9075f3f898 100644 --- a/build/pkgs/cvxpy/checksums.ini +++ b/build/pkgs/cvxpy/checksums.ini @@ -1,5 +1,5 @@ tarball=cvxpy-VERSION.tar.gz -sha1=8c87f8f8c2177f917ec2fad7d2b510787ffdf72d -md5=408b0a3140750299207f61de95b4ed6e -cksum=3643150234 +sha1=8d80513117a6a8a4ba14b3ac538a2edebcd3f0f6 +md5=5e12e46626c4fa008d2560b0941c22f1 +cksum=2871212675 upstream_url=https://pypi.io/packages/source/c/cvxpy/cvxpy-VERSION.tar.gz diff --git a/build/pkgs/cvxpy/package-version.txt b/build/pkgs/cvxpy/package-version.txt index f0bb29e7638..88c5fb891dc 100644 --- a/build/pkgs/cvxpy/package-version.txt +++ b/build/pkgs/cvxpy/package-version.txt @@ -1 +1 @@ -1.3.0 +1.4.0 From 3af06b0d84a590776b4522db6c4ed4469f18b22f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 9 Oct 2023 22:40:27 -0700 Subject: [PATCH 02/16] build/pkgs/scs: Update to 3.2.3 --- build/pkgs/scs/checksums.ini | 6 +++--- build/pkgs/scs/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/scs/checksums.ini b/build/pkgs/scs/checksums.ini index 1e2e269bf71..572dded9919 100644 --- a/build/pkgs/scs/checksums.ini +++ b/build/pkgs/scs/checksums.ini @@ -1,5 +1,5 @@ tarball=scs-VERSION.tar.gz -sha1=309a035e5031f7a51c4992d5ad6c9236a406adc2 -md5=c984027aea923fa88e2f73c61bc06dd0 -cksum=1688898932 +sha1=92e4ff21b450c9659f610064eb79e804de9167b4 +md5=dc86b5ed0a0a22453bb88feacf31539a +cksum=4083736723 upstream_url=https://pypi.io/packages/source/s/scs/scs-VERSION.tar.gz diff --git a/build/pkgs/scs/package-version.txt b/build/pkgs/scs/package-version.txt index be94e6f53db..b347b11eac8 100644 --- a/build/pkgs/scs/package-version.txt +++ b/build/pkgs/scs/package-version.txt @@ -1 +1 @@ -3.2.2 +3.2.3 From 67026d65ea46e6f0f1feb82240427c8d3b3ea435 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 9 Oct 2023 22:40:53 -0700 Subject: [PATCH 03/16] build/pkgs/osqp_python: Update to 0.6.3 --- build/pkgs/osqp_python/checksums.ini | 6 +++--- build/pkgs/osqp_python/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/osqp_python/checksums.ini b/build/pkgs/osqp_python/checksums.ini index 750d1d8450a..f4edea03b65 100644 --- a/build/pkgs/osqp_python/checksums.ini +++ b/build/pkgs/osqp_python/checksums.ini @@ -1,5 +1,5 @@ tarball=osqp-VERSION.tar.gz -sha1=d69d05b87c03aaaf80ac0bb11e1a68746cf8c486 -md5=ae46dc55aa4ff7a2009db756f2b61d98 -cksum=2780901429 +sha1=3358e48aa6d81496665a8b0ee157465ce6cd329a +md5=22ee4f843ca15a98437f053e47d15e3d +cksum=2552259420 upstream_url=https://pypi.io/packages/source/o/osqp/osqp-VERSION.tar.gz diff --git a/build/pkgs/osqp_python/package-version.txt b/build/pkgs/osqp_python/package-version.txt index 72b079f4d76..844f6a91acb 100644 --- a/build/pkgs/osqp_python/package-version.txt +++ b/build/pkgs/osqp_python/package-version.txt @@ -1 +1 @@ -0.6.2.post8 +0.6.3 From 33d0be2a031eaaf0c2c5a4654bfef1627c87afef Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 9 Oct 2023 22:41:02 -0700 Subject: [PATCH 04/16] build/pkgs/cvxopt: Update to 1.3.2 --- build/pkgs/cvxopt/checksums.ini | 6 +++--- build/pkgs/cvxopt/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/cvxopt/checksums.ini b/build/pkgs/cvxopt/checksums.ini index 92f553cd1f1..a09000f2476 100644 --- a/build/pkgs/cvxopt/checksums.ini +++ b/build/pkgs/cvxopt/checksums.ini @@ -1,5 +1,5 @@ tarball=cvxopt-VERSION.tar.gz -sha1=7118b2c490a6596a47049c8ae6e15b3568239cb8 -md5=d94895acf6f41806b482791174e9d0e7 -cksum=2569244181 +sha1=f9c3c3fb61e87d27f05b3b66bc10734d5e6284e6 +md5=ced06e7d92d8a10c84db94589e7f8162 +cksum=2059529268 upstream_url=https://pypi.io/packages/source/c/cvxopt/cvxopt-VERSION.tar.gz diff --git a/build/pkgs/cvxopt/package-version.txt b/build/pkgs/cvxopt/package-version.txt index f0bb29e7638..1892b926767 100644 --- a/build/pkgs/cvxopt/package-version.txt +++ b/build/pkgs/cvxopt/package-version.txt @@ -1 +1 @@ -1.3.0 +1.3.2 From e4df296a632e67406a0262667ba35ce19acb5680 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 11 Oct 2023 19:34:57 -0700 Subject: [PATCH 05/16] build/pkgs/cylp: Update to 0.91.6 --- build/pkgs/cylp/checksums.ini | 6 +++--- build/pkgs/cylp/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/cylp/checksums.ini b/build/pkgs/cylp/checksums.ini index 0a073c1569a..d57bc940ac2 100644 --- a/build/pkgs/cylp/checksums.ini +++ b/build/pkgs/cylp/checksums.ini @@ -1,5 +1,5 @@ tarball=cylp-VERSION.tar.gz -sha1=1c2d20933abc48ed2fefc1ae45d8f9492fc2eef2 -md5=ac0308a916dac5dd84f831dbc0fba5c5 -cksum=1532166313 +sha1=edbcc68e1fbf35bb48e8bac136633a1e635d3729 +md5=c9039d0a5d45c9ac124b919855b8ce1f +cksum=1696691984 upstream_url=https://pypi.io/packages/source/c/cylp/cylp-VERSION.tar.gz diff --git a/build/pkgs/cylp/package-version.txt b/build/pkgs/cylp/package-version.txt index 1d5e6c02bae..88bbfa0da89 100644 --- a/build/pkgs/cylp/package-version.txt +++ b/build/pkgs/cylp/package-version.txt @@ -1 +1 @@ -0.91.5 +0.91.6 From 94d4b77833df94095a85d323c4de8e45591ad5e6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 11 Oct 2023 22:06:06 -0700 Subject: [PATCH 06/16] build/pkgs/cylp: Add patch for Cython 3 --- build/pkgs/cylp/package-version.txt | 2 +- build/pkgs/cylp/patches/cython3.patch | 399 ++++++++++++++++++++++++++ build/pkgs/cylp/spkg-install.in | 5 +- 3 files changed, 403 insertions(+), 3 deletions(-) create mode 100644 build/pkgs/cylp/patches/cython3.patch diff --git a/build/pkgs/cylp/package-version.txt b/build/pkgs/cylp/package-version.txt index 88bbfa0da89..c182bd4d62b 100644 --- a/build/pkgs/cylp/package-version.txt +++ b/build/pkgs/cylp/package-version.txt @@ -1 +1 @@ -0.91.6 +0.91.6.p1 diff --git a/build/pkgs/cylp/patches/cython3.patch b/build/pkgs/cylp/patches/cython3.patch new file mode 100644 index 00000000000..7e2447f6b01 --- /dev/null +++ b/build/pkgs/cylp/patches/cython3.patch @@ -0,0 +1,399 @@ +From 819e046b0231e9eb7b7c6dda9ab1ba94cf5abccd Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Wed, 11 Oct 2023 20:36:35 -0700 +Subject: [PATCH 1/5] Remove outdated self-cimports in pyx files + +--- + cylp/cy/CyCbcNode.pyx | 3 --- + cylp/cy/CyCglCutGeneratorBase.pyx | 3 --- + cylp/cy/CyCglTreeInfo.pyx | 3 --- + cylp/cy/CyCoinModel.pyx | 3 --- + cylp/cy/CyCutGeneratorPythonBase.pyx | 4 ---- + cylp/cy/CyDantzigPivot.pyx | 2 -- + cylp/cy/CyDualPivotPythonBase.pyx | 3 --- + cylp/cy/CyOsiCuts.pyx | 1 - + cylp/cy/CyOsiSolverInterface.pyx | 4 ---- + cylp/cy/CyPivotPythonBase.pyx | 2 -- + cylp/cy/CyWolfePivot.pyx | 2 -- + cylp/cy/createCythonInterface.py | 1 - + 12 files changed, 31 deletions(-) + +diff --git a/cylp/cy/CyCbcNode.pyx b/cylp/cy/CyCbcNode.pyx +index a4092d0..d8da84d 100644 +--- a/cylp/cy/CyCbcNode.pyx ++++ b/cylp/cy/CyCbcNode.pyx +@@ -1,8 +1,5 @@ + # cython: embedsignature=True + +- +-cimport CyCbcNode +- + cdef class CyCbcNode: + def __cinit__(self): + self.CppSelf = new CppICbcNode() +diff --git a/cylp/cy/CyCglCutGeneratorBase.pyx b/cylp/cy/CyCglCutGeneratorBase.pyx +index 0bb324f..a2f2054 100644 +--- a/cylp/cy/CyCglCutGeneratorBase.pyx ++++ b/cylp/cy/CyCglCutGeneratorBase.pyx +@@ -1,8 +1,5 @@ + # cython: embedsignature=True + +-cimport CyCglCutGeneratorBase +-from cylp.cy.CyCglCutGeneratorBase import CyCglCutGeneratorBase +- + cdef void RunGenerateCuts(void *ptr, CppOsiSolverInterface *si, + CppOsiCuts *cs, + CppCglTreeInfo info): +diff --git a/cylp/cy/CyCglTreeInfo.pyx b/cylp/cy/CyCglTreeInfo.pyx +index 5c599bd..7857a02 100644 +--- a/cylp/cy/CyCglTreeInfo.pyx ++++ b/cylp/cy/CyCglTreeInfo.pyx +@@ -1,6 +1,3 @@ +- +-cimport CyCglTreeInfo +- + cdef class CyCglTreeInfo: + 'CyCglTreeInfo documentation' + def __cinit__(self): +diff --git a/cylp/cy/CyCoinModel.pyx b/cylp/cy/CyCoinModel.pyx +index f08b88a..55f038d 100644 +--- a/cylp/cy/CyCoinModel.pyx ++++ b/cylp/cy/CyCoinModel.pyx +@@ -1,8 +1,5 @@ + # cython: embedsignature=True + +- +-from cylp.cy cimport CyCoinModel +- + cdef class CyCoinModel: + ''' + +diff --git a/cylp/cy/CyCutGeneratorPythonBase.pyx b/cylp/cy/CyCutGeneratorPythonBase.pyx +index b067f70..48aa44d 100644 +--- a/cylp/cy/CyCutGeneratorPythonBase.pyx ++++ b/cylp/cy/CyCutGeneratorPythonBase.pyx +@@ -1,9 +1,5 @@ + # cython: embedsignature=True + +- +-cimport CyCutGeneratorPythonBase +- +- + cdef class CyCutGeneratorPythonBase(CyCglCutGeneratorBase): + def __init__(self, cutGeneratorObject, cyLPModel=None): + CyCglCutGeneratorBase.__init__(self) +diff --git a/cylp/cy/CyDantzigPivot.pyx b/cylp/cy/CyDantzigPivot.pyx +index 8089ff4..7714019 100644 +--- a/cylp/cy/CyDantzigPivot.pyx ++++ b/cylp/cy/CyDantzigPivot.pyx +@@ -3,8 +3,6 @@ + + import numpy as np + cimport numpy as np +-cimport CyDantzigPivot +-#cimport CyClpSimplex + + # varStatus defined to mimic 'enum ClpSimplex::Status'. + # But is too slow obviously +diff --git a/cylp/cy/CyDualPivotPythonBase.pyx b/cylp/cy/CyDualPivotPythonBase.pyx +index 89f4ebc..f33d5ae 100644 +--- a/cylp/cy/CyDualPivotPythonBase.pyx ++++ b/cylp/cy/CyDualPivotPythonBase.pyx +@@ -1,8 +1,5 @@ + # cython: embedsignature=True + +- +-cimport CyDualPivotPythonBase +- + cdef class CyDualPivotPythonBase(CyClpDualRowPivotBase): + def __init__(self, dualPivotMethodObject): + CyClpDualRowPivotBase.__init__(self) +diff --git a/cylp/cy/CyOsiCuts.pyx b/cylp/cy/CyOsiCuts.pyx +index 828d32f..f58490f 100644 +--- a/cylp/cy/CyOsiCuts.pyx ++++ b/cylp/cy/CyOsiCuts.pyx +@@ -1,6 +1,5 @@ + import scipy + from scipy.sparse import csr_matrix +-cimport CyOsiCuts + from cylp.py.modeling.CyLPModel import CyLPModel + cimport numpy as np + import numpy as np +diff --git a/cylp/cy/CyOsiSolverInterface.pyx b/cylp/cy/CyOsiSolverInterface.pyx +index b3f0514..5bde926 100644 +--- a/cylp/cy/CyOsiSolverInterface.pyx ++++ b/cylp/cy/CyOsiSolverInterface.pyx +@@ -1,7 +1,3 @@ +- +-cimport CyOsiSolverInterface +- +- + cdef extern from *: + CppOsiClpSolverInterface* dynamic_cast_osi_2_clp "dynamic_cast" (CppOsiSolverInterface*) + CppIClpSimplex* static_cast_clp_2_iclp "static_cast" (CppClpSimplex*) +diff --git a/cylp/cy/CyPivotPythonBase.pyx b/cylp/cy/CyPivotPythonBase.pyx +index ba6a39f..5394fd1 100644 +--- a/cylp/cy/CyPivotPythonBase.pyx ++++ b/cylp/cy/CyPivotPythonBase.pyx +@@ -1,8 +1,6 @@ + # cython: embedsignature=True + + +-cimport CyPivotPythonBase +- + cdef class CyPivotPythonBase(CyClpPrimalColumnPivotBase): + def __init__(self, pivotMethodObject): + CyClpPrimalColumnPivotBase.__init__(self) +diff --git a/cylp/cy/CyWolfePivot.pyx b/cylp/cy/CyWolfePivot.pyx +index 74288cb..de1b14f 100644 +--- a/cylp/cy/CyWolfePivot.pyx ++++ b/cylp/cy/CyWolfePivot.pyx +@@ -1,8 +1,6 @@ + # cython: embedsignature=True + + +-from cylp.cy cimport CyWolfePivot +- + cdef class CyWolfePivot(CyClpPrimalColumnPivotBase): + + cdef pivotColumn(self, CppCoinIndexedVector* cppupdates, CppCoinIndexedVector* cppspareRow1, +diff --git a/cylp/cy/createCythonInterface.py b/cylp/cy/createCythonInterface.py +index 2e284ea..d766d7d 100644 +--- a/cylp/cy/createCythonInterface.py ++++ b/cylp/cy/createCythonInterface.py +@@ -34,7 +34,6 @@ + + #Create the pyx file + pyxContent = ''' +-cimport Cy%s + + cdef class Cy%s: + 'Cy%s documentation' + +From 87785ac27212cb3bfccd621f538db2a4e8c9792c Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Wed, 11 Oct 2023 20:57:37 -0700 +Subject: [PATCH 2/5] Use absolute cimports only + +--- + cylp/cy/CyClpSimplex.pyx | 9 ++++----- + cylp/cy/CyCutGeneratorPythonBase.pxd | 8 ++++---- + cylp/cy/CyDantzigPivot.pxd | 2 +- + cylp/cy/CyDualPivotPythonBase.pxd | 2 +- + cylp/cy/CyPEPivot.pxd | 2 +- + cylp/cy/CyPivotPythonBase.pxd | 2 +- + cylp/cy/CyWolfePivot.pxd | 2 +- + 7 files changed, 13 insertions(+), 14 deletions(-) + +diff --git a/cylp/cy/CyClpSimplex.pyx b/cylp/cy/CyClpSimplex.pyx +index c7d5cf2..f6a8bfb 100644 +--- a/cylp/cy/CyClpSimplex.pyx ++++ b/cylp/cy/CyClpSimplex.pyx +@@ -15,11 +15,10 @@ import numpy as np + cimport numpy as np + from scipy import sparse + cimport cpython.ref as cpy_ref +-from CyWolfePivot cimport CyWolfePivot +-from CyPEPivot cimport CyPEPivot +-from CyPivotPythonBase cimport CyPivotPythonBase +-from CyDualPivotPythonBase cimport CyDualPivotPythonBase +-from cylp.cy cimport CyClpSimplex ++from cylp.cy.CyWolfePivot cimport CyWolfePivot ++from cylp.cy.CyPEPivot cimport CyPEPivot ++from cylp.cy.CyPivotPythonBase cimport CyPivotPythonBase ++from cylp.cy.CyDualPivotPythonBase cimport CyDualPivotPythonBase + from cylp.cy cimport CyCoinModel + from cylp.py.utils.sparseUtil import sparseConcat, csc_matrixPlus + from cylp.py.modeling.CyLPModel import CyLPVar, CyLPArray, CyLPSolution +diff --git a/cylp/cy/CyCutGeneratorPythonBase.pxd b/cylp/cy/CyCutGeneratorPythonBase.pxd +index 64ec234..25061c1 100644 +--- a/cylp/cy/CyCutGeneratorPythonBase.pxd ++++ b/cylp/cy/CyCutGeneratorPythonBase.pxd +@@ -1,7 +1,7 @@ +-from CyCglCutGeneratorBase cimport * +-from CyOsiSolverInterface cimport CppOsiSolverInterface, CyOsiSolverInterface +-from CyOsiCuts cimport CppOsiCuts, CyOsiCuts +-from CyCglTreeInfo cimport CppCglTreeInfo, CyCglTreeInfo ++from cylp.cy.CyCglCutGeneratorBase cimport * ++from cylp.cy.CyOsiSolverInterface cimport CppOsiSolverInterface, CyOsiSolverInterface ++from cylp.cy.CyOsiCuts cimport CppOsiCuts, CyOsiCuts ++from cylp.cy.CyCglTreeInfo cimport CppCglTreeInfo, CyCglTreeInfo + cimport cython.operator.dereference as deref + from cylp.cy.CyClpSimplex cimport CyClpSimplex, CppIClpSimplex + from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector +diff --git a/cylp/cy/CyDantzigPivot.pxd b/cylp/cy/CyDantzigPivot.pxd +index d247b0e..bd1a411 100644 +--- a/cylp/cy/CyDantzigPivot.pxd ++++ b/cylp/cy/CyDantzigPivot.pxd +@@ -1,4 +1,4 @@ +-from CyClpPrimalColumnPivotBase cimport * ++from cylp.cy.CyClpPrimalColumnPivotBase cimport * + from cylp.cy cimport CyClpSimplex + from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector + +diff --git a/cylp/cy/CyDualPivotPythonBase.pxd b/cylp/cy/CyDualPivotPythonBase.pxd +index d4adb7d..99ed8ae 100644 +--- a/cylp/cy/CyDualPivotPythonBase.pxd ++++ b/cylp/cy/CyDualPivotPythonBase.pxd +@@ -1,6 +1,6 @@ + import numpy as np + cimport numpy as np +-from CyClpDualRowPivotBase cimport * ++from cylp.cy.CyClpDualRowPivotBase cimport * + cimport cython.operator.dereference as deref + from cylp.cy cimport CyClpSimplex + from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector +diff --git a/cylp/cy/CyPEPivot.pxd b/cylp/cy/CyPEPivot.pxd +index b8d7bab..9a8d9e9 100644 +--- a/cylp/cy/CyPEPivot.pxd ++++ b/cylp/cy/CyPEPivot.pxd +@@ -1,5 +1,5 @@ + cimport cython.operator.dereference as deref +-from CyClpPrimalColumnPivotBase cimport * ++from cylp.cy.CyClpPrimalColumnPivotBase cimport * + from cylp.cy cimport CyClpSimplex + from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector + +diff --git a/cylp/cy/CyPivotPythonBase.pxd b/cylp/cy/CyPivotPythonBase.pxd +index 12d7dc4..3734a6b 100644 +--- a/cylp/cy/CyPivotPythonBase.pxd ++++ b/cylp/cy/CyPivotPythonBase.pxd +@@ -1,4 +1,4 @@ +-from CyClpPrimalColumnPivotBase cimport * ++from cylp.cy.CyClpPrimalColumnPivotBase cimport * + cimport cython.operator.dereference as deref + from cylp.cy.CyClpSimplex cimport CyClpSimplex, CppIClpSimplex + from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector +diff --git a/cylp/cy/CyWolfePivot.pxd b/cylp/cy/CyWolfePivot.pxd +index 27a700f..27a08e0 100644 +--- a/cylp/cy/CyWolfePivot.pxd ++++ b/cylp/cy/CyWolfePivot.pxd +@@ -1,4 +1,4 @@ +-from CyClpPrimalColumnPivotBase cimport * ++from cylp.cy.CyClpPrimalColumnPivotBase cimport * + from cylp.cy cimport CyClpSimplex + from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector + + +From a0a998d4774620543ba5e872d495b179179fdcc2 Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Wed, 11 Oct 2023 21:29:43 -0700 +Subject: [PATCH 3/5] Remove a duplicate 'cdef cppclass' + +--- + cylp/cy/CyCglCutGeneratorBase.pxd | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/cylp/cy/CyCglCutGeneratorBase.pxd b/cylp/cy/CyCglCutGeneratorBase.pxd +index ba0a8dd..d8d4070 100644 +--- a/cylp/cy/CyCglCutGeneratorBase.pxd ++++ b/cylp/cy/CyCglCutGeneratorBase.pxd +@@ -16,10 +16,6 @@ cdef extern from "CglCutGenerator.hpp": + #CppCglCutGenerator* new_CyCglCutGenerator \ + # "new ICglCutGenerator" () + +-cdef extern from "OsiSolverInterface.hpp": +- cdef cppclass CppOsiSolverInterface "OsiSolverInterface": +- pass +- + cdef extern from "ICglCutGeneratorBase.h": + #cdef cppclass CoinIndexedVector: + # pass + +From 2306dfbfd57150d4c13470ffa07eecb10a644b15 Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Wed, 11 Oct 2023 21:36:10 -0700 +Subject: [PATCH 4/5] Do not use cpdef for variables + +--- + cylp/cy/CyClpSimplex.pxd | 4 ++-- + cylp/cy/CyCoinIndexedVector.pxd | 2 +- + cylp/cy/CyCoinMpsIO.pxd | 2 +- + cylp/cy/CyCoinPackedMatrix.pxd | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/cylp/cy/CyClpSimplex.pxd b/cylp/cy/CyClpSimplex.pxd +index fde2b58..b8b2ad0 100644 +--- a/cylp/cy/CyClpSimplex.pxd ++++ b/cylp/cy/CyClpSimplex.pxd +@@ -304,8 +304,8 @@ cdef class CyClpSimplex: + This is the documentation of CyClpSimpelx in the pyx class + ''' + +- cpdef CppIClpSimplex *CppSelf +- cpdef vars ++ cdef CppIClpSimplex *CppSelf ++ cdef vars + cdef object varSelCriteria + cdef CyCoinModel coinModel + cdef object cyLPModel +diff --git a/cylp/cy/CyCoinIndexedVector.pxd b/cylp/cy/CyCoinIndexedVector.pxd +index 7c2215f..97b550f 100644 +--- a/cylp/cy/CyCoinIndexedVector.pxd ++++ b/cylp/cy/CyCoinIndexedVector.pxd +@@ -20,7 +20,7 @@ cdef extern from "ICoinIndexedVector.hpp": + + + cdef class CyCoinIndexedVector: +- cpdef CppCoinIndexedVector *CppSelf ++ cdef CppCoinIndexedVector *CppSelf + cpdef reserve(self, n) + cpdef assign(self, ind, other) + cdef setCppSelf(self, CppCoinIndexedVector* s) +diff --git a/cylp/cy/CyCoinMpsIO.pxd b/cylp/cy/CyCoinMpsIO.pxd +index 23fcd27..f2ac645 100644 +--- a/cylp/cy/CyCoinMpsIO.pxd ++++ b/cylp/cy/CyCoinMpsIO.pxd +@@ -45,7 +45,7 @@ cdef extern from "ICoinMpsIO.hpp": + + cdef class CyCoinMpsIO: + cdef CppICoinMpsIO *CppSelf +- cpdef Hessian ++ cdef Hessian + # cpdef getColLower(self) + # cpdef getColUpper(self) + # cpdef getRowSense(self) +diff --git a/cylp/cy/CyCoinPackedMatrix.pxd b/cylp/cy/CyCoinPackedMatrix.pxd +index 8515921..c1fa0bb 100644 +--- a/cylp/cy/CyCoinPackedMatrix.pxd ++++ b/cylp/cy/CyCoinPackedMatrix.pxd +@@ -25,7 +25,7 @@ cdef extern from "ICoinPackedMatrix.hpp": + + + cdef class CyCoinPackedMatrix: +- cpdef CppCoinPackedMatrix* CppSelf ++ cdef CppCoinPackedMatrix* CppSelf + #cpdef getIndices(self) + #cpdef getElements(self) + #cpdef getNumElements(self) + +From 3bbeb732034b7797a3ef218d84230b6513fc264c Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Wed, 11 Oct 2023 21:45:33 -0700 +Subject: [PATCH 5/5] cylp/cy/CyCbcModel.pxd: Update exception specs for Cython + 3 + +--- + cylp/cy/CyCbcModel.pxd | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/cylp/cy/CyCbcModel.pxd b/cylp/cy/CyCbcModel.pxd +index 5e43922..f19a50b 100644 +--- a/cylp/cy/CyCbcModel.pxd ++++ b/cylp/cy/CyCbcModel.pxd +@@ -10,12 +10,12 @@ cdef extern from "CbcCompareUser.hpp": + cdef cppclass CppCbcCompareUser "CbcCompareUser": + pass + ctypedef int (*runTest_t)(void* instance, CppICbcNode* x, +- CppICbcNode* y) ++ CppICbcNode* y) except? -1 + ctypedef bint (*runNewSolution_t)(void*instance, CppICbcModel* model, + double objectiveAtContinuous, +- int numberInfeasibilitiesAtContinuous) ++ int numberInfeasibilitiesAtContinuous) except? -1 + ctypedef int (*runEvery1000Nodes_t)(void* instance, +- CppICbcModel* model, int numberNodes) ++ CppICbcModel* model, int numberNodes) except? -1 + bint equalityTest(CppICbcNode* x, CppICbcNode* y) + + diff --git a/build/pkgs/cylp/spkg-install.in b/build/pkgs/cylp/spkg-install.in index e840732a8e5..96d7ddadef6 100644 --- a/build/pkgs/cylp/spkg-install.in +++ b/build/pkgs/cylp/spkg-install.in @@ -1,5 +1,6 @@ cd src # use pkg-config to discover coin installation unset COIN_INSTALL_DIR -# --no-build-isolation to ignore the numpy version pin in pyproject.toml -sdh_pip_install --no-build-isolation . +# Remove the Cython version bound and numpy version pin in pyproject.toml +sed -i.bak -e "/^ *'Cython/s/Cython[^']*/Cython/;/^ *'.*numpy/s/oldest-supported-numpy/numpy/;" pyproject.toml +sdh_pip_install . From 7f94b4e1d6b14ddf0ac98b644f679c6d4b241e10 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 11 Oct 2023 22:55:25 -0700 Subject: [PATCH 07/16] build/pkgs/clarabel: New pip package, cvxpy dependency --- build/pkgs/clarabel/SPKG.rst | 18 ++++++++++++++++++ build/pkgs/clarabel/dependencies | 4 ++++ build/pkgs/clarabel/requirements.txt | 1 + build/pkgs/clarabel/type | 1 + 4 files changed, 24 insertions(+) create mode 100644 build/pkgs/clarabel/SPKG.rst create mode 100644 build/pkgs/clarabel/dependencies create mode 100644 build/pkgs/clarabel/requirements.txt create mode 100644 build/pkgs/clarabel/type diff --git a/build/pkgs/clarabel/SPKG.rst b/build/pkgs/clarabel/SPKG.rst new file mode 100644 index 00000000000..a77207536a6 --- /dev/null +++ b/build/pkgs/clarabel/SPKG.rst @@ -0,0 +1,18 @@ +clarabel: Clarabel Conic Interior Point Solver for Rust / Python +================================================================ + +Description +----------- + +Clarabel Conic Interior Point Solver for Rust / Python + +License +------- + +Apache-2.0 + +Upstream Contact +---------------- + +https://pypi.org/project/clarabel/ + diff --git a/build/pkgs/clarabel/dependencies b/build/pkgs/clarabel/dependencies new file mode 100644 index 00000000000..47296a7bace --- /dev/null +++ b/build/pkgs/clarabel/dependencies @@ -0,0 +1,4 @@ + | $(PYTHON_TOOLCHAIN) $(PYTHON) + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/clarabel/requirements.txt b/build/pkgs/clarabel/requirements.txt new file mode 100644 index 00000000000..52160bfd9bd --- /dev/null +++ b/build/pkgs/clarabel/requirements.txt @@ -0,0 +1 @@ +clarabel diff --git a/build/pkgs/clarabel/type b/build/pkgs/clarabel/type new file mode 100644 index 00000000000..134d9bc32d5 --- /dev/null +++ b/build/pkgs/clarabel/type @@ -0,0 +1 @@ +optional From dbe2277721871beac84ba1b0f7bb6b240515edbd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 11 Oct 2023 23:06:39 -0700 Subject: [PATCH 08/16] build/pkgs/cvxpy/dependencies: Add clarabel --- build/pkgs/cvxpy/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/cvxpy/dependencies b/build/pkgs/cvxpy/dependencies index 42cfab890cc..400617f69a8 100644 --- a/build/pkgs/cvxpy/dependencies +++ b/build/pkgs/cvxpy/dependencies @@ -1,4 +1,4 @@ - numpy scipy glpk cvxopt osqp_python ecos_python scs | $(PYTHON_TOOLCHAIN) $(PYTHON) + numpy scipy glpk cvxopt osqp_python ecos_python scs clarabel | $(PYTHON_TOOLCHAIN) $(PYTHON) ---------- All lines of this file are ignored except the first. From 8f04313683c311048b564fd5953faeb44168728b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 11 Oct 2023 23:07:47 -0700 Subject: [PATCH 09/16] build/pkgs/{cvxpy,ecos_python,osqp_python,scs}/spkg-install.in: Instead of --no-build-isolation, patch out version constraints in pyproject.toml --- build/pkgs/cvxpy/spkg-install.in | 6 ++++-- build/pkgs/ecos_python/spkg-install.in | 5 +++-- build/pkgs/osqp_python/spkg-install.in | 5 +++-- build/pkgs/scs/spkg-install.in | 5 +++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/build/pkgs/cvxpy/spkg-install.in b/build/pkgs/cvxpy/spkg-install.in index a143d1eff96..87689346ca8 100644 --- a/build/pkgs/cvxpy/spkg-install.in +++ b/build/pkgs/cvxpy/spkg-install.in @@ -1,3 +1,5 @@ cd src -# --no-build-isolation to ignore the numpy version pin in pyproject.toml -sdh_pip_install --no-build-isolation . +# Remove numpy version pin in pyproject.toml +sed -E -i.bak -e "s/numpy[ <>=]+[0-9,.<>= ]+/numpy/;" pyproject.toml +cat pyproject.toml +sdh_pip_install . diff --git a/build/pkgs/ecos_python/spkg-install.in b/build/pkgs/ecos_python/spkg-install.in index a143d1eff96..833ab197b47 100644 --- a/build/pkgs/ecos_python/spkg-install.in +++ b/build/pkgs/ecos_python/spkg-install.in @@ -1,3 +1,4 @@ cd src -# --no-build-isolation to ignore the numpy version pin in pyproject.toml -sdh_pip_install --no-build-isolation . +# Remove numpy version pin in pyproject.toml +sed -i.bak -e "s/oldest-supported-numpy/numpy/;" pyproject.toml +sdh_pip_install . diff --git a/build/pkgs/osqp_python/spkg-install.in b/build/pkgs/osqp_python/spkg-install.in index a143d1eff96..833ab197b47 100644 --- a/build/pkgs/osqp_python/spkg-install.in +++ b/build/pkgs/osqp_python/spkg-install.in @@ -1,3 +1,4 @@ cd src -# --no-build-isolation to ignore the numpy version pin in pyproject.toml -sdh_pip_install --no-build-isolation . +# Remove numpy version pin in pyproject.toml +sed -i.bak -e "s/oldest-supported-numpy/numpy/;" pyproject.toml +sdh_pip_install . diff --git a/build/pkgs/scs/spkg-install.in b/build/pkgs/scs/spkg-install.in index a143d1eff96..7adc0178622 100644 --- a/build/pkgs/scs/spkg-install.in +++ b/build/pkgs/scs/spkg-install.in @@ -1,3 +1,4 @@ cd src -# --no-build-isolation to ignore the numpy version pin in pyproject.toml -sdh_pip_install --no-build-isolation . +# Remove numpy version pin in pyproject.toml +sed -E -i.bak -e "s,setuptools[ <>=]+[0-9.]+,setuptools,;s/oldest-supported-numpy/numpy/;" pyproject.toml +sdh_pip_install . From c1e87d4f22e9c1845c406d154ddd4ab86b7cef9d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 25 Oct 2023 23:52:22 -0700 Subject: [PATCH 10/16] build/pkgs/cylp: Update to 0.92.0 --- build/pkgs/cylp/checksums.ini | 6 +++--- build/pkgs/cylp/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/cylp/checksums.ini b/build/pkgs/cylp/checksums.ini index d57bc940ac2..4b55b3ae7e8 100644 --- a/build/pkgs/cylp/checksums.ini +++ b/build/pkgs/cylp/checksums.ini @@ -1,5 +1,5 @@ tarball=cylp-VERSION.tar.gz -sha1=edbcc68e1fbf35bb48e8bac136633a1e635d3729 -md5=c9039d0a5d45c9ac124b919855b8ce1f -cksum=1696691984 +sha1=709228dcf3b58ea8f9b82fb49cda15de4b9d6b20 +md5=86f431eb98b04a90342879e424086889 +cksum=2094986033 upstream_url=https://pypi.io/packages/source/c/cylp/cylp-VERSION.tar.gz diff --git a/build/pkgs/cylp/package-version.txt b/build/pkgs/cylp/package-version.txt index c182bd4d62b..36545ad338e 100644 --- a/build/pkgs/cylp/package-version.txt +++ b/build/pkgs/cylp/package-version.txt @@ -1 +1 @@ -0.91.6.p1 +0.92.0 From 17735d6ed44708954a36db70cba1ef82078f3be3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 25 Oct 2023 23:52:35 -0700 Subject: [PATCH 11/16] build/pkgs/cvxpy: Update to 1.4.1 --- build/pkgs/cvxpy/checksums.ini | 6 +++--- build/pkgs/cvxpy/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/cvxpy/checksums.ini b/build/pkgs/cvxpy/checksums.ini index e9075f3f898..3f76d4a6228 100644 --- a/build/pkgs/cvxpy/checksums.ini +++ b/build/pkgs/cvxpy/checksums.ini @@ -1,5 +1,5 @@ tarball=cvxpy-VERSION.tar.gz -sha1=8d80513117a6a8a4ba14b3ac538a2edebcd3f0f6 -md5=5e12e46626c4fa008d2560b0941c22f1 -cksum=2871212675 +sha1=1ca24d9e2ee5add13b33724ab9a11e747fe4ed99 +md5=da9fa9feb9634d3562057484b9822889 +cksum=1557666297 upstream_url=https://pypi.io/packages/source/c/cvxpy/cvxpy-VERSION.tar.gz diff --git a/build/pkgs/cvxpy/package-version.txt b/build/pkgs/cvxpy/package-version.txt index 88c5fb891dc..347f5833ee6 100644 --- a/build/pkgs/cvxpy/package-version.txt +++ b/build/pkgs/cvxpy/package-version.txt @@ -1 +1 @@ -1.4.0 +1.4.1 From f009651081097a1494af249f18b95ac475718aab Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 29 Oct 2023 14:32:16 -0700 Subject: [PATCH 12/16] build/pkgs/cylp: Update to 0.92.1 --- build/pkgs/cylp/checksums.ini | 6 +++--- build/pkgs/cylp/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/cylp/checksums.ini b/build/pkgs/cylp/checksums.ini index 4b55b3ae7e8..af3bfec5106 100644 --- a/build/pkgs/cylp/checksums.ini +++ b/build/pkgs/cylp/checksums.ini @@ -1,5 +1,5 @@ tarball=cylp-VERSION.tar.gz -sha1=709228dcf3b58ea8f9b82fb49cda15de4b9d6b20 -md5=86f431eb98b04a90342879e424086889 -cksum=2094986033 +sha1=58a611bf775ed40e9a1ed90f2a0ae2a24781e8d3 +md5=0b967d6144bd6012fadfa28ead64bcc2 +cksum=3545374197 upstream_url=https://pypi.io/packages/source/c/cylp/cylp-VERSION.tar.gz diff --git a/build/pkgs/cylp/package-version.txt b/build/pkgs/cylp/package-version.txt index 36545ad338e..da011ce41e1 100644 --- a/build/pkgs/cylp/package-version.txt +++ b/build/pkgs/cylp/package-version.txt @@ -1 +1 @@ -0.92.0 +0.92.1 From ed79483e93dde5e3869df124189c2e1079b94848 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 2 Nov 2023 10:24:32 -0700 Subject: [PATCH 13/16] build/pkgs/cylp/patches/cython3.patch: Remove (upstreamed) --- build/pkgs/cylp/patches/cython3.patch | 399 -------------------------- 1 file changed, 399 deletions(-) delete mode 100644 build/pkgs/cylp/patches/cython3.patch diff --git a/build/pkgs/cylp/patches/cython3.patch b/build/pkgs/cylp/patches/cython3.patch deleted file mode 100644 index 7e2447f6b01..00000000000 --- a/build/pkgs/cylp/patches/cython3.patch +++ /dev/null @@ -1,399 +0,0 @@ -From 819e046b0231e9eb7b7c6dda9ab1ba94cf5abccd Mon Sep 17 00:00:00 2001 -From: Matthias Koeppe -Date: Wed, 11 Oct 2023 20:36:35 -0700 -Subject: [PATCH 1/5] Remove outdated self-cimports in pyx files - ---- - cylp/cy/CyCbcNode.pyx | 3 --- - cylp/cy/CyCglCutGeneratorBase.pyx | 3 --- - cylp/cy/CyCglTreeInfo.pyx | 3 --- - cylp/cy/CyCoinModel.pyx | 3 --- - cylp/cy/CyCutGeneratorPythonBase.pyx | 4 ---- - cylp/cy/CyDantzigPivot.pyx | 2 -- - cylp/cy/CyDualPivotPythonBase.pyx | 3 --- - cylp/cy/CyOsiCuts.pyx | 1 - - cylp/cy/CyOsiSolverInterface.pyx | 4 ---- - cylp/cy/CyPivotPythonBase.pyx | 2 -- - cylp/cy/CyWolfePivot.pyx | 2 -- - cylp/cy/createCythonInterface.py | 1 - - 12 files changed, 31 deletions(-) - -diff --git a/cylp/cy/CyCbcNode.pyx b/cylp/cy/CyCbcNode.pyx -index a4092d0..d8da84d 100644 ---- a/cylp/cy/CyCbcNode.pyx -+++ b/cylp/cy/CyCbcNode.pyx -@@ -1,8 +1,5 @@ - # cython: embedsignature=True - -- --cimport CyCbcNode -- - cdef class CyCbcNode: - def __cinit__(self): - self.CppSelf = new CppICbcNode() -diff --git a/cylp/cy/CyCglCutGeneratorBase.pyx b/cylp/cy/CyCglCutGeneratorBase.pyx -index 0bb324f..a2f2054 100644 ---- a/cylp/cy/CyCglCutGeneratorBase.pyx -+++ b/cylp/cy/CyCglCutGeneratorBase.pyx -@@ -1,8 +1,5 @@ - # cython: embedsignature=True - --cimport CyCglCutGeneratorBase --from cylp.cy.CyCglCutGeneratorBase import CyCglCutGeneratorBase -- - cdef void RunGenerateCuts(void *ptr, CppOsiSolverInterface *si, - CppOsiCuts *cs, - CppCglTreeInfo info): -diff --git a/cylp/cy/CyCglTreeInfo.pyx b/cylp/cy/CyCglTreeInfo.pyx -index 5c599bd..7857a02 100644 ---- a/cylp/cy/CyCglTreeInfo.pyx -+++ b/cylp/cy/CyCglTreeInfo.pyx -@@ -1,6 +1,3 @@ -- --cimport CyCglTreeInfo -- - cdef class CyCglTreeInfo: - 'CyCglTreeInfo documentation' - def __cinit__(self): -diff --git a/cylp/cy/CyCoinModel.pyx b/cylp/cy/CyCoinModel.pyx -index f08b88a..55f038d 100644 ---- a/cylp/cy/CyCoinModel.pyx -+++ b/cylp/cy/CyCoinModel.pyx -@@ -1,8 +1,5 @@ - # cython: embedsignature=True - -- --from cylp.cy cimport CyCoinModel -- - cdef class CyCoinModel: - ''' - -diff --git a/cylp/cy/CyCutGeneratorPythonBase.pyx b/cylp/cy/CyCutGeneratorPythonBase.pyx -index b067f70..48aa44d 100644 ---- a/cylp/cy/CyCutGeneratorPythonBase.pyx -+++ b/cylp/cy/CyCutGeneratorPythonBase.pyx -@@ -1,9 +1,5 @@ - # cython: embedsignature=True - -- --cimport CyCutGeneratorPythonBase -- -- - cdef class CyCutGeneratorPythonBase(CyCglCutGeneratorBase): - def __init__(self, cutGeneratorObject, cyLPModel=None): - CyCglCutGeneratorBase.__init__(self) -diff --git a/cylp/cy/CyDantzigPivot.pyx b/cylp/cy/CyDantzigPivot.pyx -index 8089ff4..7714019 100644 ---- a/cylp/cy/CyDantzigPivot.pyx -+++ b/cylp/cy/CyDantzigPivot.pyx -@@ -3,8 +3,6 @@ - - import numpy as np - cimport numpy as np --cimport CyDantzigPivot --#cimport CyClpSimplex - - # varStatus defined to mimic 'enum ClpSimplex::Status'. - # But is too slow obviously -diff --git a/cylp/cy/CyDualPivotPythonBase.pyx b/cylp/cy/CyDualPivotPythonBase.pyx -index 89f4ebc..f33d5ae 100644 ---- a/cylp/cy/CyDualPivotPythonBase.pyx -+++ b/cylp/cy/CyDualPivotPythonBase.pyx -@@ -1,8 +1,5 @@ - # cython: embedsignature=True - -- --cimport CyDualPivotPythonBase -- - cdef class CyDualPivotPythonBase(CyClpDualRowPivotBase): - def __init__(self, dualPivotMethodObject): - CyClpDualRowPivotBase.__init__(self) -diff --git a/cylp/cy/CyOsiCuts.pyx b/cylp/cy/CyOsiCuts.pyx -index 828d32f..f58490f 100644 ---- a/cylp/cy/CyOsiCuts.pyx -+++ b/cylp/cy/CyOsiCuts.pyx -@@ -1,6 +1,5 @@ - import scipy - from scipy.sparse import csr_matrix --cimport CyOsiCuts - from cylp.py.modeling.CyLPModel import CyLPModel - cimport numpy as np - import numpy as np -diff --git a/cylp/cy/CyOsiSolverInterface.pyx b/cylp/cy/CyOsiSolverInterface.pyx -index b3f0514..5bde926 100644 ---- a/cylp/cy/CyOsiSolverInterface.pyx -+++ b/cylp/cy/CyOsiSolverInterface.pyx -@@ -1,7 +1,3 @@ -- --cimport CyOsiSolverInterface -- -- - cdef extern from *: - CppOsiClpSolverInterface* dynamic_cast_osi_2_clp "dynamic_cast" (CppOsiSolverInterface*) - CppIClpSimplex* static_cast_clp_2_iclp "static_cast" (CppClpSimplex*) -diff --git a/cylp/cy/CyPivotPythonBase.pyx b/cylp/cy/CyPivotPythonBase.pyx -index ba6a39f..5394fd1 100644 ---- a/cylp/cy/CyPivotPythonBase.pyx -+++ b/cylp/cy/CyPivotPythonBase.pyx -@@ -1,8 +1,6 @@ - # cython: embedsignature=True - - --cimport CyPivotPythonBase -- - cdef class CyPivotPythonBase(CyClpPrimalColumnPivotBase): - def __init__(self, pivotMethodObject): - CyClpPrimalColumnPivotBase.__init__(self) -diff --git a/cylp/cy/CyWolfePivot.pyx b/cylp/cy/CyWolfePivot.pyx -index 74288cb..de1b14f 100644 ---- a/cylp/cy/CyWolfePivot.pyx -+++ b/cylp/cy/CyWolfePivot.pyx -@@ -1,8 +1,6 @@ - # cython: embedsignature=True - - --from cylp.cy cimport CyWolfePivot -- - cdef class CyWolfePivot(CyClpPrimalColumnPivotBase): - - cdef pivotColumn(self, CppCoinIndexedVector* cppupdates, CppCoinIndexedVector* cppspareRow1, -diff --git a/cylp/cy/createCythonInterface.py b/cylp/cy/createCythonInterface.py -index 2e284ea..d766d7d 100644 ---- a/cylp/cy/createCythonInterface.py -+++ b/cylp/cy/createCythonInterface.py -@@ -34,7 +34,6 @@ - - #Create the pyx file - pyxContent = ''' --cimport Cy%s - - cdef class Cy%s: - 'Cy%s documentation' - -From 87785ac27212cb3bfccd621f538db2a4e8c9792c Mon Sep 17 00:00:00 2001 -From: Matthias Koeppe -Date: Wed, 11 Oct 2023 20:57:37 -0700 -Subject: [PATCH 2/5] Use absolute cimports only - ---- - cylp/cy/CyClpSimplex.pyx | 9 ++++----- - cylp/cy/CyCutGeneratorPythonBase.pxd | 8 ++++---- - cylp/cy/CyDantzigPivot.pxd | 2 +- - cylp/cy/CyDualPivotPythonBase.pxd | 2 +- - cylp/cy/CyPEPivot.pxd | 2 +- - cylp/cy/CyPivotPythonBase.pxd | 2 +- - cylp/cy/CyWolfePivot.pxd | 2 +- - 7 files changed, 13 insertions(+), 14 deletions(-) - -diff --git a/cylp/cy/CyClpSimplex.pyx b/cylp/cy/CyClpSimplex.pyx -index c7d5cf2..f6a8bfb 100644 ---- a/cylp/cy/CyClpSimplex.pyx -+++ b/cylp/cy/CyClpSimplex.pyx -@@ -15,11 +15,10 @@ import numpy as np - cimport numpy as np - from scipy import sparse - cimport cpython.ref as cpy_ref --from CyWolfePivot cimport CyWolfePivot --from CyPEPivot cimport CyPEPivot --from CyPivotPythonBase cimport CyPivotPythonBase --from CyDualPivotPythonBase cimport CyDualPivotPythonBase --from cylp.cy cimport CyClpSimplex -+from cylp.cy.CyWolfePivot cimport CyWolfePivot -+from cylp.cy.CyPEPivot cimport CyPEPivot -+from cylp.cy.CyPivotPythonBase cimport CyPivotPythonBase -+from cylp.cy.CyDualPivotPythonBase cimport CyDualPivotPythonBase - from cylp.cy cimport CyCoinModel - from cylp.py.utils.sparseUtil import sparseConcat, csc_matrixPlus - from cylp.py.modeling.CyLPModel import CyLPVar, CyLPArray, CyLPSolution -diff --git a/cylp/cy/CyCutGeneratorPythonBase.pxd b/cylp/cy/CyCutGeneratorPythonBase.pxd -index 64ec234..25061c1 100644 ---- a/cylp/cy/CyCutGeneratorPythonBase.pxd -+++ b/cylp/cy/CyCutGeneratorPythonBase.pxd -@@ -1,7 +1,7 @@ --from CyCglCutGeneratorBase cimport * --from CyOsiSolverInterface cimport CppOsiSolverInterface, CyOsiSolverInterface --from CyOsiCuts cimport CppOsiCuts, CyOsiCuts --from CyCglTreeInfo cimport CppCglTreeInfo, CyCglTreeInfo -+from cylp.cy.CyCglCutGeneratorBase cimport * -+from cylp.cy.CyOsiSolverInterface cimport CppOsiSolverInterface, CyOsiSolverInterface -+from cylp.cy.CyOsiCuts cimport CppOsiCuts, CyOsiCuts -+from cylp.cy.CyCglTreeInfo cimport CppCglTreeInfo, CyCglTreeInfo - cimport cython.operator.dereference as deref - from cylp.cy.CyClpSimplex cimport CyClpSimplex, CppIClpSimplex - from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector -diff --git a/cylp/cy/CyDantzigPivot.pxd b/cylp/cy/CyDantzigPivot.pxd -index d247b0e..bd1a411 100644 ---- a/cylp/cy/CyDantzigPivot.pxd -+++ b/cylp/cy/CyDantzigPivot.pxd -@@ -1,4 +1,4 @@ --from CyClpPrimalColumnPivotBase cimport * -+from cylp.cy.CyClpPrimalColumnPivotBase cimport * - from cylp.cy cimport CyClpSimplex - from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector - -diff --git a/cylp/cy/CyDualPivotPythonBase.pxd b/cylp/cy/CyDualPivotPythonBase.pxd -index d4adb7d..99ed8ae 100644 ---- a/cylp/cy/CyDualPivotPythonBase.pxd -+++ b/cylp/cy/CyDualPivotPythonBase.pxd -@@ -1,6 +1,6 @@ - import numpy as np - cimport numpy as np --from CyClpDualRowPivotBase cimport * -+from cylp.cy.CyClpDualRowPivotBase cimport * - cimport cython.operator.dereference as deref - from cylp.cy cimport CyClpSimplex - from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector -diff --git a/cylp/cy/CyPEPivot.pxd b/cylp/cy/CyPEPivot.pxd -index b8d7bab..9a8d9e9 100644 ---- a/cylp/cy/CyPEPivot.pxd -+++ b/cylp/cy/CyPEPivot.pxd -@@ -1,5 +1,5 @@ - cimport cython.operator.dereference as deref --from CyClpPrimalColumnPivotBase cimport * -+from cylp.cy.CyClpPrimalColumnPivotBase cimport * - from cylp.cy cimport CyClpSimplex - from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector - -diff --git a/cylp/cy/CyPivotPythonBase.pxd b/cylp/cy/CyPivotPythonBase.pxd -index 12d7dc4..3734a6b 100644 ---- a/cylp/cy/CyPivotPythonBase.pxd -+++ b/cylp/cy/CyPivotPythonBase.pxd -@@ -1,4 +1,4 @@ --from CyClpPrimalColumnPivotBase cimport * -+from cylp.cy.CyClpPrimalColumnPivotBase cimport * - cimport cython.operator.dereference as deref - from cylp.cy.CyClpSimplex cimport CyClpSimplex, CppIClpSimplex - from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector -diff --git a/cylp/cy/CyWolfePivot.pxd b/cylp/cy/CyWolfePivot.pxd -index 27a700f..27a08e0 100644 ---- a/cylp/cy/CyWolfePivot.pxd -+++ b/cylp/cy/CyWolfePivot.pxd -@@ -1,4 +1,4 @@ --from CyClpPrimalColumnPivotBase cimport * -+from cylp.cy.CyClpPrimalColumnPivotBase cimport * - from cylp.cy cimport CyClpSimplex - from cylp.cy.CyCoinIndexedVector cimport CyCoinIndexedVector - - -From a0a998d4774620543ba5e872d495b179179fdcc2 Mon Sep 17 00:00:00 2001 -From: Matthias Koeppe -Date: Wed, 11 Oct 2023 21:29:43 -0700 -Subject: [PATCH 3/5] Remove a duplicate 'cdef cppclass' - ---- - cylp/cy/CyCglCutGeneratorBase.pxd | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/cylp/cy/CyCglCutGeneratorBase.pxd b/cylp/cy/CyCglCutGeneratorBase.pxd -index ba0a8dd..d8d4070 100644 ---- a/cylp/cy/CyCglCutGeneratorBase.pxd -+++ b/cylp/cy/CyCglCutGeneratorBase.pxd -@@ -16,10 +16,6 @@ cdef extern from "CglCutGenerator.hpp": - #CppCglCutGenerator* new_CyCglCutGenerator \ - # "new ICglCutGenerator" () - --cdef extern from "OsiSolverInterface.hpp": -- cdef cppclass CppOsiSolverInterface "OsiSolverInterface": -- pass -- - cdef extern from "ICglCutGeneratorBase.h": - #cdef cppclass CoinIndexedVector: - # pass - -From 2306dfbfd57150d4c13470ffa07eecb10a644b15 Mon Sep 17 00:00:00 2001 -From: Matthias Koeppe -Date: Wed, 11 Oct 2023 21:36:10 -0700 -Subject: [PATCH 4/5] Do not use cpdef for variables - ---- - cylp/cy/CyClpSimplex.pxd | 4 ++-- - cylp/cy/CyCoinIndexedVector.pxd | 2 +- - cylp/cy/CyCoinMpsIO.pxd | 2 +- - cylp/cy/CyCoinPackedMatrix.pxd | 2 +- - 4 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/cylp/cy/CyClpSimplex.pxd b/cylp/cy/CyClpSimplex.pxd -index fde2b58..b8b2ad0 100644 ---- a/cylp/cy/CyClpSimplex.pxd -+++ b/cylp/cy/CyClpSimplex.pxd -@@ -304,8 +304,8 @@ cdef class CyClpSimplex: - This is the documentation of CyClpSimpelx in the pyx class - ''' - -- cpdef CppIClpSimplex *CppSelf -- cpdef vars -+ cdef CppIClpSimplex *CppSelf -+ cdef vars - cdef object varSelCriteria - cdef CyCoinModel coinModel - cdef object cyLPModel -diff --git a/cylp/cy/CyCoinIndexedVector.pxd b/cylp/cy/CyCoinIndexedVector.pxd -index 7c2215f..97b550f 100644 ---- a/cylp/cy/CyCoinIndexedVector.pxd -+++ b/cylp/cy/CyCoinIndexedVector.pxd -@@ -20,7 +20,7 @@ cdef extern from "ICoinIndexedVector.hpp": - - - cdef class CyCoinIndexedVector: -- cpdef CppCoinIndexedVector *CppSelf -+ cdef CppCoinIndexedVector *CppSelf - cpdef reserve(self, n) - cpdef assign(self, ind, other) - cdef setCppSelf(self, CppCoinIndexedVector* s) -diff --git a/cylp/cy/CyCoinMpsIO.pxd b/cylp/cy/CyCoinMpsIO.pxd -index 23fcd27..f2ac645 100644 ---- a/cylp/cy/CyCoinMpsIO.pxd -+++ b/cylp/cy/CyCoinMpsIO.pxd -@@ -45,7 +45,7 @@ cdef extern from "ICoinMpsIO.hpp": - - cdef class CyCoinMpsIO: - cdef CppICoinMpsIO *CppSelf -- cpdef Hessian -+ cdef Hessian - # cpdef getColLower(self) - # cpdef getColUpper(self) - # cpdef getRowSense(self) -diff --git a/cylp/cy/CyCoinPackedMatrix.pxd b/cylp/cy/CyCoinPackedMatrix.pxd -index 8515921..c1fa0bb 100644 ---- a/cylp/cy/CyCoinPackedMatrix.pxd -+++ b/cylp/cy/CyCoinPackedMatrix.pxd -@@ -25,7 +25,7 @@ cdef extern from "ICoinPackedMatrix.hpp": - - - cdef class CyCoinPackedMatrix: -- cpdef CppCoinPackedMatrix* CppSelf -+ cdef CppCoinPackedMatrix* CppSelf - #cpdef getIndices(self) - #cpdef getElements(self) - #cpdef getNumElements(self) - -From 3bbeb732034b7797a3ef218d84230b6513fc264c Mon Sep 17 00:00:00 2001 -From: Matthias Koeppe -Date: Wed, 11 Oct 2023 21:45:33 -0700 -Subject: [PATCH 5/5] cylp/cy/CyCbcModel.pxd: Update exception specs for Cython - 3 - ---- - cylp/cy/CyCbcModel.pxd | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/cylp/cy/CyCbcModel.pxd b/cylp/cy/CyCbcModel.pxd -index 5e43922..f19a50b 100644 ---- a/cylp/cy/CyCbcModel.pxd -+++ b/cylp/cy/CyCbcModel.pxd -@@ -10,12 +10,12 @@ cdef extern from "CbcCompareUser.hpp": - cdef cppclass CppCbcCompareUser "CbcCompareUser": - pass - ctypedef int (*runTest_t)(void* instance, CppICbcNode* x, -- CppICbcNode* y) -+ CppICbcNode* y) except? -1 - ctypedef bint (*runNewSolution_t)(void*instance, CppICbcModel* model, - double objectiveAtContinuous, -- int numberInfeasibilitiesAtContinuous) -+ int numberInfeasibilitiesAtContinuous) except? -1 - ctypedef int (*runEvery1000Nodes_t)(void* instance, -- CppICbcModel* model, int numberNodes) -+ CppICbcModel* model, int numberNodes) except? -1 - bint equalityTest(CppICbcNode* x, CppICbcNode* y) - - From 5279474a5de774ef5d83062330d7a8a78a7b9ec2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 2 Nov 2023 10:24:45 -0700 Subject: [PATCH 14/16] build/pkgs/cylp: Update to 0.92.2 --- build/pkgs/cylp/checksums.ini | 6 +++--- build/pkgs/cylp/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/cylp/checksums.ini b/build/pkgs/cylp/checksums.ini index af3bfec5106..570be6d38a8 100644 --- a/build/pkgs/cylp/checksums.ini +++ b/build/pkgs/cylp/checksums.ini @@ -1,5 +1,5 @@ tarball=cylp-VERSION.tar.gz -sha1=58a611bf775ed40e9a1ed90f2a0ae2a24781e8d3 -md5=0b967d6144bd6012fadfa28ead64bcc2 -cksum=3545374197 +sha1=22398052ca88123b77e691a0045806a030c9b259 +md5=ac00f775af15afcee1b7932144441ec0 +cksum=2746382211 upstream_url=https://pypi.io/packages/source/c/cylp/cylp-VERSION.tar.gz diff --git a/build/pkgs/cylp/package-version.txt b/build/pkgs/cylp/package-version.txt index da011ce41e1..1afbfdb8a4c 100644 --- a/build/pkgs/cylp/package-version.txt +++ b/build/pkgs/cylp/package-version.txt @@ -1 +1 @@ -0.92.1 +0.92.2 From d91ccbb797171f137edb88c0845d93a022cdc58b Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 11 Dec 2023 14:18:25 +0000 Subject: [PATCH 15/16] allow -0.0 as well as 0.0 --- src/sage/numerical/backends/cvxopt_backend.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/numerical/backends/cvxopt_backend.pyx b/src/sage/numerical/backends/cvxopt_backend.pyx index 0e2f3b82896..045c661b9c8 100644 --- a/src/sage/numerical/backends/cvxopt_backend.pyx +++ b/src/sage/numerical/backends/cvxopt_backend.pyx @@ -487,9 +487,9 @@ cdef class CVXOPTBackend(GenericBackend): 100.0 sage: N(g.solve(), digits=4) 100.0 - sage: N(g.get_values(xg[0]), 2) + sage: N(g.get_values(xg[0]), 2) # abstol 1e-15 0.00 - sage: N(g.get_values(xg[1]), 2) + sage: N(g.get_values(xg[1]), 2) # abstol 1e-15 0.00 sage: N(g.get_values(xg[2]), digits=4) 100.0 From 3bc7ea6a2579fb1b9ba4501fe6024178f74190e3 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 11 Dec 2023 14:27:07 +0000 Subject: [PATCH 16/16] doctest fix --- src/sage/numerical/backends/cvxpy_backend.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index 1cbba9f6375..c07d33e5ae7 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -155,6 +155,8 @@ cdef class CVXPYBackend: sage: p.set_objective(b[1] + b[2]) sage: cp = copy(p.get_backend()) sage: cp.solve() + doctest:warning...: + FutureWarning:... 0 sage: cp.get_objective_value() # abs tol 1e-7 6.0