diff --git a/graphics/py-gizeh/Makefile b/graphics/py-gizeh/Makefile index 52cbce34f59c..f86b7f4b5885 100644 --- a/graphics/py-gizeh/Makefile +++ b/graphics/py-gizeh/Makefile @@ -1,22 +1,30 @@ PORTNAME= gizeh -DISTVERSION= 0.1.11 -PORTREVISION= 6 +DISTVERSION= 0.1.12 CATEGORIES= graphics python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Simple vector graphics in Python WWW= https://github.com/Zulko/gizeh LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENCE.txt +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=61.0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cairocffi>0:graphics/py-cairocffi@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} USES= python -USE_PYTHON= autoplist distutils +USE_PYTHON= autoplist pep517 pytest NO_ARCH= yes +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + +do-test: + @cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest tests --ignore=tests/test_samples.py -p no:relaxed + +# tests as of 0.1.12: 1 passed + .include diff --git a/graphics/py-gizeh/distinfo b/graphics/py-gizeh/distinfo index d8387c903b72..905faba70d28 100644 --- a/graphics/py-gizeh/distinfo +++ b/graphics/py-gizeh/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1541326427 -SHA256 (gizeh-0.1.11.tar.gz) = a12422d4d16e8b3dbdf2d51cb6633855c460404ace34c6509db30f7e3d55177b -SIZE (gizeh-0.1.11.tar.gz) = 17068 +TIMESTAMP = 1780911498 +SHA256 (gizeh-0.1.12.tar.gz) = f028d8a12fcea7b8cd21d0f9e7bcc4f24536c110577bdae44560f4d90176c4cb +SIZE (gizeh-0.1.12.tar.gz) = 18190 diff --git a/graphics/py-gizeh/files/patch-examples_roses.py b/graphics/py-gizeh/files/patch-examples_roses.py new file mode 100644 index 000000000000..229a69933063 --- /dev/null +++ b/graphics/py-gizeh/files/patch-examples_roses.py @@ -0,0 +1,13 @@ +-- Fix gcd import for Python 3.9+. + +--- examples/roses.py.orig 2026-06-08 09:41:52 UTC ++++ examples/roses.py +@@ -5,7 +5,7 @@ http://en.wikipedia.org/wiki/Rose_mathematics + http://en.wikipedia.org/wiki/Rose_mathematics + """ + +-from fractions import gcd ++from math import gcd + + import numpy as np + diff --git a/graphics/py-gizeh/files/patch-pyproject.toml b/graphics/py-gizeh/files/patch-pyproject.toml new file mode 100644 index 000000000000..69ce166f08e3 --- /dev/null +++ b/graphics/py-gizeh/files/patch-pyproject.toml @@ -0,0 +1,13 @@ +-- Exclude examples from being installed as a top-level package. + +--- pyproject.toml.orig 2026-06-08 09:40:15 UTC ++++ pyproject.toml +@@ -45,7 +45,7 @@ Issues = "https://github.com/Zulko/gizeh/issues" + Issues = "https://github.com/Zulko/gizeh/issues" + + [tool.setuptools.packages.find] +-exclude = ["docs*", "tests*"] ++exclude = ["docs*", "tests*", "examples*"] + + [tool.ruff] + target-version = "py37"