Skip to content

Commit

Permalink
add installer script
Browse files Browse the repository at this point in the history
titusz committed May 8, 2022
1 parent 100cc4e commit 4b18fe9
Showing 3 changed files with 39 additions and 1 deletion.
35 changes: 35 additions & 0 deletions iscc_sdk/install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""Installer script for binary dependencies"""
import sys
from loguru import logger as log
from . import tools


def main():
log.add(sys.stdout)

tools.ipfs_install()
log.info(f"IPFS Version: {tools.ipfs_version_info()}")

tools.exiv2_install()
log.info(f"Exiv2 Version: {tools.exiv2_version_info()}")

tools.fpcalc_install()
log.info(f"FPCALC Version: {tools.fpcalc_version_info()}")

tools.ffprobe_install()
log.info(f"FFPROBE Version: {tools.ffprobe_version_info()}")

tools.ffmpeg_install()
log.info(f"FFMPEG Version: {tools.ffmpeg_version_info()}")

tools.java_install()
log.info(f"JAVA Version: {tools.java_version_info()}")

tools.tika_install()
log.info(f"TIKA Version: {tools.tika_version_info()}")

sys.exit(0)


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion iscc_sdk/tools.py
Original file line number Diff line number Diff line change
@@ -268,7 +268,7 @@ def exiv2_version_info(): # pragma: no cover
[exiv2_bin(), "--version"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
vi = r.stdout.decode(sys.stdout.encoding)
return vi
return vi.splitlines()[0]
except FileNotFoundError:
return "exiv2 not installed"

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -60,6 +60,9 @@ skip-string-normalization = false
line-length = 100
target-version = ['py37']

[tool.coverage.run]
omit = ["iscc_sdk/install.py"]

[tool.poe.tasks]
docs = { cmd = "poetry run python -m devtools.build_docs", help = "Copy README.md to /docs" }
black = { cmd = "poetry run black .", help = "Code style formating with black" }

0 comments on commit 4b18fe9

Please sign in to comment.