diff --git a/deploy-chatmail/pyproject.toml b/cmdeploy/pyproject.toml similarity index 91% rename from deploy-chatmail/pyproject.toml rename to cmdeploy/pyproject.toml index b6eadb4c..69d34638 100644 --- a/deploy-chatmail/pyproject.toml +++ b/cmdeploy/pyproject.toml @@ -22,7 +22,7 @@ dependencies = [ ] [project.scripts] -cmdeploy = "deploy_chatmail.cmdeploy:main" +cmdeploy = "cmdeploy.cmdeploy:main" [project.entry-points.pytest11] "chatmaild.testplugin" = "chatmaild.tests.plugin" diff --git a/deploy-chatmail/src/deploy_chatmail/__init__.py b/cmdeploy/src/cmdeploy/__init__.py similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/__init__.py rename to cmdeploy/src/cmdeploy/__init__.py diff --git a/deploy-chatmail/src/deploy_chatmail/acmetool/__init__.py b/cmdeploy/src/cmdeploy/acmetool/__init__.py similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/acmetool/__init__.py rename to cmdeploy/src/cmdeploy/acmetool/__init__.py diff --git a/deploy-chatmail/src/deploy_chatmail/acmetool/acmetool.cron b/cmdeploy/src/cmdeploy/acmetool/acmetool.cron similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/acmetool/acmetool.cron rename to cmdeploy/src/cmdeploy/acmetool/acmetool.cron diff --git a/deploy-chatmail/src/deploy_chatmail/acmetool/acmetool.hook b/cmdeploy/src/cmdeploy/acmetool/acmetool.hook similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/acmetool/acmetool.hook rename to cmdeploy/src/cmdeploy/acmetool/acmetool.hook diff --git a/deploy-chatmail/src/deploy_chatmail/acmetool/response-file.yaml.j2 b/cmdeploy/src/cmdeploy/acmetool/response-file.yaml.j2 similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/acmetool/response-file.yaml.j2 rename to cmdeploy/src/cmdeploy/acmetool/response-file.yaml.j2 diff --git a/deploy-chatmail/src/deploy_chatmail/acmetool/target.yaml.j2 b/cmdeploy/src/cmdeploy/acmetool/target.yaml.j2 similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/acmetool/target.yaml.j2 rename to cmdeploy/src/cmdeploy/acmetool/target.yaml.j2 diff --git a/deploy-chatmail/src/deploy_chatmail/chatmail.zone.f b/cmdeploy/src/cmdeploy/chatmail.zone.f similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/chatmail.zone.f rename to cmdeploy/src/cmdeploy/chatmail.zone.f diff --git a/deploy-chatmail/src/deploy_chatmail/cmdeploy.py b/cmdeploy/src/cmdeploy/cmdeploy.py similarity index 96% rename from deploy-chatmail/src/deploy_chatmail/cmdeploy.py rename to cmdeploy/src/cmdeploy/cmdeploy.py index 8588fea0..c862d90d 100644 --- a/deploy-chatmail/src/deploy_chatmail/cmdeploy.py +++ b/cmdeploy/src/cmdeploy/cmdeploy.py @@ -53,9 +53,9 @@ def run_cmd(args, out): env = os.environ.copy() env["CHATMAIL_DOMAIN"] = args.config.mail_domain - deploypy = "deploy-chatmail/src/deploy_chatmail/deploy.py" + deploy_path = "cmdeploy/src/cmdeploy/deploy.py" pyinf = "pyinfra --dry" if args.dry_run else "pyinfra" - cmd = f"{pyinf} --ssh-user root {args.config.mail_domain} {deploypy}" + cmd = f"{pyinf} --ssh-user root {args.config.mail_domain} {deploy_path}" out.check_call(cmd, env=env) @@ -148,9 +148,9 @@ def fmt_cmd(args, out): """Run formattting fixes (fuff and black) on all chatmail source code.""" chatmaild = importlib.resources.files("chatmaild") - deploy_chatmail = importlib.resources.files("deploy_chatmail") - tests = deploy_chatmail.joinpath("../../../tests") - sources = list(str(x) for x in [chatmaild, deploy_chatmail, tests]) + cmdeploy = importlib.resources.files("cmdeploy") + tests = cmdeploy.joinpath("../../../tests") + sources = list(str(x) for x in [chatmaild, cmdeploy, tests]) black_args = [shutil.which("black")] ruff_args = [shutil.which("ruff")] diff --git a/deploy-chatmail/src/deploy_chatmail/data/delta-chat-bw.png b/cmdeploy/src/cmdeploy/data/delta-chat-bw.png similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/data/delta-chat-bw.png rename to cmdeploy/src/cmdeploy/data/delta-chat-bw.png diff --git a/deploy-chatmail/src/deploy_chatmail/data/opensans-regular.ttf b/cmdeploy/src/cmdeploy/data/opensans-regular.ttf similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/data/opensans-regular.ttf rename to cmdeploy/src/cmdeploy/data/opensans-regular.ttf diff --git a/deploy-chatmail/src/deploy_chatmail/deploy.py b/cmdeploy/src/cmdeploy/deploy.py similarity index 89% rename from deploy-chatmail/src/deploy_chatmail/deploy.py rename to cmdeploy/src/cmdeploy/deploy.py index b2a461ae..dfd44216 100644 --- a/deploy-chatmail/src/deploy_chatmail/deploy.py +++ b/cmdeploy/src/cmdeploy/deploy.py @@ -1,6 +1,6 @@ import os import pyinfra -from deploy_chatmail import deploy_chatmail +from cmdeploy import deploy_chatmail def main(): diff --git a/deploy-chatmail/src/deploy_chatmail/dovecot/auth.conf b/cmdeploy/src/cmdeploy/dovecot/auth.conf similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/dovecot/auth.conf rename to cmdeploy/src/cmdeploy/dovecot/auth.conf diff --git a/deploy-chatmail/src/deploy_chatmail/dovecot/dovecot.conf.j2 b/cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/dovecot/dovecot.conf.j2 rename to cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 diff --git a/deploy-chatmail/src/deploy_chatmail/dovecot/expunge.cron b/cmdeploy/src/cmdeploy/dovecot/expunge.cron similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/dovecot/expunge.cron rename to cmdeploy/src/cmdeploy/dovecot/expunge.cron diff --git a/deploy-chatmail/src/deploy_chatmail/genqr.py b/cmdeploy/src/cmdeploy/genqr.py similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/genqr.py rename to cmdeploy/src/cmdeploy/genqr.py diff --git a/deploy-chatmail/src/deploy_chatmail/journald.conf b/cmdeploy/src/cmdeploy/journald.conf similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/journald.conf rename to cmdeploy/src/cmdeploy/journald.conf diff --git a/deploy-chatmail/src/deploy_chatmail/nginx/autoconfig.xml.j2 b/cmdeploy/src/cmdeploy/nginx/autoconfig.xml.j2 similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/nginx/autoconfig.xml.j2 rename to cmdeploy/src/cmdeploy/nginx/autoconfig.xml.j2 diff --git a/deploy-chatmail/src/deploy_chatmail/nginx/mta-sts.txt.j2 b/cmdeploy/src/cmdeploy/nginx/mta-sts.txt.j2 similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/nginx/mta-sts.txt.j2 rename to cmdeploy/src/cmdeploy/nginx/mta-sts.txt.j2 diff --git a/deploy-chatmail/src/deploy_chatmail/nginx/nginx.conf.j2 b/cmdeploy/src/cmdeploy/nginx/nginx.conf.j2 similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/nginx/nginx.conf.j2 rename to cmdeploy/src/cmdeploy/nginx/nginx.conf.j2 diff --git a/deploy-chatmail/src/deploy_chatmail/opendkim/KeyTable b/cmdeploy/src/cmdeploy/opendkim/KeyTable similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/opendkim/KeyTable rename to cmdeploy/src/cmdeploy/opendkim/KeyTable diff --git a/deploy-chatmail/src/deploy_chatmail/opendkim/SigningTable b/cmdeploy/src/cmdeploy/opendkim/SigningTable similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/opendkim/SigningTable rename to cmdeploy/src/cmdeploy/opendkim/SigningTable diff --git a/deploy-chatmail/src/deploy_chatmail/opendkim/opendkim.conf b/cmdeploy/src/cmdeploy/opendkim/opendkim.conf similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/opendkim/opendkim.conf rename to cmdeploy/src/cmdeploy/opendkim/opendkim.conf diff --git a/deploy-chatmail/src/deploy_chatmail/postfix/main.cf.j2 b/cmdeploy/src/cmdeploy/postfix/main.cf.j2 similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/postfix/main.cf.j2 rename to cmdeploy/src/cmdeploy/postfix/main.cf.j2 diff --git a/deploy-chatmail/src/deploy_chatmail/postfix/master.cf.j2 b/cmdeploy/src/cmdeploy/postfix/master.cf.j2 similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/postfix/master.cf.j2 rename to cmdeploy/src/cmdeploy/postfix/master.cf.j2 diff --git a/deploy-chatmail/src/deploy_chatmail/postfix/mta-sts-daemon.service b/cmdeploy/src/cmdeploy/postfix/mta-sts-daemon.service similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/postfix/mta-sts-daemon.service rename to cmdeploy/src/cmdeploy/postfix/mta-sts-daemon.service diff --git a/deploy-chatmail/src/deploy_chatmail/postfix/mta-sts-daemon.yml b/cmdeploy/src/cmdeploy/postfix/mta-sts-daemon.yml similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/postfix/mta-sts-daemon.yml rename to cmdeploy/src/cmdeploy/postfix/mta-sts-daemon.yml diff --git a/deploy-chatmail/src/deploy_chatmail/www.py b/cmdeploy/src/cmdeploy/www.py similarity index 100% rename from deploy-chatmail/src/deploy_chatmail/www.py rename to cmdeploy/src/cmdeploy/www.py diff --git a/scripts/initenv.sh b/scripts/initenv.sh index 9ee41050..7e96937c 100755 --- a/scripts/initenv.sh +++ b/scripts/initenv.sh @@ -2,8 +2,8 @@ set -e python3 -m venv venv -venv/bin/pip install -e deploy-chatmail venv/bin/pip install -e chatmaild +venv/bin/pip install -e cmdeploy source venv/bin/activate echo activated 'venv' python virtualenv environment containing "cmdeploy" tool diff --git a/tests/online/test_0_qr.py b/tests/online/test_0_qr.py index 5c1a5865..f0153810 100644 --- a/tests/online/test_0_qr.py +++ b/tests/online/test_0_qr.py @@ -1,4 +1,4 @@ -from deploy_chatmail.genqr import gen_qr_png_data +from cmdeploy.genqr import gen_qr_png_data def test_gen_qr_png_data(maildomain): diff --git a/tests/test_cmdeploy.py b/tests/test_cmdeploy.py index 107fa66a..9c59a3f6 100644 --- a/tests/test_cmdeploy.py +++ b/tests/test_cmdeploy.py @@ -1,7 +1,7 @@ import os import pytest -from deploy_chatmail.cmdeploy import get_parser, main +from cmdeploy.cmdeploy import get_parser, main from chatmaild.config import read_config diff --git a/tests/test_helpers.py b/tests/test_helpers.py index ff5d679d..58b3886b 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -1,10 +1,10 @@ import importlib.resources -from deploy_chatmail.www import build_webpages +from cmdeploy.www import build_webpages def test_build_webpages(tmp_path, make_config): - pkgroot = importlib.resources.files("deploy_chatmail") + pkgroot = importlib.resources.files("cmdeploy") src_dir = pkgroot.joinpath("../../../www/src").resolve() assert src_dir.exists(), src_dir config = make_config("chat.example.org")