Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 May 2019 12:58:08 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r502792 - in head/graphics/py-cairocffi: . files
Message-ID:  <201905271258.x4RCw82e055045@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Mon May 27 12:58:08 2019
New Revision: 502792
URL: https://svnweb.freebsd.org/changeset/ports/502792

Log:
  graphics/py-cairocffi: Update to 1.0.2
  
    - Update COMMENT, match upstream setup.py:description
    - Update USES=python, now only supports Python 3.x
    - Switch to autoplist (using --record), update pkg-plist to add missing
      files until resolved upstream [1][2][3][4]
  
  Changelog:
  
    https://github.com/Kozea/cairocffi/blob/v1.0.2/NEWS.rst
  
  [1] https://github.com/Kozea/cairocffi/issues/108
  [2] https://github.com/spatialaudio/python-sounddevice/issues/116
  [3] https://github.com/tych0/xcffib/issues/92
  [4] See Also: https://groups.google.com/forum/#!topic/python-cffi/oX2T_Y5m99I
  
  PR:			237884
  Reviewed by:		mat, dch (maintainer)
  Approved by:		dch (maintainer)
  Differential Revision:	D20352

Added:
  head/graphics/py-cairocffi/files/
  head/graphics/py-cairocffi/files/patch-cairocffi_test__pixbuf.py   (contents, props changed)
  head/graphics/py-cairocffi/files/patch-setup.cfg   (contents, props changed)
Modified:
  head/graphics/py-cairocffi/Makefile
  head/graphics/py-cairocffi/distinfo   (contents, props changed)
  head/graphics/py-cairocffi/pkg-plist   (contents, props changed)

Modified: head/graphics/py-cairocffi/Makefile
==============================================================================
--- head/graphics/py-cairocffi/Makefile	Mon May 27 12:35:17 2019	(r502791)
+++ head/graphics/py-cairocffi/Makefile	Mon May 27 12:58:08 2019	(r502792)
@@ -2,23 +2,37 @@
 # $FreeBSD$
 
 PORTNAME=	cairocffi
-PORTVERSION=	0.8.0
-PORTREVISION=	2
+PORTVERSION=	1.0.2
 CATEGORIES=	graphics python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	dch@FreeBSD.org
-COMMENT=	Cairo cffi-based cairo bindings for Python
+COMMENT=	CFFI-based Cairo bindings for Python
 
 LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
-RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>0:devel/py-cffi@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}xcffib>=0.5.0:x11/py-xcffib@${PY_FLAVOR}
-BUILD_DEPENDS=	${RUN_DEPENDS}
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.1.0:devel/py-cffi@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.1.0:devel/py-cffi@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}xcffib>=0.3.2:x11/py-xcffib@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
+		gdk-pixbuf2>0:graphics/gdk-pixbuf2
 
-USES=		python
-USE_PYTHON=	distutils py3kplist
+USES=		gnome python:3.5+
 USE_GNOME=	cairo
+USE_PYTHON=	distutils autoplist
+
+# --record output is not complete so supplement autoplist w/ a plist for now
+# https://github.com/Kozea/cairocffi/issues/108
+
+# _generated files only exist after install not build
+# so copy them to the src directory so we can run tests against WRKSRC
+#
+# -v = verbose, -rs print skip reasons, -o override tox.ini/pytest.ini args
+do-test:
+	${CP} -Rp ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}/_generated ${WRKSRC}/${PORTNAME}
+	${TOUCH} ${WRKSRC}/${PORTNAME}/_generated/__init__.py
+	@cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts=
 
 .include <bsd.port.mk>

Modified: head/graphics/py-cairocffi/distinfo
==============================================================================
--- head/graphics/py-cairocffi/distinfo	Mon May 27 12:35:17 2019	(r502791)
+++ head/graphics/py-cairocffi/distinfo	Mon May 27 12:58:08 2019	(r502792)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1489019975
-SHA256 (cairocffi-0.8.0.tar.gz) = 65f21e6786e2b255ab1d3fda53a365a3565bb1808cabbbe59d99a797c61d3545
-SIZE (cairocffi-0.8.0.tar.gz) = 79217
+TIMESTAMP = 1558413044
+SHA256 (cairocffi-1.0.2.tar.gz) = 01ac51ae12c4324ca5809ce270f9dd1b67f5166fe63bd3e497e9ea3ca91946ff
+SIZE (cairocffi-1.0.2.tar.gz) = 68537

