From 2e7da8c5ab1c4c099efe1aa391051c8baa824a49 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Tue, 20 Aug 2024 12:31:16 +0200 Subject: [PATCH] dynamic version --- pretalx_halfnarp/__init__.py | 1 + pretalx_halfnarp/apps.py | 4 +++- pyproject.toml | 11 ++++++----- setup.py | 3 --- 4 files changed, 10 insertions(+), 9 deletions(-) delete mode 100644 setup.py diff --git a/pretalx_halfnarp/__init__.py b/pretalx_halfnarp/__init__.py index e69de29..1a72d32 100644 --- a/pretalx_halfnarp/__init__.py +++ b/pretalx_halfnarp/__init__.py @@ -0,0 +1 @@ +__version__ = '1.1.0' diff --git a/pretalx_halfnarp/apps.py b/pretalx_halfnarp/apps.py index 1c67a34..91f1539 100644 --- a/pretalx_halfnarp/apps.py +++ b/pretalx_halfnarp/apps.py @@ -1,6 +1,8 @@ from django.apps import AppConfig from django.utils.translation import gettext_lazy +from pretalx_halfnarp import __version__ + class PluginApp(AppConfig): name = "pretalx_halfnarp" @@ -18,7 +20,7 @@ class PretalxPluginMeta: "Halfnarp is an anagram of Fahrplan, a not-yet sorted Fahrplan" ) visible = True - version = "1.1.0" + version = __version__ def ready(self): from . import signals # NOQA diff --git a/pyproject.toml b/pyproject.toml index e49bfdf..fa61814 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pretalx-halfnarp" -version = "1.1.0" +dynamic = ["version"] description = """ Pretalx-Halfnarp is a Plugin that helps you to estimate the interest in your submissions and plan room-sizes accordingly by scheduling the most @@ -32,10 +32,8 @@ pretalx_halfnarp = "pretalx_halfnarp:PretalxPluginMeta" build = "pretalx_plugin_build.build:CustomBuild" [build-system] -requires = [ - "setuptools", - "pretalx-plugin-build", -] +build-backend = "setuptools.build_meta" +requires = ["setuptools", "wheel"] [project.urls] homepage = "https://github.com/seibert-media/pretalx-halfnarp" @@ -44,6 +42,9 @@ repository = "https://github.com/seibert-media/pretalx-halfnarp.git" [tool.setuptools] include-package-data = true +[tool.setuptools.dynamic] +version = {attr = "pretalx_halfnarp.__version__"} + [tool.setuptools.packages.find] include = ["pretalx*"] namespaces = false diff --git a/setup.py b/setup.py deleted file mode 100644 index 6068493..0000000 --- a/setup.py +++ /dev/null @@ -1,3 +0,0 @@ -from setuptools import setup - -setup()