Skip to content

Commit 414f384

Browse files
committed
Fix missing icon in release package
1 parent fa89d7b commit 414f384

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ include README.md
22
include LICENSE
33
include requirements.txt
44
include bach_generator/py.typed
5+
include bach_generator/gui/media/icon.png
56
recursive-exclude tests *

bach_generator/gui/components.py

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# pylint: disable=line-too-long
99

1010
import ctypes
11+
import os
1112
import sys
1213
import tkinter as tk
1314
from uuid import uuid4
@@ -42,6 +43,9 @@ def add_frames(self):
4243

4344
def set_icon(self, icon_path):
4445
"""Sets window icon, and taskbar icon (only on Windows)"""
46+
if not os.path.isfile(icon_path):
47+
return
48+
4549
photo = tk.PhotoImage(file=icon_path)
4650
self.iconphoto(False, photo)
4751
self._set_taskbar_icon()

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88

99
setuptools.setup(
1010
name="bach_generator",
11-
version="1.0.0",
11+
version="1.0.1",
1212
description="Machine learning based Bach music generator",
1313
long_description=project_dir.joinpath("README.md").read_text(encoding="utf-8"),
1414
long_description_content_type="text/markdown",
1515
keywords=["python"],
1616
author="Richard Baltrusch",
1717
url="https://github.com/rbaltrusch/bach_generator",
1818
packages=setuptools.find_packages("."),
19-
package_dir={"": "."},
2019
python_requires=">=3.8",
2120
include_package_data=True,
2221
package_data={"bach_generator": ["py.typed"]}, # for mypy

0 commit comments

Comments
 (0)