File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ interpreter or any modules. It is very useful to minimize dependencies.
13131 . ` data.csv ` : CSV file that is used by the Python script in ` src ` .
14141 . ` requirements.txt ` : file listing the Python packages that are required by
1515 the Python script in ` src ` .
16+ 1 . ` build_apps.sh ` : Bash script that creates a virtual environment, installs
17+ the required packages, and creates a standalone application using
18+ PyInstaller.
1619
1720
1821## How to create the applications?
@@ -32,8 +35,8 @@ interpreter or any modules. It is very useful to minimize dependencies.
3235 src/sum_columns.py
3336 (venv)$ pyinstaller \
3437 --onefile \
35- --add-data data.csv:data.csv \
38+ --add-data data.csv:. \
3639 --hidden-import funcs \
3740 --collect-submodules funcs \
38- src/sum_columns .py
41+ src/prod_columns .py
3942 ```
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # create a virtual environment and install the dependencies
4+ python -m venv build_venv
5+ source build_venv/bin/activate
6+ pip install -r requirements.txt
7+
8+ # build the apps
9+ pyinstaller \
10+ --onefile \
11+ --hidden-import funcs \
12+ --collect-submodules funcs \
13+ src/sum_columns.py
14+ pyinstaller \
15+ --onefile \
16+ --add-data data.csv:. \
17+ --hidden-import funcs \
18+ --collect-submodules funcs \
19+ src/prod_columns.py
You can’t perform that action at this time.
0 commit comments