README.md
1# Python Distributables
2Setup and usage instructions for Pigweed Python distributables.
3
4## Prerequisites
5Python distributables require Python 3.10 or later.
6
7## Setup
8Run the included setup script found inside the unzipped directory. The setup
9script will create a virtual environment called `python-venv`.
10
11##### Linux / MacOS
12```bash
13setup.sh
14```
15
16Alternatively, the Linux/MacOS version of the setup script also allows
17installation over an existing venv:
18
19```bash
20setup.sh <PATH_TO_EXISTING_VENV>
21```
22
23##### Windows
24```
25setup.bat
26```
27
28##### Constraints File
29Both the Linux/MacOS and Windows versions of the setup script support the use
30of a constraints file. If a file named `constraints.txt` is present in the same
31directory as the setup script, it will automatically be used during setup to
32constrain the versions of any Python packages that get installed (see the
33official
34[pip documentation](https://pip.pypa.io/en/stable/user_guide/#constraints-files)
35for details).
36
37
38## Usage
39Once setup is complete, the Python tools can be invoked as runnable modules:
40
41Linux/MacOS:
42```bash
43python-venv/bin/python -m <MODULE_NAME> [OPTIONS]
44```
45
46Windows:
47```
48python-venv\Scripts\python -m <MODULE_NAME> [OPTIONS]
49```
50