diff --git a/.github/workflows/modoboa.yml b/.github/workflows/modoboa.yml index b3f27a07b..7422e1eec 100644 --- a/.github/workflows/modoboa.yml +++ b/.github/workflows/modoboa.yml @@ -159,10 +159,10 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.10' - name: Build frontend shell: bash -l {0} run: | @@ -176,12 +176,12 @@ jobs: - name: Build packages run: | sudo apt-get install librrd-dev rrdtool libssl-dev - python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade pip build pip install -r requirements.txt cd modoboa django-admin compilemessages cd .. - python setup.py sdist bdist_wheel + python -m build - name: Publish to Test PyPI if: endsWith(github.event.ref, '/master') uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/modoboa/__init__.py b/modoboa/__init__.py index 4044639f7..1b52c3b1e 100644 --- a/modoboa/__init__.py +++ b/modoboa/__init__.py @@ -1,9 +1,13 @@ """Modoboa - Mail hosting made simple.""" from pkg_resources import DistributionNotFound, get_distribution +from modoboa.core.commands import handle_command_line try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed pass + +def modoboa_admin(): + handle_command_line() diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..86353e4d7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,91 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "modoboa" +dynamic = [ + "version", + "optional-dependencies" +] +authors = [ + { name="Antoine Nguyen", email="tonio@ngyn.org" }, +] +description = "Mail hosting made simple" +readme = "README.rst" +requires-python = ">=3.7" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Framework :: Django :: 2.2", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: ISC License (ISCL)", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Topic :: Communications :: Email", + "Topic :: Internet :: WWW/HTTP", +] +keywords = ["email"] +license = {file = "LICENSE"} +dependencies = [ + "django<4.0", + "django-ckeditor==6.3.0", + "django-phonenumber-field[phonenumbers]==7.0.2", + "django-reversion==5.0.4", + "django-xforwardedfor-middleware==2.0", + "django-otp==1.1.6", + "django-filter", + "django-rename-app==0.1.5", + + "dj-database-url", + + "djangorestframework>=3.11,<3.15", + "drf-spectacular", + "uritemplate", + "djangorestframework-simplejwt==5.2.2", + + "passlib~=1.7.4", + "bcrypt", # Requires libffi-dev and python-dev + + "asgiref", + "dnspython==2.3.0", + "feedparser==6.0.10", + "gevent==22.10.2", + "jsonfield==3.1.0", + "Pillow", # Optional dependency for django-ckeditor + "progressbar33==2.4", + "python-dateutil", + "cryptography", + "pytz", + "requests", + "lxml", + "chardet", + "ovh", + "oath", + "redis", + "rrdtool>=0.1.10", + "qrcode", + + "aiosmtplib", + "aioredis==2.0.1", + + # PDF credentials + "reportlab", + + # DMARC + "tldextract>=2.0.2", + "defusedxml>=0.6.0", + "python-magic>=0.4.24", +] + + +[project.scripts] +modoboa-cli = "modoboa:modoboa_admin" + +[project.urls] +homepage = "http://modoboa.org/" +documentation = "https://modoboa.readthedocs.io/en/latest/" +repository = "https://github.com/modoboa/modoboa"