Skip to content

Commit

Permalink
Single source package version in pyproject.toml (#397)
Browse files Browse the repository at this point in the history
Also, fix make, update requirements
  • Loading branch information
dyve authored Dec 24, 2023
1 parent c1b279c commit a20cd65
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test:

.PHONY: tests
tests:
nox
tox

.PHONY: reformat
reformat:
Expand Down
5 changes: 1 addition & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
-r requirements-test.txt
-r docs/requirements.txt
twine==4.0.2
4 changes: 3 additions & 1 deletion src/django_marina/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = "23.6.dev0"
import importlib.metadata

__version__ = importlib.metadata.version(__package__ or __name__)

0 comments on commit a20cd65

Please sign in to comment.