diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2cec291c07eaa327379c870a2952d7221c1d7883..375b2205de2f9233b8b37523c41b502f42330e81 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+### Changed
+- Move to pyproject.toml
 
 ## [1.7.1] - 2023-10-04
 ### Fixed
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000000000000000000000000000000000000..1ff19c172d5d73359dd60c43b6683282444038f7
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,52 @@
+[project]
+name = "pretix-matrix-inviter"
+dynamic = ["version"]
+description = "Invite pretix participants to a Matrix Room or Space."
+readme = "README.md"
+license = {text = "MIT License"}
+keywords = ["pretix", "matrix"]
+authors = [
+    {name = "Felix Schäfer", email = "admin@kif.rocks"},
+]
+maintainers = [
+    {name = "Felix Schäfer", email = "admin@kif.rocks"},
+]
+classifiers = [
+    "Development Status :: 5 - Production/Stable",
+    "Framework :: Django",
+    "License :: OSI Approved :: MIT License",
+    "Topic :: Communications :: Chat",
+]
+
+dependencies = [
+    "requests",
+]
+
+[project.entry-points."pretix.plugin"]
+pretix_matrix_inviter = "pretix_matrix_inviter:PretixPluginMeta"
+
+[project.entry-points."distutils.commands"]
+build = "pretix_plugin_build.build:CustomBuild"
+
+[build-system]
+requires = [
+    "setuptools",
+    "pretix-plugin-build",
+]
+
+[project.urls]
+Homepage = "https://gitlab.fachschaften.org/kif/pretix-matrix-inviter"
+Repository = "https://gitlab.fachschaften.org/kif/pretix-matrix-inviter"
+Changelog = "https://gitlab.fachschaften.org/kif/pretix-matrix-inviter/-/blob/main/CHANGELOG.md"
+Tracker = "https://gitlab.fachschaften.org/kif/pretix-matrix-inviter/-/issues"
+"pretix Marketplace" = "https://marketplace.pretix.eu/products/pretix-matrix-inviter/"
+
+[tool.setuptools]
+include-package-data = true
+
+[tool.setuptools.dynamic]
+version = {attr = "pretix_matrix_inviter.__version__"}
+
+[tool.setuptools.packages.find]
+include = ["pretix*"]
+namespaces = false
diff --git a/setup.py b/setup.py
index c98e8672e4b0e28219e32d9d21c94e9bba436bd8..b024da80e9c1c8c800cc1b46e90c1e783cb446cc 100644
--- a/setup.py
+++ b/setup.py
@@ -1,57 +1,4 @@
-import os
-from distutils.command.build import build
+from setuptools import setup
 
-from django.core import management
-from setuptools import find_packages, setup
 
-from pretix_matrix_inviter import __version__
-
-
-try:
-    with open(
-        os.path.join(os.path.dirname(__file__), "README.md"), encoding="utf-8"
-    ) as f:
-        long_description = f.read()
-except Exception:
-    long_description = ""
-
-
-class CustomBuild(build):
-    def run(self):
-        management.call_command("compilemessages", verbosity=1)
-        build.run(self)
-
-
-cmdclass = {"build": CustomBuild}
-
-
-setup(
-    name="pretix-matrix-inviter",
-    version=__version__,
-    description="Invite pretix participants to a Matrix Room or Space.",
-    long_description=long_description,
-    long_description_content_type="text/markdown",
-    url="https://gitlab.fachschaften.org/kif/pretix-matrix-inviter",
-    project_urls={
-        "Changelog": "https://gitlab.fachschaften.org/kif/pretix-matrix-inviter/-/blob/main/CHANGELOG.md",
-        "Tracker": "https://gitlab.fachschaften.org/kif/pretix-matrix-inviter/-/issues",
-        "pretix Marketplace": "https://marketplace.pretix.eu/products/pretix-matrix-inviter/",
-    },
-    author="Felix Schäfer",
-    author_email="admin@kif.rocks",
-    license="MIT",
-    classifiers=[
-        "Development Status :: 5 - Production/Stable",
-        "Framework :: Django",
-        "License :: OSI Approved :: MIT License",
-        "Topic :: Communications :: Chat",
-    ],
-    install_requires=["requests"],
-    packages=find_packages(exclude=["tests", "tests.*"]),
-    include_package_data=True,
-    cmdclass=cmdclass,
-    entry_points="""
-[pretix.plugin]
-pretix_matrix_inviter=pretix_matrix_inviter:PretixPluginMeta
-""",
-)
+setup()