git: 8a7fe2313295 - main - x11/py-pynput: New port: Send virtual input commands

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Wed, 01 Feb 2023 02:43:00 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8a7fe231329504803c7068da657f659ce6db6680

commit 8a7fe231329504803c7068da657f659ce6db6680
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-01-31 16:01:01 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-02-01 02:42:57 +0000

    x11/py-pynput: New port: Send virtual input commands
---
 x11/Makefile                       |  1 +
 x11/py-pynput/Makefile             | 26 ++++++++++++++++++++++++++
 x11/py-pynput/distinfo             |  3 +++
 x11/py-pynput/files/patch-setup.py | 13 +++++++++++++
 x11/py-pynput/pkg-descr            |  3 +++
 5 files changed, 46 insertions(+)

diff --git a/x11/Makefile b/x11/Makefile
index 7e81497365b7..72debe1a0ad2 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -308,6 +308,7 @@
     SUBDIR += py-caffeine-ng
     SUBDIR += py-i3-quickterm
     SUBDIR += py-i3ipc
+    SUBDIR += py-pynput
     SUBDIR += py-pyscreenshot
     SUBDIR += py-python-xapp
     SUBDIR += py-pyvirtualdisplay
diff --git a/x11/py-pynput/Makefile b/x11/py-pynput/Makefile
new file mode 100644
index 000000000000..ded00786224e
--- /dev/null
+++ b/x11/py-pynput/Makefile
@@ -0,0 +1,26 @@
+PORTNAME=	pynput
+DISTVERSION=	1.7.6
+CATEGORIES=	x11
+MASTER_SITES=	PYPI # no tests on PYPI, but GitHub tarball doesn't bui;d
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Send virtual input commands
+WWW=		https://github.com/moses-palmer/pynput
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/COPYING.LGPL
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinx>=1.3.1:textproc/py-sphinx@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}python-xlib>0:x11-toolkits/py-python-xlib@${PY_FLAVOR}
+
+USES=		python:3.6+
+USE_PYTHON=	distutils autoplist
+
+NO_ARCH=	yes
+
+TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_WRKSRC=	${WRKSRC}/tests
+
+.include <bsd.port.mk>
diff --git a/x11/py-pynput/distinfo b/x11/py-pynput/distinfo
new file mode 100644
index 000000000000..28f824a43120
--- /dev/null
+++ b/x11/py-pynput/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1675195033
+SHA256 (pynput-1.7.6.tar.gz) = 3a5726546da54116b687785d38b1db56997ce1d28e53e8d22fc656d8b92e533c
+SIZE (pynput-1.7.6.tar.gz) = 79501
diff --git a/x11/py-pynput/files/patch-setup.py b/x11/py-pynput/files/patch-setup.py
new file mode 100644
index 000000000000..e87d2cf77536
--- /dev/null
+++ b/x11/py-pynput/files/patch-setup.py
@@ -0,0 +1,13 @@
+- setuptools-lint isn't really needed during build
+
+--- setup.py.orig	2023-01-31 20:21:18 UTC
++++ setup.py
+@@ -23,7 +23,7 @@ RUNTIME_PACKAGES = [
+ 
+ #: Additional requirements used during setup
+ SETUP_PACKAGES = [
+-    'setuptools-lint >=0.5',
++    #'setuptools-lint >=0.5',
+     'sphinx >=1.3.1']
+ 
+ #: Packages requires for different environments
diff --git a/x11/py-pynput/pkg-descr b/x11/py-pynput/pkg-descr
new file mode 100644
index 000000000000..c70387df548c
--- /dev/null
+++ b/x11/py-pynput/pkg-descr
@@ -0,0 +1,3 @@
+pynput is the library allows you to control and monitor input devices.
+
+Currently, mouse and keyboard input and monitoring are supported.