From fbfc8d9b6a916708b228da6927d6dd2e9b18baf6 Mon Sep 17 00:00:00 2001 From: Dylan Verheul Date: Fri, 22 Dec 2023 08:33:42 +0100 Subject: [PATCH 1/2] Fix make, update requirements --- Makefile | 2 +- requirements-dev.txt | 1 + requirements-test.txt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a8d5ca3..bd73a6d 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ test: .PHONY: tests tests: - nox + tox .PHONY: reformat reformat: diff --git a/requirements-dev.txt b/requirements-dev.txt index 882f3ef..9c8d120 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,2 +1,3 @@ -r requirements-test.txt -r docs/requirements.txt +twine==4.0.2 diff --git a/requirements-test.txt b/requirements-test.txt index 0cd6d95..8405e71 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,3 +1,3 @@ tox==4.11.4 coverage==7.3.4 -ruff==0.1.8 +ruff==0.1.9 From 5adc79acabde831e95989c8bb25d922991babee4 Mon Sep 17 00:00:00 2001 From: Dylan Verheul Date: Sun, 24 Dec 2023 09:52:19 +0100 Subject: [PATCH 2/2] Single source package version in pyproject.toml --- .readthedocs.yml | 1 - docs/conf.py | 5 +---- pyproject.toml | 2 +- src/django_marina/__about__.py | 4 +++- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index b987040..a34d643 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -7,6 +7,5 @@ build: commands: - pip install -U pip - pip install -U -r docs/requirements.txt - - pip install -e . - make docs - mv docs/_build $READTHEDOCS_OUTPUT diff --git a/docs/conf.py b/docs/conf.py index f34e299..46810fd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,15 +1,12 @@ -import importlib from datetime import datetime import tomllib -module = importlib.import_module("django_marina") - with open("../pyproject.toml", "rb") as f: pyproject = tomllib.load(f) project = pyproject["project"]["name"] -release = module.__version__ +release = pyproject["project"]["version"] version = ".".join(release.split(".")[:2]) author = ", ".join(author["name"] for author in pyproject["project"]["authors"]) year = datetime.now().year diff --git a/pyproject.toml b/pyproject.toml index 6aee67c..50d75e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ license = {file = "LICENSE"} name = "django-marina" readme = "README.md" requires-python = ">=3.8" -version = "23.6" +version = "23.7.dev0" [project.urls] Changelog = "https://github.com/zostera/django-marina/blob/main/CHANGELOG.md" diff --git a/src/django_marina/__about__.py b/src/django_marina/__about__.py index e5cc4b7..2c02b64 100644 --- a/src/django_marina/__about__.py +++ b/src/django_marina/__about__.py @@ -1 +1,3 @@ -__version__ = "23.6.dev0" +import importlib.metadata + +__version__ = importlib.metadata.version(__package__ or __name__)