Added: head/graphics/py-cairocffi/files/patch-cairocffi_test__pixbuf.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/py-cairocffi/files/patch-cairocffi_test__pixbuf.py	Mon May 27 12:58:08 2019	(r502792)
@@ -0,0 +1,19 @@
+# Skip the test (module) if gdk_pixbuf can't be loaded
+# TODO: Report/resolve/PR upstream
+
+--- cairocffi/test_pixbuf.py.orig	2019-02-06 21:50:58 UTC
++++ cairocffi/test_pixbuf.py
+@@ -15,7 +15,12 @@ import zlib
+ 
+ import pytest
+ 
+-from . import constants, pixbuf
++from . import constants
++
++try:
++    from . import pixbuf
++except OSError:
++    pytestmark = pytest.mark.skip('Could not find/load gdk_pixbuf-2.0')
+ 
+ PNG_BYTES = base64.b64decode(
+     b'iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAE0lEQV'

Added: head/graphics/py-cairocffi/files/patch-setup.cfg
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/py-cairocffi/files/patch-setup.cfg	Mon May 27 12:58:08 2019	(r502792)
@@ -0,0 +1,14 @@
+# pytest-runner should be conditional on test arg provided to setup.py
+# it is only needed for tests, but we run pytest directly (for now)
+# TODO: Report/resolve upstream
+
+--- setup.cfg.orig	2019-05-21 10:20:51 UTC
++++ setup.cfg
+@@ -36,7 +36,6 @@ project_urls = 
+ packages = find:
+ setup_requires = 
+ 	cffi >= 1.1.0
+-	pytest-runner
+ 	setuptools
+ install_requires = 
+ 	cffi >= 1.1.0

Modified: head/graphics/py-cairocffi/pkg-plist
==============================================================================
--- head/graphics/py-cairocffi/pkg-plist	Mon May 27 12:35:17 2019	(r502791)
+++ head/graphics/py-cairocffi/pkg-plist	Mon May 27 12:58:08 2019	(r502792)
@@ -1,48 +1,6 @@
-%%PYTHON_SITELIBDIR%%/cairocffi/__init__.py
-%%PYTHON_SITELIBDIR%%/cairocffi/__init__.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/__init__.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/_ffi.py
-%%PYTHON_SITELIBDIR%%/cairocffi/_ffi.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/_ffi.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/_ffi_pixbuf.py
-%%PYTHON_SITELIBDIR%%/cairocffi/_ffi_pixbuf.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/_ffi_pixbuf.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/compat.py
-%%PYTHON_SITELIBDIR%%/cairocffi/compat.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/compat.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/constants.py
-%%PYTHON_SITELIBDIR%%/cairocffi/constants.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/constants.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/context.py
-%%PYTHON_SITELIBDIR%%/cairocffi/context.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/context.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/ffi_build.py
-%%PYTHON_SITELIBDIR%%/cairocffi/ffi_build.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/ffi_build.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/fonts.py
-%%PYTHON_SITELIBDIR%%/cairocffi/fonts.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/fonts.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/matrix.py
-%%PYTHON_SITELIBDIR%%/cairocffi/matrix.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/matrix.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/patterns.py
-%%PYTHON_SITELIBDIR%%/cairocffi/patterns.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/patterns.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/pixbuf.py
-%%PYTHON_SITELIBDIR%%/cairocffi/pixbuf.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/pixbuf.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/surfaces.py
-%%PYTHON_SITELIBDIR%%/cairocffi/surfaces.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/surfaces.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/test_cairo.py
-%%PYTHON_SITELIBDIR%%/cairocffi/test_cairo.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/test_cairo.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/test_pixbuf.py
-%%PYTHON_SITELIBDIR%%/cairocffi/test_pixbuf.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/test_pixbuf.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/test_xcb.py
-%%PYTHON_SITELIBDIR%%/cairocffi/test_xcb.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/test_xcb.pyo
-%%PYTHON_SITELIBDIR%%/cairocffi/xcb.py
-%%PYTHON_SITELIBDIR%%/cairocffi/xcb.pyc
-%%PYTHON_SITELIBDIR%%/cairocffi/xcb.pyo
+%%PYTHON_SITELIBDIR%%/cairocffi/_generated/__pycache__/ffi_pixbuf.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/cairocffi/_generated/__pycache__/ffi_pixbuf.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/cairocffi/_generated/__pycache__/ffi.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/cairocffi/_generated/__pycache__/ffi.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/cairocffi/_generated/ffi_pixbuf.py
+%%PYTHON_SITELIBDIR%%/cairocffi/_generated/ffi.py



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905271258.x4RCw82e055045>