Skip to content

ProgramVer — Installation

Requirements

Python 3.x with Tkinter
Dependencies None at runtime

Tkinter is bundled on Windows and macOS; on Linux install python3-tk (Debian, Ubuntu) or python3-tkinter (Fedora).

From source

git clone https://github.com/willtheorangeguy/ProgramVer
cd ProgramVer
python main.py

You will need to supply imgs/dfdlogo.gif, LICENSE.txt, and EULA.txt — see Quickstart.

Resource paths are resolved against main.py's own location via get_resource_path, so the working directory does not matter.

As a component in your own project

The intended use. Copy main.py into your project and import it:

from main import ProgramVer
ProgramVer()

Copy imgs/ alongside it, or repoint the image paths.

Earlier documentation told you to copy ProgramVer.py and from ProgramVer import *. There is no ProgramVer.py in this repository — the module is main.py, and the function inside it is ProgramVer. Renaming the file to programver.py on the way in is reasonable, and then the old instruction becomes true.

From PyPI

pip install programver
programver

Two caveats. The console script points at main:ProgramVer, which does call mainloop(), so it would work — if the image were present. And the packaging declares imgs/ as the package root (package_dir={"": "imgs"}, find_packages(where="imgs")) where there are no Python packages at all; only py_modules=["main"] ships anything. See internal/known-issues.md.

Windows executable

Attached to releases, built with PyInstaller. Note that a one-file build unpacks to a temporary directory — get_resource_path resolves against __file__, which PyInstaller sets appropriately, so this should hold.

Verify

python main.py

The window appears with your logo. A TclError about dfdlogo.gif means the image is still missing; see Troubleshooting.

Tests

pip install -r requirements.txt
pytest