diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 27c57e7..c1c1b8c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "cvxpy" %} -{% set version = "1.2.3" %} +{% set version = "1.3.0" %} package: name: cvxpy-split @@ -7,9 +7,11 @@ package: source: url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - sha256: 21a794b6fd2f760a9d766d68fbe4946534f65e89b73e89b889c5503985558b86 + sha256: 66cce67bdc635b9b29066510474392c0cfc0d95db8adda4010dc8cdd8e046250 patches: - - patches/0001-remove-pyproject.toml.patch + # backport https://github.com/cvxpy/cvxpy/pull/1998 (two patches) + - patches/0001-fix-relative-import.patch + - patches/0002-do-not-use-__builtins__-as-dict.patch build: number: 0 @@ -55,7 +57,10 @@ outputs: - name: cvxpy-base build: - script: {{ PYTHON }} -m pip install . --no-deps -vvv + script: + - rm $SRC_DIR/pyproject.toml # [unix] + - del %SRC_DIR%\pyproject.toml # [win] + - {{ PYTHON }} -m pip install . --no-deps -vvv requirements: build: - python # [build_platform != target_platform] @@ -74,37 +79,9 @@ outputs: - scipy >=1.1.0 test: imports: + # public interface is defined (see #75) to be the content of + # https://github.com/cvxpy/cvxpy/blob/master/cvxpy/__init__.py - cvxpy - - cvxpy.atoms - - cvxpy.atoms.affine - - cvxpy.atoms.elementwise - - cvxpy.cvxcore - - cvxpy.cvxcore.python - - cvxpy.constraints - - cvxpy.expressions - - cvxpy.expressions.constants - - cvxpy.interface - - cvxpy.interface.numpy_interface - - cvxpy.lin_ops - - cvxpy.problems - - cvxpy.reductions - - cvxpy.reductions.complex2real - - cvxpy.reductions.complex2real.atom_canonicalizers - - cvxpy.reductions.dcp2cone - - cvxpy.reductions.dcp2cone.atom_canonicalizers - - cvxpy.reductions.eliminate_pwl - - cvxpy.reductions.eliminate_pwl.atom_canonicalizers - - cvxpy.reductions.qp2quad_form - - cvxpy.reductions.qp2quad_form.atom_canonicalizers - - cvxpy.reductions.eliminate_pwl.atom_canonicalizers - - cvxpy.reductions.solvers - - cvxpy.reductions.solvers.conic_solvers - - cvxpy.reductions.solvers.qp_solvers - - cvxpy.reductions.solvers.lp_solvers - - cvxpy.tests - - cvxpy.transforms - - cvxpy.utilities - - cvxpy.cvxcore.python about: home: http://www.cvxpy.org/ diff --git a/recipe/patches/0001-fix-relative-import.patch b/recipe/patches/0001-fix-relative-import.patch new file mode 100644 index 0000000..5e030c1 --- /dev/null +++ b/recipe/patches/0001-fix-relative-import.patch @@ -0,0 +1,28 @@ +From 7d087d5781a5e9deaf3e4459376d93d5d700e4b0 Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Wed, 4 Jan 2023 15:17:01 +1100 +Subject: [PATCH 1/2] fix relative import + +--- + cvxpy/tests/test_perspective.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/cvxpy/tests/test_perspective.py b/cvxpy/tests/test_perspective.py +index 957c0683b..e7d841008 100644 +--- a/cvxpy/tests/test_perspective.py ++++ b/cvxpy/tests/test_perspective.py +@@ -18,10 +18,9 @@ import numpy as np + import pytest + + import cvxpy as cp ++from cvxpy.atoms.perspective import perspective + from cvxpy.constraints.exponential import ExpCone + +-from ..atoms.perspective import perspective +- + + def test_monotonicity(): + x = cp.Variable(nonneg=True) +-- +2.38.1.windows.1 + diff --git a/recipe/patches/0001-remove-pyproject.toml.patch b/recipe/patches/0001-remove-pyproject.toml.patch deleted file mode 100644 index 4b56f72..0000000 --- a/recipe/patches/0001-remove-pyproject.toml.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 1a6489133ab1822d133aac463a5bec6320cb472e Mon Sep 17 00:00:00 2001 -From: "H. Vetinari" -Date: Sun, 29 Mar 2020 17:50:48 +0200 -Subject: [PATCH] remove pyproject.toml - ---- - pyproject.toml | 26 -------------------------- - 1 file changed, 26 deletions(-) - delete mode 100644 pyproject.toml - -diff --git a/pyproject.toml b/pyproject.toml -deleted file mode 100644 -index ed0bbd1bb..000000000 ---- a/pyproject.toml -+++ /dev/null -@@ -1,26 +0,0 @@ --[tool.isort] --include_trailing_comma = true --use_parentheses = true --extend_skip = [ -- "cvxpy/__init__.py", -- "cvxpy/reductions/__init__.py", -- "cvxpy/reductions/dcp2cone/atom_canonicalizers/__init__.py" --] -- --[tool.pytest.ini_options] --testpaths = [ -- "cvxpy/tests/" --] -- --[build-system] --requires = [ -- "numpy>=1.15,<1.16; python_version=='3.7'", -- "numpy>=1.16,<1.17; python_version=='3.8'", -- "numpy>=1.19,<1.20; python_version=='3.9' and (platform_machine!='arm64' or platform_system!='Darwin')", -- "numpy>=1.21.4,<1.22; python_version=='3.9' and (platform_machine=='arm64' and platform_system=='Darwin')", -- "numpy>=1.21,<1.22; python_version=='3.10' and (platform_machine!='arm64' or platform_system!='Darwin')", -- "numpy>=1.21.4,<1.22; python_version=='3.10' and (platform_machine=='arm64' and platform_system=='Darwin')", -- "scipy >= 1.1.0", -- "setuptools>=40.8.0,<=64.0.2", -- "wheel" --] --- -2.38.1.windows.1 - diff --git a/recipe/patches/0002-do-not-use-__builtins__-as-dict.patch b/recipe/patches/0002-do-not-use-__builtins__-as-dict.patch new file mode 100644 index 0000000..978001f --- /dev/null +++ b/recipe/patches/0002-do-not-use-__builtins__-as-dict.patch @@ -0,0 +1,32 @@ +From eded1ed71728208e72528edae09f500d5ed10108 Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Wed, 4 Jan 2023 15:47:54 +1100 +Subject: [PATCH 2/2] do not use __builtins__ as dict + +--- + cvxpy/atoms/affine/sum.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/cvxpy/atoms/affine/sum.py b/cvxpy/atoms/affine/sum.py +index 380239af9..dfdba0ad4 100644 +--- a/cvxpy/atoms/affine/sum.py ++++ b/cvxpy/atoms/affine/sum.py +@@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + """ ++import builtins + from functools import wraps + from typing import List, Optional, Tuple + +@@ -109,6 +110,6 @@ def sum(expr, axis: Optional[int] = None, keepdims: bool = False): + """Wrapper for Sum class. + """ + if isinstance(expr, list): +- return __builtins__['sum'](expr) ++ return builtins.sum(expr) + else: + return Sum(expr, axis, keepdims) +-- +2.38.1.windows.1 +