Skip to content

Commit

Permalink
update dev notes on poetry and nutika
Browse files Browse the repository at this point in the history
  • Loading branch information
willwade committed Oct 1, 2024
1 parent ca01c3a commit ee9cec8
Showing 1 changed file with 3 additions and 61 deletions.
64 changes: 3 additions & 61 deletions Developer/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,58 +17,6 @@ is compatible with PowerShell and with bash, which is an alternative shell that
comes with Git for Windows, see below. Backslash is only compatible with
PowerShell.

# Getting started

Follow these instructions to get started as a developer for this project.

1. Install Python 3.10 for Windows.

You can download an installer from here for example.
[python.org/downloads/release/python-31011/](https://www.python.org/downloads/release/python-31011/)

There isn't a mediapipe for 3.12 Python, which is the latest at time of
writing.

2. Check the Python version is installed, on the path, and so on.

If you run this command you should get this output.

> python --version
Python 3.10.11

If you don't then restart Powershell or VSCode or VSCodium, or the whole
machine. Or check the PATH environment variable.

3. Create a Python virtual environment (venv).

Python venv is now the best practice for programs that require PIP modules.

Run commands like these to create the venv in a sub-directory also named
`venv`. The repository is already configured to ignore that sub-directory.

cd /path/where/you/cloned/FaceCommander
python -m venv venv

Going forwards, you will run Python like this.
`./venv/Scripts/python.exe` ... other command line options ...

4. Install the required PIP modules.

Run commands like these to update PIP and then install the required modules.

cd /path/where/you/cloned/FaceCommander
./venv/Scripts/python.exe -m pip install --upgrade pip
./venv/Scripts/python.exe -m pip install -r ./requirements.txt

5. Run the program.

Run commands like this.

cd /path/where/you/cloned/FaceCommander
./venv/Scripts/python.exe face_commander.py

The program should start. Its print logging should appear in the terminal or
Powershell session.

# Build instructions

Expand All @@ -77,9 +25,9 @@ of executable is sometimes referred to as a _frozen_ Python application.

To build the executable and installer you will need these tools.

- [PyInstaller](https://pyinstaller.org/) for the executable.
- [Nutika](https://nutika.ent/) for the executable.
It will already have been installed into the venv, see above, because it is
listed in the [requirements.txt](requirements.txt) file.
listed in the [pyrproject.toml](pyrproject.toml) file.

- [Inno Setup](https://jrsoftware.org/isinfo.php) for the installer.
It can be obtained from their
Expand All @@ -95,16 +43,10 @@ Proceed as follows.
Run commands like this

cd /path/where/you/cloned/FaceCommander
./venv/Scripts/pyinstaller.exe ./build-unsigned.spec
./build_executable.bat

That creates a `build/` and a `dist/` sub-directory.

Tip: If those sub-directories already exist you will be prompted whether to
delete them before proceeding. You can suppress the prompt by running a
command like this instead.

./venv/Scripts/pyinstaller.exe --noconfirm ./build-unsigned.spec

2. Test the executable.

The executable will be here.
Expand Down

0 comments on commit ee9cec8

Please sign in to comment.