2023-06-28 16:54:50 -04:00
|
|
|
# Needs python3 >= 3.9, sed, git for build
|
|
|
|
build: clean
|
2023-06-24 20:12:20 -04:00
|
|
|
python3 -m pip install -r requirements.txt --no-compile --target build
|
2023-06-13 20:45:26 -04:00
|
|
|
cp -r mail4one/ build/
|
2023-06-23 21:30:31 -04:00
|
|
|
sed -i "s/DEVELOMENT/$(shell scripts/get_version.sh)/" build/mail4one/version.py
|
2023-06-24 20:12:20 -04:00
|
|
|
rm -rf build/mail4one/__pycache__
|
2023-06-14 12:00:23 -04:00
|
|
|
rm -rf build/*.dist-info
|
2023-06-14 11:00:09 -04:00
|
|
|
python3 -m zipapp \
|
2023-06-13 20:45:26 -04:00
|
|
|
--output mail4one.pyz \
|
|
|
|
--python "/usr/bin/env python3" \
|
|
|
|
--main mail4one.server:main \
|
|
|
|
--compress build
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf build
|
|
|
|
rm -rf mail4one.pyz
|
2023-06-26 17:20:50 -04:00
|
|
|
|
2023-06-28 16:54:50 -04:00
|
|
|
docker-tests:
|
|
|
|
docker run --pull=always -v `pwd`:/app -w /app --rm -it python:3.11-alpine sh runtests.sh
|
|
|
|
docker run --pull=always -v `pwd`:/app -w /app --rm -it python:3.10-alpine sh runtests.sh
|
|
|
|
docker run --pull=always -v `pwd`:/app -w /app --rm -it python:3.11 sh runtests.sh
|
|
|
|
docker run --pull=always -v `pwd`:/app -w /app --rm -it python:3.10 sh runtests.sh
|
|
|
|
docker run --pull=always -v `pwd`:/app -w /app --rm -it python:3.9 sh runtests.sh
|
|
|
|
|
|
|
|
# ============================================================================
|
|
|
|
|
|
|
|
requirements.txt: Pipfile.lock
|
|
|
|
pipenv requirements > requirements.txt
|
|
|
|
|
2023-06-26 17:20:50 -04:00
|
|
|
format:
|
|
|
|
black mail4one/*py
|
2023-06-28 16:54:50 -04:00
|
|
|
|
|
|
|
build-dev: requirements.txt build
|
|
|
|
|
|
|
|
setup:
|
|
|
|
pipenv install
|
|
|
|
|
|
|
|
cleanup:
|
|
|
|
pipenv --rm
|
|
|
|
|
|
|
|
shell:
|
|
|
|
MYPYPATH=`pipenv --venv`/lib/python3.11/site-packages pipenv shell
|
|
|
|
|
|
|
|
test:
|
|
|
|
pipenv run python -m unittest discover
|