Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Python 3.13 and update HA #451

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moonraker-home-assistant",
"image": "mcr.microsoft.com/vscode/devcontainers/python:3.12-bookworm",
"image": "mcr.microsoft.com/devcontainers/python:dev-3.13-bookworm",
"postCreateCommand": "scripts/setup",
"forwardPorts": [8123],
"customizations": {
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: "pip"

- name: "Install requirements"
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Setup Python
uses: "actions/setup-python@v5"
with:
python-version: "3.12"
python-version: "3.13"
- name: Install requirements
run: python3 -m pip install -r requirements.txt
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest-homeassistant-custom-component==0.13.178
pytest-homeassistant-custom-component==0.13.191
moonraker-api==2.0.6
aiohttp_cors==0.7.0
pre-commit==4.0.1
Expand Down
11 changes: 10 additions & 1 deletion scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ set -e

cd "$(dirname "$0")/.."

# Install go2rtc

HA_GO2RTC_VERSION=$(curl --silent -qI https://github.com/AlexxIT/go2rtc/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}')
echo "https://github.com/AlexxIT/go2rtc/releases/download/${HA_GO2RTC_VERSION}/go2rtc_linux_amd64"
sudo curl -o /bin/go2rtc -fL "https://github.com/AlexxIT/go2rtc/releases/download/${HA_GO2RTC_VERSION}/go2rtc_linux_amd64"
sudo chmod +x /bin/go2rtc

sudo apt-get update
sudo apt-get install -y libturbojpeg0 ffmpeg
pip install --upgrade pip
sudo apt-get upgrade -y


python3 -m pip install --requirement requirements.txt

sudo apt-get install -y libturbojpeg0 ffmpeg libpcap-dev
Loading