Skip to content

Commit

Permalink
chore: Update for Python 3.12 compatibility (#36)
Browse files Browse the repository at this point in the history
* chore: update dependencies for python 3.12 compatibility

* chore: update pandas

* chore: update README
  • Loading branch information
MBDesu authored Feb 19, 2025
1 parent 694ba7b commit 3a74d6c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ You will have to have a running Python installation. Look [here](https://wiki.py

* Run the file `run.ps1` with a double click
* If you are on MacOS run the file `run.command`
* If you are on MacOS and using Homebrew to manage your Python3 installation, run the file `brew.command`
* If you are on Linux run the file `run.sh`

The commands `pip3` or `python3` may be different on your OS. Try `pip` or `python` instead.
Expand Down
14 changes: 14 additions & 0 deletions brew.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# This script should be used on MacOS when Python is a managed environment;
# i.e.: when Python is installed via Homebrew or similar package managers
#
# @author MBDesu

cd "$(dirname "$0")"

python3 -m venv ./venv
source ./venv/bin/activate
python3 -m pip install -r requirements.txt
python3 helper/download_cars_csv.py
python3 -m bokeh serve .
5 changes: 3 additions & 2 deletions gt7dashboard/gt7communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from threading import Thread
from typing import List

from salsa20 import Salsa20_xor
from Crypto.Cipher import Salsa20

from gt7dashboard.gt7helper import seconds_to_lap_time
from gt7dashboard.gt7lap import Lap
Expand Down Expand Up @@ -448,7 +448,8 @@ def salsa20_dec(dat):
iv = bytearray()
iv.extend(iv2.to_bytes(4, 'little'))
iv.extend(iv1.to_bytes(4, 'little'))
ddata = Salsa20_xor(dat, bytes(iv), key[0:32])
cipher = Salsa20.new(key[0:32], bytes(iv))
ddata = cipher.decrypt(dat)
magic = int.from_bytes(ddata[0:4], byteorder='little')
if magic != 0x47375330:
return bytearray(b'')
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bokeh~=3.2.0
salsa20~=0.3.0
pycryptodome~=3.12.0
tabulate~=0.8.10
pandas~=2.0.3
scipy~=1.10.0
pandas~=2.2.3
scipy~=1.15.1

0 comments on commit 3a74d6c

Please sign in to comment.