Skip to content

Commit

Permalink
Add examples of --python-version to README
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharsadhwani authored May 28, 2024
1 parent b570b6b commit e2f1d54
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pip install packaged
## Usage

```bash
packaged <output_path> <build_command> <startup_command> [<source_directory>]
packaged <output_path> <build_command> <startup_command> [<source_directory>] [--python-version=3.12]
```

Such as:
Expand All @@ -27,6 +27,14 @@ Such as:
packaged my_project.sh 'pip install .' 'python -m your_package' path/to/project
```

This will package Python 3.12 with your application by default.

To specify a different Python version, use the `--python-version` flag, like so:

```bash
packaged my_project.sh 'pip install .' 'python -m your_package' path/to/project --python-version=3.10
```

## Examples

All examples below create a self contained executable. You can send the produced
Expand All @@ -38,12 +46,12 @@ You can also find the pre-built binaries on the [Releases page](https://github.c
### Mandelbrot (`numpy`, `matplotlib`, GUI)

```bash
packaged ./mandelbrot.sh 'pip install -r requirements.txt' 'python mandelbrot.py' ./example/mandelbrot
packaged ./mandelbrot.sh 'pip install -r requirements.txt' 'python mandelbrot.py' ./example/mandelbrot --python-version=3.10
```

This produces a `./mandelbrot.sh` binary with:

- Python 3.12
- Python 3.10
- `matplotlib`
- `numba`
- `llvmlite`
Expand Down

0 comments on commit e2f1d54

Please sign in to comment.