From 3ba9c44d51fb8fa7d6642007f9ba955d6d4912fc Mon Sep 17 00:00:00 2001 From: Balakrishnan Balasubramanian Date: Tue, 13 Jun 2023 20:45:26 -0400 Subject: [PATCH] Working build --- .gitignore | 2 ++ Makefile | 13 +++++++++++++ mail4one/__main__.py | 3 +++ 3 files changed, 18 insertions(+) create mode 100644 mail4one/__main__.py 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()