Skip to content

Commit

Permalink
Fix missing icon in release package
Browse files Browse the repository at this point in the history
  • Loading branch information
rbaltrusch committed Aug 13, 2022
1 parent fa89d7b commit 414f384
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ include README.md
include LICENSE
include requirements.txt
include bach_generator/py.typed
include bach_generator/gui/media/icon.png
recursive-exclude tests *
4 changes: 4 additions & 0 deletions bach_generator/gui/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# pylint: disable=line-too-long

import ctypes
import os
import sys
import tkinter as tk
from uuid import uuid4
Expand Down Expand Up @@ -42,6 +43,9 @@ def add_frames(self):

def set_icon(self, icon_path):
"""Sets window icon, and taskbar icon (only on Windows)"""
if not os.path.isfile(icon_path):
return

photo = tk.PhotoImage(file=icon_path)
self.iconphoto(False, photo)
self._set_taskbar_icon()
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@

setuptools.setup(
name="bach_generator",
version="1.0.0",
version="1.0.1",
description="Machine learning based Bach music generator",
long_description=project_dir.joinpath("README.md").read_text(encoding="utf-8"),
long_description_content_type="text/markdown",
keywords=["python"],
author="Richard Baltrusch",
url="https://github.com/rbaltrusch/bach_generator",
packages=setuptools.find_packages("."),
package_dir={"": "."},
python_requires=">=3.8",
include_package_data=True,
package_data={"bach_generator": ["py.typed"]}, # for mypy
Expand Down

0 comments on commit 414f384

Please sign in to comment.