Skip to content

Commit

Permalink
get version information in real-time, since packages may be updated
Browse files Browse the repository at this point in the history
  • Loading branch information
shapiromatron committed Aug 14, 2024
1 parent c77a7bf commit 5bec451
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
5 changes: 0 additions & 5 deletions bmds_ui/desktop/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@ def render_template(template_text: str, context: dict) -> str:


def write_startup_script(template: str) -> str:
from pybmds import __version__ as pybmds_version

python_path = Path(sys.executable)
show_prerelease = get_installed_version().is_prerelease
return render_template(
Expand All @@ -183,9 +181,6 @@ def write_startup_script(template: str) -> str:
"prerelease_url": PRERELEASE_URL,
"show_prerelease": show_prerelease,
"python_path": python_path,
"python_version": platform.python_version(),
"bmds_ui_version": __version__,
"pybmds_version": pybmds_version,
},
)

Expand Down
13 changes: 9 additions & 4 deletions bmds_ui/desktop/templates/manager-bat.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,16 @@ goto :beginning
:diagnostics
echo:
echo Diagnostic Installation Information:
echo ------------------------------------
echo:
echo Python Version: {{ python_version }}
echo Python Path: {{ python_path }}
echo BMDS Desktop (bmds-ui) Version: {{ bmds_ui_version }}
echo pybmds Version: Version: {{ pybmds_version }}
echo Python Version:
"{{ python_path }}" --version -VV
echo:
echo Python Path:
echo {{ python_path }}
echo:
echo BMDS UI + pybmds Version:
"{{ python_path }}" -m pip show bmds-ui pybmds
echo:
pause
goto :beginning
Expand Down
12 changes: 8 additions & 4 deletions bmds_ui/desktop/templates/manager-sh.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@ echo
echo "Diagnostic Installation Information:"
echo "------------------------------------"
echo
echo "Python Version: {{ python_version }}"
echo "Python Path: {{ python_path }}"
echo "BMDS Desktop (bmds-ui) Version: {{ bmds_ui_version }}"
echo "pybmds Version: Version: {{ pybmds_version }}"
echo "Python Version:"
"{{ python_path }}" --version -VV
echo
echo "Python Path:"
echo "{{ python_path }}"
echo
echo "BMDS UI + pybmds Version:"
"{{ python_path }}" -m pip show bmds-ui pybmds
echo
pause
write_instructions
Expand Down

0 comments on commit 5bec451

Please sign in to comment.