From bc021e4b76e2d6ff53c6c8312b39ef180be04b4c Mon Sep 17 00:00:00 2001 From: Ella Wu <602725+ewu63@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:12:58 -0700 Subject: [PATCH] use packaging instead of pkg_resources (#412) --- .github/environment.yml | 1 + pyoptsparse/pySNOPT/pySNOPT.py | 2 +- setup.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/environment.yml b/.github/environment.yml index 65035f83..237cc786 100644 --- a/.github/environment.yml +++ b/.github/environment.yml @@ -10,6 +10,7 @@ dependencies: - pip - setuptools - build + - packaging # testing - parameterized - testflo diff --git a/pyoptsparse/pySNOPT/pySNOPT.py b/pyoptsparse/pySNOPT/pySNOPT.py index 1a39fb2b..5354f78e 100644 --- a/pyoptsparse/pySNOPT/pySNOPT.py +++ b/pyoptsparse/pySNOPT/pySNOPT.py @@ -15,7 +15,7 @@ from baseclasses.utils import CaseInsensitiveSet, writePickle import numpy as np from numpy import ndarray -from pkg_resources import parse_version +from packaging.version import parse as parse_version # Local modules from ..pyOpt_error import Error diff --git a/setup.py b/setup.py index 6866e167..205c1416 100644 --- a/setup.py +++ b/setup.py @@ -102,6 +102,7 @@ def copy_shared_libraries(): platforms=["Linux"], keywords="optimization", install_requires=[ + "packaging", "sqlitedict>=1.6", "numpy>=1.21,<2", "scipy>=1.7",