mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-13 07:34:50 +00:00
comms/py-streamdeck: New port: Python library to control the Elgato Stream Deck
- Submitter becomes maintainer This is an open source Python 3 library to control an Elgato Stream Deck directly, without the official software. This can allow you to create your own custom front-ends, such as a custom control front-end for home automation software. WWW: https://github.com/abcminiuser/python-elgato-streamdeck PR: 278266
This commit is contained in:
parent
e680bd98d3
commit
e8c02a572f
@ -137,6 +137,7 @@
|
||||
SUBDIR += py-pymodbus
|
||||
SUBDIR += py-pyserial
|
||||
SUBDIR += py-pyserial-asyncio
|
||||
SUBDIR += py-streamdeck
|
||||
SUBDIR += py-xmodem
|
||||
SUBDIR += pyla
|
||||
SUBDIR += qico
|
||||
|
30
comms/py-streamdeck/Makefile
Normal file
30
comms/py-streamdeck/Makefile
Normal file
@ -0,0 +1,30 @@
|
||||
PORTNAME= streamdeck
|
||||
DISTVERSION= 0.9.5
|
||||
CATEGORIES= comms python
|
||||
MASTER_SITES= PYPI
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= tiago.gasiba@gmail.com
|
||||
COMMENT= Python library to control the Elgato Stream Deck
|
||||
WWW= https://github.com/abcminiuser/python-elgato-streamdeck
|
||||
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
|
||||
LIB_DEPENDS= libhidapi.so:comms/hidapi
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>=8.1.1:graphics/py-pillow@${PY_FLAVOR}
|
||||
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=3.2.1:devel/py-pytest@${PY_FLAVOR}
|
||||
|
||||
USES= dos2unix python
|
||||
USE_PYTHON= autoplist pep517
|
||||
|
||||
post-patch:
|
||||
${RM} ${WRKSRC}/src/StreamDeck/Transport/LibUSBHIDAPI.py.orig
|
||||
|
||||
TEST_WRKSRC= ${WRKSRC}/test
|
||||
DO_MAKE_TEST= ${SETENV} ${TEST_ENV} pytest-${PYTHON_VER}
|
||||
TEST_TARGET= test.py
|
||||
|
||||
.include <bsd.port.mk>
|
3
comms/py-streamdeck/distinfo
Normal file
3
comms/py-streamdeck/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1713635550
|
||||
SHA256 (streamdeck-0.9.5.tar.gz) = 04796266b44577ae03f940f5c5ca69d87007e03d19eed89b6b02686c030ceb91
|
||||
SIZE (streamdeck-0.9.5.tar.gz) = 2555109
|
@ -0,0 +1,10 @@
|
||||
--- src/StreamDeck/Transport/LibUSBHIDAPI.py.orig 2024-04-08 21:05:19 UTC
|
||||
+++ src/StreamDeck/Transport/LibUSBHIDAPI.py
|
||||
@@ -154,6 +154,7 @@ class LibUSBHIDAPI(Transport):
|
||||
"Windows": ["hidapi.dll", "libhidapi-0.dll", "./hidapi.dll"],
|
||||
"Linux": ["libhidapi-libusb.so", "libhidapi-libusb.so.0"],
|
||||
"Darwin": ["libhidapi.dylib"],
|
||||
+ "FreeBSD": ["libhidapi.so"],
|
||||
}
|
||||
|
||||
self.platform_name = platform.system()
|
19
comms/py-streamdeck/files/patch-test_test.py
Normal file
19
comms/py-streamdeck/files/patch-test_test.py
Normal file
@ -0,0 +1,19 @@
|
||||
--- test/test.py.orig 2024-04-20 20:51:55 UTC
|
||||
+++ test/test.py
|
||||
@@ -17,7 +17,16 @@ from PIL import ImageDraw
|
||||
from StreamDeck.DeviceManager import DeviceManager
|
||||
from StreamDeck.ImageHelpers import PILHelper
|
||||
from PIL import ImageDraw
|
||||
+import pytest
|
||||
|
||||
+def initialize_decks():
|
||||
+ manager = DeviceManager(transport="dummy")
|
||||
+ streamdecks = manager.enumerate()
|
||||
+ return streamdecks
|
||||
+
|
||||
+@pytest.fixture(params=initialize_decks())
|
||||
+def deck(request):
|
||||
+ return request.param
|
||||
|
||||
def test_pil_helpers(deck):
|
||||
if not deck.is_visual():
|
4
comms/py-streamdeck/pkg-descr
Normal file
4
comms/py-streamdeck/pkg-descr
Normal file
@ -0,0 +1,4 @@
|
||||
This is an open source Python 3 library to control an Elgato Stream Deck
|
||||
directly, without the official software. This can allow you to create your
|
||||
own custom front-ends, such as a custom control front-end for home
|
||||
automation software.
|
Loading…
Reference in New Issue
Block a user