From 012487122e5e3a0ff8021a05bec68699a7bbdcc8 Mon Sep 17 00:00:00 2001 From: mloubout Date: Thu, 11 Jul 2024 15:37:19 -0400 Subject: [PATCH] deps: fix sympy deps in setup --- .github/workflows/pythonpublish.yml | 3 ++- setup.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 1e912b87bc..3f1d05512d 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -16,7 +16,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine + pip install setuptools wheel twine==5.0.0 + - name: Build and publish env: TWINE_USERNAME: __token__ diff --git a/setup.py b/setup.py index aad34e64a5..852c2ee2a3 100644 --- a/setup.py +++ b/setup.py @@ -31,9 +31,9 @@ def numpy_compat(required): sympy_version = pkg_resources.get_distribution("sympy").version min_ver2 = pkg_resources.parse_version("1.12.1") if pkg_resources.parse_version(sympy_version) < min_ver2: - new_reqs.append(f"numpy>{numpy_lb},<2.0") + new_reqs.extend([f"numpy>{numpy_lb},<2.0", f"sympy=={sympy_version}"]) else: - new_reqs.append(f"numpy>=2.0,<{numpy_ub}") + new_reqs.extend([f"numpy>=2.0,<{numpy_ub}", f"sympy=={sympy_version}"]) except pkg_resources.DistributionNotFound: new_reqs.extend([f"sympy>=1.12.1,<{sympy_ub}", f"numpy>=2.0,<{numpy_ub}"])