Skip to content

Commit

Permalink
Merge pull request #75 from regro-cf-autotick-bot/1.3.0_hf95e54
Browse files Browse the repository at this point in the history
cvxpy v1.3.0
  • Loading branch information
h-vetinari authored Jan 6, 2023
2 parents b2ea895 + fbfda3d commit 42ce0b6
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 79 deletions.
45 changes: 11 additions & 34 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{% set name = "cvxpy" %}
{% set version = "1.2.3" %}
{% set version = "1.3.0" %}

package:
name: cvxpy-split
version: {{ version }}

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
Expand Down Expand Up @@ -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]
Expand All @@ -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/
Expand Down
28 changes: 28 additions & 0 deletions recipe/patches/0001-fix-relative-import.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 7d087d5781a5e9deaf3e4459376d93d5d700e4b0 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
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

45 changes: 0 additions & 45 deletions recipe/patches/0001-remove-pyproject.toml.patch

This file was deleted.

32 changes: 32 additions & 0 deletions recipe/patches/0002-do-not-use-__builtins__-as-dict.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From eded1ed71728208e72528edae09f500d5ed10108 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <[email protected]>
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

0 comments on commit 42ce0b6

Please sign in to comment.