diff --git a/deploy-chatmail/src/deploy_chatmail/__init__.py b/deploy-chatmail/src/deploy_chatmail/__init__.py index 16b99523..15db8bc1 100644 --- a/deploy-chatmail/src/deploy_chatmail/__init__.py +++ b/deploy-chatmail/src/deploy_chatmail/__init__.py @@ -25,7 +25,7 @@ def _install_chatmaild() -> None: apt.packages( name="apt install python3-aiosmtpd", - packages="python3-aiosmtpd", + packages=["python3-aiosmtpd", "python3-pip"], ) # --no-deps because aiosmtplib is installed with `apt`. @@ -35,6 +35,7 @@ def _install_chatmaild() -> None: ) files.put( + name="upload doveauth-dictproxy.service", src=importlib.resources.files("chatmaild") .joinpath("doveauth-dictproxy.service") .open("rb"), @@ -52,12 +53,8 @@ def _install_chatmaild() -> None: daemon_reload=True, ) - server.shell( - name="install local doveauth build with pip", - commands=[f"pip install --break-system-packages --no-deps {remote_path}"], - ) - files.put( + name="upload filtermail.service", src=importlib.resources.files("chatmaild") .joinpath("filtermail.service") .open("rb"), @@ -207,10 +204,6 @@ def deploy_chatmail(mail_domain: str, mail_server: str, dkim_selector: str) -> N ], ) - apt.packages( - name="apt install python3-pip", - packages="python3-pip", - ) _install_chatmaild() dovecot_need_restart = _configure_dovecot(mail_server) postfix_need_restart = _configure_postfix(mail_domain) diff --git a/scripts/init.sh b/scripts/init.sh index f68e1243..d0553f5e 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -14,3 +14,4 @@ online-tests/venv/bin/pip install pytest pytest-timeout pdbpp deltachat python3 -m venv venv venv/bin/pip install build +venv/bin/pip install 'setuptools>=68' diff --git a/scripts/remote-deploy.sh b/scripts/remote-deploy.sh index 55d44378..5bd1ed91 100755 --- a/scripts/remote-deploy.sh +++ b/scripts/remote-deploy.sh @@ -5,4 +5,4 @@ set -e : ${CHATMAIL_SSH_HOST:=$CHATMAIL_DOMAIN} rsync -avz . "root@$CHATMAIL_SSH_HOST:/root/chatmail" --exclude='/.git' --filter="dir-merge,- .gitignore" -ssh "root@$CHATMAIL_SSH_HOST" "cd /root/chatmail; apt install -y python3-venv; python3 -m venv venv; venv/bin/pip install pyinfra build; venv/bin/python3 -m build -n --sdist doveauth --outdir dist; venv/bin/python3 -m build -n --sdist filtermail --outdir dist; venv/bin/pip install -e ./deploy-chatmail -e ./doveauth; export CHATMAIL_DOMAIN=$CHATMAIL_DOMAIN; venv/bin/pyinfra @local deploy.py" +ssh "root@$CHATMAIL_SSH_HOST" "cd /root/chatmail; apt install -y python3-venv; python3 -m venv venv; venv/bin/pip install pyinfra build; venv/bin/python3 -m build -n --sdist chatmaild --outdir dist; venv/bin/pip install -e ./deploy-chatmail -e ./chatmaild; export CHATMAIL_DOMAIN=$CHATMAIL_DOMAIN; venv/bin/pyinfra @local deploy.py"