Skip to content

Commit

Permalink
Refactor dependency handling in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieHakim committed Jan 30, 2024
1 parent 713e07a commit 7c96969
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def read_requirements():

## Make different versions of dependencies
### Also pull out the version number from the requirements (specified in deps_all_dict values).
deps_core = [deps_all_dict[dep] for dep in [
deps_core = {dep: deps_all_dict[dep] for dep in [
'numpy',
'scipy',
'kornia',
Expand All @@ -66,9 +66,9 @@ def read_requirements():
'torchaudio',
'ipywidgets',
'eva-decord',
]]
]}

deps_advanced = [deps_all_dict[dep] for dep in [
deps_advanced = {dep: deps_all_dict[dep] for dep in [
'tables',
'opt-einsum',
# 'rolling-quantiles',
Expand All @@ -86,8 +86,10 @@ def read_requirements():
'jupyter',
'PyWavelets',
'mat73',
]]
]}

deps_core_latest = dict(zip(deps_core.keys(), deps_core.keys()))
deps_advanced_latest = dict(zip(deps_advanced.keys(), deps_advanced.keys()))

print({
'deps_all': deps_all,
Expand Down Expand Up @@ -125,6 +127,6 @@ def read_requirements():
extras_require={
'all': list(deps_all_dict.values()),
'all_latest': list(deps_all_latest.values()),
'core': deps_core,
'core': list(deps_core.values()),
},
)

0 comments on commit 7c96969

Please sign in to comment.