diff --git a/.gitignore b/.gitignore index 957f0bb..3c4308c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ *.swp __pycache__ dummy.py +build +mail4one.pyz diff --git a/Makefile b/Makefile index 75aed67..4f7fb85 100644 --- a/Makefile +++ b/Makefile @@ -5,3 +5,16 @@ shell: test: pipenv run python -m unittest mail4one/*test.py + +build: clean + pipenv run python -m pip install -r <(pipenv requirements ) --target build + cp -r mail4one/ build/ + pipenv run python -m zipapp \ + --output mail4one.pyz \ + --python "/usr/bin/env python3" \ + --main mail4one.server:main \ + --compress build + +clean: + rm -rf build + rm -rf mail4one.pyz diff --git a/mail4one/__main__.py b/mail4one/__main__.py new file mode 100644 index 0000000..bc40eef --- /dev/null +++ b/mail4one/__main__.py @@ -0,0 +1,3 @@ +from .server import main + +main()