Skip to content

Commit a18d94e

Browse files
authored
add more docs and freeze support for windows (#4)
1 parent 02ea5f8 commit a18d94e

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ $(VENV_ACTIVATE): requirements.txt
2323
# once that is remedied, we can exclude boto3 and botocore modules again
2424
dist/localstack/localstack: main.py
2525
$(VENV_RUN); pyinstaller main.py \
26-
-n localstack \
26+
$(PYINSTALLER_ARGS) -n localstack \
2727
--exclude-module moto \
2828
--hidden-import docker
2929
rm -rf dist/localstack/botocore/data

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,32 @@ localstack-packaged-cli
33

44
Repository for the build config that packages the localstack cli into a standalone binary.
55

6-
## Make a distribution
6+
## Build
77

8+
### python3-dev
9+
10+
You need Python developer version libraries in your path to be able to build the distribution.
11+
12+
For most of us who use pyenv, this is done with
13+
14+
```bash
15+
pyenv install 3.8-dev
16+
pyenv local 3.8-dev
17+
python --version
818
```
19+
20+
should print something like `Python 3.8.15+`.
21+
22+
### make all
23+
24+
Just run
25+
26+
```bash
927
make clean all
1028
```
29+
30+
in `dist/localstack` you should now find the binary assets.
31+
32+
If you want a single binary you can run `PYINSTALLER_ARGS=-F make clean all`.
33+
This will create a single binary `dist/localstack`.
34+
The single binary has a slower startup time than the binary distribution.

main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import os
2+
from multiprocessing import freeze_support
3+
freeze_support()
4+
25
os.environ["SKIP_PATCH_MOTO_ACCOUNT_ID"] = "1"
36
from localstack.cli import main
47

0 commit comments

Comments
 (0)