From 88d69b4b019bcce2db90fe5541a7e12f24f60a1d Mon Sep 17 00:00:00 2001 From: Sam Maxwell Date: Tue, 1 Oct 2024 21:54:10 +0100 Subject: [PATCH] fix: define max version for pydicom to avoid breaking changes --- deid/version.py | 8 ++++---- setup.py | 26 +------------------------- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/deid/version.py b/deid/version.py index 473a128..20bfdb1 100644 --- a/deid/version.py +++ b/deid/version.py @@ -12,8 +12,8 @@ LICENSE = "LICENSE" INSTALL_REQUIRES = ( - ("matplotlib", {"min_version": None}), - ("numpy", {"min_version": "1.20"}), - ("pydicom", {"min_version": "2.2.2"}), - ("python-dateutil", {"min_version": None}), + "matplotlib", + "numpy>=1.20", + "pydicom>=2.2.2,<3.0.0", + "python-dateutil", ) diff --git a/setup.py b/setup.py index e698363..5d21d12 100644 --- a/setup.py +++ b/setup.py @@ -30,31 +30,7 @@ def get_requirements(lookup=None): if lookup is None: lookup = get_lookup() - install_requires = [] - for module in lookup["INSTALL_REQUIRES"]: - module_name = module[0] - module_meta = module[1] - - # Install exact version - if "exact_version" in module_meta: - dependency = "%s==%s" % (module_name, module_meta["exact_version"]) - - # Install min version - elif "min_version" in module_meta: - if module_meta["min_version"] is None: - dependency = module_name - else: - dependency = "%s>=%s" % (module_name, module_meta["min_version"]) - - # Install min version - elif "max_version" in module_meta: - if module_meta["max_version"] is None: - dependency = module_name - else: - dependency = "%s<=%s" % (module_name, module_meta["max_version"]) - - install_requires.append(dependency) - return install_requires + return lookup["INSTALL_REQUIRES"] # Make sure everything is relative to setup.py