diff options
Diffstat (limited to 'dev-python/cairocffi')
| -rw-r--r-- | dev-python/cairocffi/Manifest | 3 | ||||
| -rw-r--r-- | dev-python/cairocffi/cairocffi-0.8.0-r1.ebuild | 52 | ||||
| -rw-r--r-- | dev-python/cairocffi/cairocffi-0.9.0-r1.ebuild | 51 | ||||
| -rw-r--r-- | dev-python/cairocffi/cairocffi-1.1.0.ebuild | 35 | ||||
| -rw-r--r-- | dev-python/cairocffi/files/cairocffi-0.8.0-tests.patch | 25 | ||||
| -rw-r--r-- | dev-python/cairocffi/files/cairocffi-1.0.2-test-deps.patch | 41 | ||||
| -rw-r--r-- | dev-python/cairocffi/metadata.xml | 13 |
7 files changed, 220 insertions, 0 deletions
diff --git a/dev-python/cairocffi/Manifest b/dev-python/cairocffi/Manifest new file mode 100644 index 000000000000..db7a73ef68f5 --- /dev/null +++ b/dev-python/cairocffi/Manifest @@ -0,0 +1,3 @@ +DIST cairocffi-0.8.0.tar.gz 79217 BLAKE2B fefcee32e486c150d089b7d13b046c864b83fcc184f7880e86cfae0afc22c1e712ad7e835d76506b4ab0cefab6629abcc5bd86cd95c417dcc64c9374a8629110 SHA512 70179e05ca4a4efeaa39ade1ee1a96d280d198ecff5ae8c8fc634c24d8922ea6a3e1eb6cf5f55c5fc9d3f5b2fc3131a53051690eb86712762d8b6400df8a630a +DIST cairocffi-0.9.0.tar.gz 84652 BLAKE2B 9f09c038619b0f44c568d6636861b0e12ffd7e9ab546f3a65bbd8e77eee7ff5f0c6f4d92a841696492b786d0067af86e25949b723ef6ef73ede370fbf2576d6d SHA512 0d3d54e0d54b3696c8336d8b3a6d745628da51d9d9f8c50f36006c007e1432a95dd9bafd8d865923059d040cc4e9f7989b3670a5318383b357ffc979eeb920d5 +DIST cairocffi-1.1.0.tar.gz 68744 BLAKE2B 604812572bb1a39ab52e41e03714acc93ddc7532e07ac36b693f53ad71cf0bcfd5d2f3bceb56b8e352fe7f179b174a244238b9cfcee690cbc0cb96e5b2934c75 SHA512 a9bc9ec5be767388aad9d06cc3b386b474dbacf097d3558b4033834cfb2f5418eede2f4b4080bec7e4725c6821f6e54d6c3366e8c4ee73bd3fa1cf444b395197 diff --git a/dev-python/cairocffi/cairocffi-0.8.0-r1.ebuild b/dev-python/cairocffi/cairocffi-0.8.0-r1.ebuild new file mode 100644 index 000000000000..ba91b5f72454 --- /dev/null +++ b/dev-python/cairocffi/cairocffi-0.8.0-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python2_7 python3_{6,7} ) + +inherit distutils-r1 virtualx + +MY_PN="${PN}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="CFFI-based drop-in replacement for Pycairo" +HOMEPAGE="https://github.com/Kozea/cairocffi" +SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 x86" +IUSE="doc test" +RESTRICT="!test? ( test )" + +RDEPEND=" + $(python_gen_cond_dep '>=dev-python/cffi-1.1.0:=[${PYTHON_USEDEP}]' 'python*') + >=dev-python/xcffib-0.3.2[${PYTHON_USEDEP}] + x11-libs/cairo:0=[X,xcb(+)] + x11-libs/gdk-pixbuf[jpeg]" + +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( + ${RDEPEND} + dev-python/pytest[${PYTHON_USEDEP}] + )" + +PATCHES=( "${FILESDIR}"/${P}-tests.patch ) + +S="${WORKDIR}/${MY_P}" + +python_compile_all() { + use doc && esetup.py build_sphinx +} + +python_test() { + virtx py.test -v --pyargs cairocffi +} + +python_install_all() { + use doc && HTML_DOCS=( docs/_build/html/. ) + distutils-r1_python_install_all +} diff --git a/dev-python/cairocffi/cairocffi-0.9.0-r1.ebuild b/dev-python/cairocffi/cairocffi-0.9.0-r1.ebuild new file mode 100644 index 000000000000..6793e7f9b0ea --- /dev/null +++ b/dev-python/cairocffi/cairocffi-0.9.0-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python2_7 python3_{6..9} ) + +inherit distutils-r1 virtualx + +MY_PN="${PN}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="CFFI-based drop-in replacement for Pycairo" +HOMEPAGE="https://github.com/Kozea/cairocffi" +SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +distutils_enable_sphinx docs + +RDEPEND=" + $(python_gen_cond_dep '>=dev-python/cffi-1.1.0:=[${PYTHON_USEDEP}]' 'python*') + >=dev-python/xcffib-0.3.2[${PYTHON_USEDEP}] + x11-libs/cairo:0=[X,xcb(+)] + x11-libs/gdk-pixbuf[jpeg]" + +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + ${RDEPEND} + dev-python/pytest[${PYTHON_USEDEP}] + )" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( "${FILESDIR}"/${PN}-0.8.0-tests.patch ) + +python_prepare() { + if python_is_python3; then + # Remove deprecated statements for python3 + sed -i -e 's/tostring/tobytes/g' cairocffi/test_cairo.py || die + fi +} + +python_test() { + virtx py.test -v --pyargs cairocffi -o addopts= +} diff --git a/dev-python/cairocffi/cairocffi-1.1.0.ebuild b/dev-python/cairocffi/cairocffi-1.1.0.ebuild new file mode 100644 index 000000000000..29fbbca716f4 --- /dev/null +++ b/dev-python/cairocffi/cairocffi-1.1.0.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{6..9} ) + +inherit distutils-r1 virtualx + +DESCRIPTION="CFFI-based drop-in replacement for Pycairo" +HOMEPAGE="https://github.com/Kozea/cairocffi" +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 x86" + +RDEPEND=" + $(python_gen_cond_dep ' + >=dev-python/cffi-1.1.0:=[${PYTHON_USEDEP}] + ' 'python*') + >=dev-python/xcffib-0.3.2[${PYTHON_USEDEP}] + x11-libs/cairo:0=[X,xcb(+)] + x11-libs/gdk-pixbuf[jpeg]" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${PN}-0.8.0-tests.patch + "${FILESDIR}"/${PN}-1.0.2-test-deps.patch +) + +python_test() { + virtx pytest -vv --pyargs cairocffi +} diff --git a/dev-python/cairocffi/files/cairocffi-0.8.0-tests.patch b/dev-python/cairocffi/files/cairocffi-0.8.0-tests.patch new file mode 100644 index 000000000000..88ee2b0a0d5d --- /dev/null +++ b/dev-python/cairocffi/files/cairocffi-0.8.0-tests.patch @@ -0,0 +1,25 @@ +Skip tests which interact with the root window due to permission failures. + +--- cairocffi-0.8.0/cairocffi/test_xcb.py ++++ cairocffi-0.8.0/cairocffi/test_xcb.py +@@ -118,14 +118,14 @@ + gc = create_gc(xcb_conn) + + # create XCB surface on pixmap +- root_visual = find_root_visual(xcb_conn) +- surface = XCBSurface(xcb_conn, pixmap, root_visual, width, height) +- assert surface ++ #root_visual = find_root_visual(xcb_conn) ++ #surface = XCBSurface(xcb_conn, pixmap, root_visual, width, height) ++ #assert surface + + # use xcb surface to create context, draw white +- ctx = Context(surface) +- ctx.set_source_rgb(1, 1, 1) +- ctx.paint() ++ #ctx = Context(surface) ++ #ctx.set_source_rgb(1, 1, 1) ++ #ctx.paint() + + # map the window and wait for it to appear + xcb_conn.core.MapWindow(wid) diff --git a/dev-python/cairocffi/files/cairocffi-1.0.2-test-deps.patch b/dev-python/cairocffi/files/cairocffi-1.0.2-test-deps.patch new file mode 100644 index 000000000000..d6da32523d79 --- /dev/null +++ b/dev-python/cairocffi/files/cairocffi-1.0.2-test-deps.patch @@ -0,0 +1,41 @@ +Remove unnecessary test deps. + +--- cairocffi-1.0.2/setup.cfg ++++ cairocffi-1.0.2/setup.cfg +@@ -36,16 +36,10 @@ + packages = find: + setup_requires = + cffi >= 1.1.0 +- pytest-runner + setuptools + install_requires = + cffi >= 1.1.0 + setuptools >= 39.2.0 +-tests_require = +- pytest-cov +- pytest-flake8 +- pytest-isort +- pytest-runner + python_requires = >= 3.5 + + [options.package_data] +@@ -58,11 +52,6 @@ + doc = + sphinx + sphinx_rtd_theme +-test = +- pytest-runner +- pytest-cov +- pytest-flake8 +- pytest-isort + xcb = + xcffib >= 0.3.2 + +@@ -74,7 +63,6 @@ + test = pytest + + [tool:pytest] +-addopts = --flake8 --isort + norecursedirs = build dist .cache .eggs .git + + [flake8] diff --git a/dev-python/cairocffi/metadata.xml b/dev-python/cairocffi/metadata.xml new file mode 100644 index 000000000000..9e9326570338 --- /dev/null +++ b/dev-python/cairocffi/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <upstream> + <remote-id type="pypi">cairocffi</remote-id> + <remote-id type="github">Kozea/cairocffi</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> |
