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.
13
13
1 . ` data.csv ` : CSV file that is used by the Python script in ` src ` .
14
14
1 . ` requirements.txt ` : file listing the Python packages that are required by
15
15
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.
16
19
17
20
18
21
## How to create the applications?
@@ -32,8 +35,8 @@ interpreter or any modules. It is very useful to minimize dependencies.
32
35
src/sum_columns.py
33
36
(venv)$ pyinstaller \
34
37
--onefile \
35
- --add-data data.csv:data.csv \
38
+ --add-data data.csv:. \
36
39
--hidden-import funcs \
37
40
--collect-submodules funcs \
38
- src/sum_columns .py
41
+ src/prod_columns .py
39
42
```
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