From 8302f8e495c6c3ad2842bfa0b09bf433572423cd Mon Sep 17 00:00:00 2001 From: ktyl Date: Tue, 27 Sep 2022 22:08:23 +0100 Subject: [PATCH] use pipenv --- .drone.yml | 5 +++-- Pipfile | 12 ++++++++++++ Pipfile.lock | 29 +++++++++++++++++++++++++++++ makefile | 5 +++-- 4 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 Pipfile create mode 100644 Pipfile.lock diff --git a/.drone.yml b/.drone.yml index 6f1ef2c..b319df1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,9 +23,10 @@ steps: - drone commands: - # install stuff + # install deps - pacman -Sy --noconfirm > /dev/null - - pacman -S --noconfirm python make git openssh rsync > /dev/null + - pacman -S --noconfirm python python-pip > /dev/null + - pacman -S --noconfirm make git openssh rsync > /dev/null # configure ssh - eval $(ssh-agent -s) diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..950de58 --- /dev/null +++ b/Pipfile @@ -0,0 +1,12 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +markdown = "*" + +[dev-packages] + +[requires] +python_version = "3.10" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..868cdbc --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,29 @@ +{ + "_meta": { + "hash": { + "sha256": "4f4f4fc0dc77addc9a4bf6c737f31df9507ee22a83548fcff1891a4e7bc27bed" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.10" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "markdown": { + "hashes": [ + "sha256:08fb8465cffd03d10b9dd34a5c3fea908e20391a2a90b88d66362cb05beed186", + "sha256:3b809086bb6efad416156e00a0da66fe47618a5d6918dd688f53f40c8e4cfeff" + ], + "index": "pypi", + "version": "==3.4.1" + } + }, + "develop": {} +} diff --git a/makefile b/makefile index af68aae..6c9de42 100644 --- a/makefile +++ b/makefile @@ -32,6 +32,7 @@ HTML_TARGETS = $(PAGES:$(ROOT_DIR)/%.html=$(OUT_DIR)/%.html) CSS_TARGETS = $(STYLES:$(ROOT_DIR)/%.css=$(OUT_DIR)/%.css) PNG_TARGETS = $(IMG_DIR)/%.png=$(OUT_DIR)/%.png + all: $(HTML_TARGETS) $(CSS_TARGETS) blog | $(OUT_DIR) cp $(IMG_DIR)/*.png $(OUT_DIR)/ cp $(IMG_DIR)/*.jpg $(OUT_DIR)/ @@ -54,10 +55,10 @@ $(OUT_DIR): blog: $(BLOG_TARGETS) $(BLOG_RSS) | $(BLOG_TMP_DIR) $(BLOG_RSS): $(BLOG_PAGES) - python scripts/mkblogrss.py $(BLOG_PAGES) > $@ + pipenv run python scripts/mkblogrss.py $(BLOG_PAGES) > $@ $(BLOG_INDEX_LINKS): $(BLOG_TARGETS) | $(BLOG_TMP_DIR) - python scripts/mkblogindex.py $(BLOG_TARGETS) > $@ + pipenv run python scripts/mkblogindex.py $(BLOG_TARGETS) > $@ $(BLOG_OUT_DIR)/%.html: $(BLOG_OUT_DIR)/%.html.tmp $(HTML_INCLUDES) $(CSS_TARGETS) python ppp/ppp.py $< $(HTML_INCLUDES) > $@