Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhozic committed Mar 2, 2024
1 parent 1fb6152 commit 39f7e94
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 38 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build_exe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
run: |
pip install .[all]
pip install pyinstaller
pip install ttkbootstrap==1.10.1
- name: Build
run: |
echo "from daf_gui import run;run()" > discord-advert-framework.py
Expand Down
4 changes: 4 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Glossary
Releases
---------------------

v4.0.5
=====================
- Fixed exe build.

v4.0.4
=====================
- Fixed automatic responder's not being removable over a remote connection.
Expand Down
3 changes: 2 additions & 1 deletion requirements/mandatory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ typeguard>=2.13,<2.14
typing_extensions>=4,<5; python_version < "3.11"
tkinter-async-execute>=1.2,<1.3
asyncio-event-hub>=1.0,<1.2
tkclasswiz>=1.4,<1.5
tkclasswiz>=1.4,<1.5
ttkbootstrap==1.10.1
2 changes: 1 addition & 1 deletion src/daf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import warnings


VERSION = "4.0.4"
VERSION = "4.0.5"


if sys.version_info.minor == 12 and sys.version_info.major == 3:
Expand Down
35 changes: 0 additions & 35 deletions src/daf_gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,6 @@
import json
import sys


# Automatically install GUI requirements if GUI is requested to avoid making it an optional dependency
# One other way would be to create a completely different package on pypi for the core daf, but that is a lot of
# work to be done. It is better to auto install.
to_install = [
("ttkbootstrap", "==1.10.1"),
]

version_path = Path.home().joinpath("./gui_versions.json")
if not version_path.exists():
version_path.touch()

with open(version_path, "r") as file:
try:
version_data = json.load(file)
except json.JSONDecodeError as exc:
version_data = {}

for package, version in to_install:
installed_version = version_data.get(package, "0")
if find_spec(package) is None or installed_version != version:
print(f"Auto installing {package}{version}")
subprocess.check_call(
[
sys.executable.replace("pythonw", "python"),
"-m", "pip", "install", "-U",
package + version
]
)
version_data[package] = version

with open(version_path, "w") as file:
json.dump(version_data, file)


import ttkbootstrap as ttk

from ttkbootstrap.toast import ToastNotification
Expand Down

0 comments on commit 39f7e94

Please sign in to comment.