Unable to deploy chatmail

As to deltachat/chatmail: chatmail service deployment scripts and docs (github.com)

chatmail should be easy to setup. Too bad, the deployment already fails in step 1, after invoking “scripts/initenv.sh”

ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /tmp/chatmail/chatmaild
(A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.)

How to proceed?


I created a virtual environment by this very first step by issueing these commands…

virtualenv /root/chatmail
cd /root/chatmail

it seems your python, pip, and/or setuptools version are too old. I’m running python 3.10, pip 22.0.2, and setuptools 69.0.2, with those it works.

as a workaround, you can also edit scripts/initenv.sh and remove -e from the venv/bin/pip install commands.

Does it work if you replace python3 -m venv venv with python3 -m venv --upgrade-deps venv in scripts/initenv.sh? This should upgrade pip and setuptools.

Well, this did not help :unamused:

Yes, this was successful! Thank you, :grinning:

by the way, this is a Debian 11 installation with the usual distribution tools (repos), including python 3.9

Trouble continues… :unamused:

Running “scripts/cmdeploy init chat.xy-space.de” yields

Traceback (most recent call last):
  File "/usr/local/chatmail/chatmail/venv/bin/cmdeploy", line 5, in <module>
    from cmdeploy.cmdeploy import main
  File "/usr/local/chatmail/chatmail/cmdeploy/src/cmdeploy/cmdeploy.py", line 17, in <module>
    from cmdeploy.dns import show_dns, check_necessary_dns
  File "/usr/local/chatmail/chatmail/cmdeploy/src/cmdeploy/dns.py", line 9, in <module>
    class DNS:
  File "/usr/local/chatmail/chatmail/cmdeploy/src/cmdeploy/dns.py", line 37, in DNS
    def get(self, typ: str, domain: str) -> str | None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

“cmdeploy” in general does not work…

Other commands such as

“scripts/cmdeploy status”

do not work either

Oh, these union types are supported since Python 3.10 only.
We need to replace with Optional[str] and generally test on at least Python 3.9.

I filed issues Upgrade deps in `scripts/initenv.sh` · Issue #192 · deltachat/chatmail · GitHub and Python 3.9 is not supported · Issue #191 · deltachat/chatmail · GitHub

Note that you do not need to run this on the server itself, you can run cmdeploy on another machine with more up-to-date distro. But we anyway need to fix it.

I compiled python 3.10, ran it with the commands, and can confirm that python 3.10 indeed works,

thank you again!