Skip to content

Commit

Permalink
fix: define max version for pydicom to avoid breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sammaxwellxyz committed Oct 2, 2024
1 parent ebae1c6 commit 88d69b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 29 deletions.
8 changes: 4 additions & 4 deletions deid/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
26 changes: 1 addition & 25 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 88d69b4

Please sign in to comment.