From a68662b86e9a1b0fe5d4e9605af18d2569ab6504 Mon Sep 17 00:00:00 2001 From: Dylan Verheul Date: Sun, 24 Dec 2023 10:07:28 +0100 Subject: [PATCH] Update package structure (#913) --- .readthedocs.yml | 1 - Makefile | 4 ++-- docs/conf.py | 5 +---- requirements-dev.txt | 1 + 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index b9870409..a34d6434 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/Makefile b/Makefile index e6ad8e78..cb64d796 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION := $(shell python -c "import bootstrap3;print(bootstrap3.__version__)") +VERSION := $(shell sed -n 's/^ *version.*=.*"\([^"]*\)".*/\1/p' pyproject.toml) .PHONY: test test: @@ -7,7 +7,7 @@ test: .PHONY: tests tests: - nox + tox .PHONY: reformat reformat: diff --git a/docs/conf.py b/docs/conf.py index ed099ed8..46810fd5 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('bootstrap3') - 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/requirements-dev.txt b/requirements-dev.txt index 882f3ef1..9c8d1209 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