summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@riseup.net>2020-08-17 18:30:17 +0200
committerJoonas Niilola <juippis@gentoo.org>2020-09-15 11:09:18 +0300
commit8febbc3aa2ad0ba36d06b53309151aa4c9e62287 (patch)
tree32a175e57e327f4cc213f8f1d891f08e46488a1a
parentdev-python/entrypoint2: Easy to use command-line interface for python (diff)
downloadgentoo-8febbc3aa2ad0ba36d06b53309151aa4c9e62287.tar.gz
gentoo-8febbc3aa2ad0ba36d06b53309151aa4c9e62287.tar.bz2
gentoo-8febbc3aa2ad0ba36d06b53309151aa4c9e62287.zip
dev-python/pyscreenshot: Python screenshot library
Package-Manager: Portage-3.0.2, Repoman-2.3.23 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--dev-python/pyscreenshot/Manifest1
-rw-r--r--dev-python/pyscreenshot/metadata.xml12
-rw-r--r--dev-python/pyscreenshot/pyscreenshot-2.2.ebuild72
3 files changed, 85 insertions, 0 deletions
diff --git a/dev-python/pyscreenshot/Manifest b/dev-python/pyscreenshot/Manifest
new file mode 100644
index 00000000000..a2135f89123
--- /dev/null
+++ b/dev-python/pyscreenshot/Manifest
@@ -0,0 +1 @@
+DIST pyscreenshot-2.2.tar.gz 29726 BLAKE2B d1e314be360d4716b35b4302de82010dfc9a97212b3f4472b42e40f9470fd0575fe8f0ceb976adfe13059c0566413414e03f78189d4afa193d88a0aaf4c5c26e SHA512 6689ccbcd5c6164aeb12d911ee93c8958f6c6b5aaba5ba7d4073ee855e6398180ed27fce6299480b18b3d7ffad12cd17694c3db1f1c7373d4b25be0073d49338
diff --git a/dev-python/pyscreenshot/metadata.xml b/dev-python/pyscreenshot/metadata.xml
new file mode 100644
index 00000000000..d22e99d7357
--- /dev/null
+++ b/dev-python/pyscreenshot/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>andrewammerlaan@riseup.net</email>
+ <name>Andrew Ammerlaan</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-python/pyscreenshot/pyscreenshot-2.2.ebuild b/dev-python/pyscreenshot/pyscreenshot-2.2.ebuild
new file mode 100644
index 00000000000..d04a9042458
--- /dev/null
+++ b/dev-python/pyscreenshot/pyscreenshot-2.2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit distutils-r1 virtualx
+
+DESCRIPTION="Python screenshot library"
+HOMEPAGE="https://github.com/ponty/pyscreenshot"
+SRC_URI="https://github.com/ponty/pyscreenshot/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND="test? (
+ dev-python/path-py[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/python-xlib[${PYTHON_USEDEP}]
+ dev-python/pyvirtualdisplay[${PYTHON_USEDEP}]
+)"
+
+DEPEND="
+ dev-python/easyprocess[${PYTHON_USEDEP}]
+ dev-python/entrypoint2[${PYTHON_USEDEP}]
+ dev-python/jeepney[${PYTHON_USEDEP}]
+ dev-python/mss[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ # easyprocess.EasyProcessError: start error fails inside emerge env
+ sed -i -e 's:test_default:_&:' \
+ tests/test_default.py || die
+
+ # AssertionError
+ sed -i -e 's:test_imagemagick:_&:' \
+ tests/test_imagemagick.py || die
+
+ # Needs access to dbus
+ sed -i -e 's:test_kwin_dbus:_&:' \
+ tests/test_kwin_dbus.py || die
+
+ # AssertionError
+ sed -i -e 's:test_mss:_&:' \
+ tests/test_mss.py || die
+
+ # AssertionError
+ sed -i -e 's:test_pygdk3:_&:' \
+ tests/test_pygdk3.py || die
+
+ # AssertionError
+ sed -i -e 's:test_pyqt5:_&:' \
+ tests/test_pyqt5.py || die
+
+ # AssertionError
+ sed -i -e 's:test_qtpy:_&:' \
+ tests/test_qtpy.py || die
+
+ # AssertionError
+ sed -i -e 's:test_scrot:_&:' \
+ tests/test_scrot.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ virtx pytest -vv
+}