Skip to content

Commit 702a8ee

Browse files
committed
Add Python environment setup and calendar generation to Makefile and Docker configuration
1 parent d165dda commit 702a8ee

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ ARG NODE_VERSION="none"
99
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
1010

1111
# [Optional] Uncomment this section to install additional OS packages.
12-
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
13-
# && apt-get -y install --no-install-recommends <your-package-list-here>
12+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
13+
&& apt-get -y install --no-install-recommends python3-venv python3-pip
1414

1515
# [Optional] Uncomment this line to install global node packages.
1616
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

.devcontainer/devcontainer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
}
1414
},
1515

16+
// Features to add to the dev container. More info: https://containers.dev/features.
17+
"features": {
18+
"ghcr.io/devcontainers/features/github-cli:1": {}
19+
},
20+
1621
// Use 'forwardPorts' to make a list of ports inside the container available locally.
1722
"forwardPorts": [
1823
// Jekyll server

makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,19 @@ install:
3636
@bundle exec jekyll build
3737

3838
# Generate calendar.ics from events data
39-
calendar:
39+
calendar: setup-python
4040
@echo "Generating calendar.ics from events data..."
4141
@./.venv/bin/python generate_calendar.py
4242
@echo "Calendar generated successfully!"
4343

44-
.PHONY: all serve serve-livereload serve-windows calendar
44+
# Setup Python environment for calendar generation
45+
setup-python:
46+
@if [ ! -d ".venv" ]; then \
47+
echo "Setting up Python environment..."; \
48+
python3 -m venv .venv --upgrade-deps; \
49+
.venv/bin/pip install -r requirements.txt; \
50+
echo "Python environment ready!"; \
51+
fi
52+
53+
.PHONY: all serve serve-livereload serve-windows calendar setup-python
4554

0 commit comments

Comments
 (0)