Skip to content

Commit

Permalink
Add ability to install all conditional dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Mar 19, 2021
1 parent 0801ed9 commit 3fa5e70
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
from setuptools import setup, find_packages

# Define Dependencies for Extra Requires
conditional_dependencies = {
"dev":[
"pylint"
],
"docs": [
"mkdocs",
"mkdocs-material",
"mkautodoc"
],
}

def get_all_dependencies():
"""Returns a single array of all dependencies."""
dependencies = []
for condition in conditional_dependencies.keys():
dependencies += conditional_dependencies[condition]
return dependencies

setuptools.setup(
name="webqueue2_api",
version="0.9.1",
Expand All @@ -18,13 +37,8 @@
"python-ldap @ git+https://github.itap.purdue.edu/ECN/python-ldap/@python-ldap-3.3.1",
],
extras_require={
"dev": [
"pylint"
],
"docs": [
"mkdocs",
"mkdocs-material",
"mkautodoc"
]
"dev": conditional_dependencies["dev"],
"docs": conditional_dependencies["docs"],
"all": get_all_dependencies()
}
)

0 comments on commit 3fa5e70

Please sign in to comment.