Skip to content

Commit

Permalink
Add non-Python assets to pyproj.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
rbreu committed May 7, 2024
1 parent 4648fa9 commit 8a19a91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions beeref/assets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def on_new(self):
logger.debug(f'Assets path: {self.PATH}')

self.logo = QtGui.QIcon(os.path.join(self.PATH, 'logo.png'))
assert self.logo.isNull() is False
self.cursor_rotate = self.cursor_from_image(
'cursor_rotate.png', (20, 20))
self.cursor_flip_h = self.cursor_from_image(
Expand All @@ -49,6 +50,7 @@ def cursor_from_image(self, filename, hotspot):
app = QtWidgets.QApplication.instance()
scaling = app.primaryScreen().devicePixelRatio()
img = QtGui.QImage(os.path.join(self.PATH, filename))
assert img.isNull() is False
pixmap = QtGui.QPixmap.fromImage(img)
pixmap.setDevicePixelRatio(scaling)
return QtGui.QCursor(
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[build-system]
requires = ["setuptools"]
requires = ["setuptools>=61.0.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
include = ["beeref*"]

[tool.setuptools.package-data]
"*" = ["*.html", "*.png"]

[project]
name = "BeeRef"
version = "0.3.4-dev"
Expand Down

0 comments on commit 8a19a91

Please sign in to comment.