Skip to content

Commit

Permalink
#391 define here in read, add verbose logs
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Apr 18, 2021
1 parent 7991dd3 commit 4ff644f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions hook/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@


def read(*parts):
here = os.path.abspath(os.path.dirname(__file__))
print ('VERBOSE: Reading {}'.format(os.path.join(here, *parts)))
with codecs.open(os.path.join(here, *parts), 'r') as fp:
return fp.read()


def find_version(*file_paths):
version_file = read(*file_paths)
print ('VERBOSE: version_file is {}'.format(version_file))
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)

if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
Expand Down
2 changes: 1 addition & 1 deletion hook/zmes_hook_helpers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "6.1.22"
VERSION = __version__
VERSION=__version__
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ install_hook() {
echo "__version__ = \"${ZM_DETECT_VERSION}\"" > hook/zmes_hook_helpers/__init__.py
echo "VERSION=__version__" >> hook/zmes_hook_helpers/__init__.py

${PY_SUDO} ${PIP} install hook/ && print_opencv_message || print_error "python hooks setup failed"
${PY_SUDO} ${PIP} -v install hook/ && print_opencv_message || print_error "python hooks setup failed"

echo "Installing package deps..."
echo "Installing gifsicle, if needed..."
Expand Down

0 comments on commit 4ff644f

Please sign in to comment.