Template for a stand-alone python tool or script
Replace this section with "About project name
"
This template sets up a python project using poetry to manage dependencies, pytest for unit testing, pyinstaller for building an executable, and wix for creating a windows installer for distribution.
- Install the latest version of python
- MacOS:
brew install python
- Windows:
winget install Python.Python.3.11
- Ubuntu:
sudo apt install python
- MacOS:
- Install poetry
- Install project dependencies:
poetry install
- Activate project virtual environment:
poetry shell
- Run the example program
hello Bob
pytest
python tools/app_build.py
- Install build dependencies
- Windows:
winget install WixToolset.AdditionalTools
- Windows:
- Build the installer
python tools/installer_build.py
Modify the getting started section for your specific application. Update the rest of the template mostly by searching for "hello" and replacing it with what's appropriate for your application.
In `tools/installer_build.py`, replace the `uuid.uuid4()` calls with a fixed [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) ([GUID](https://learn.microsoft.com/en-us/dotnet/api/system.guid?view=net-7.0)).
Change this:
f'-dupgrade_code="{uuid.uuid4()}"', # TODO: Hard code a permanent uuid
f'-dpath_code="{uuid.uuid4()}"', # TODO: Hard code a permanent uuid
Into this:
'-dupgrade_code="12345678-90ab-cdef-1234-567890abcdef"',
'-dpath_code="12345678-90ab-cdef-1234-567890abcdef"',
Most people and organisations have figured out hot to implement the features customers are requesting. But often "doing things the right way" is deferred until it becomes nearly impossible to ever do things the "right way".
I want to make it easy to start a new project with tests, documentation, installers, etc. Everything that makes it easier to get those features out the door and delivered relatively stress free.
I don't think this template does that for a oython project, yet, but it puts a few things in place and will make it easier for people I know to start a new python project and deliver it to co-workers, customers, freinds, and family.
Hope it helps.
Create issues or pull requests if you think there's a way to improve it.