git: 93b107b12f53 - main - graphics/py-vispy: New port: High-performance interactive 2D/3D data visualization library
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 07 Sep 2024 06:25:05 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=93b107b12f535c42dcc7fe457516796767c74301 commit 93b107b12f535c42dcc7fe457516796767c74301 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2024-09-07 04:28:21 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2024-09-07 06:24:50 +0000 graphics/py-vispy: New port: High-performance interactive 2D/3D data visualization library --- graphics/Makefile | 1 + graphics/py-vispy/Makefile | 33 ++++++++++++++++++++++ graphics/py-vispy/distinfo | 3 ++ graphics/py-vispy/files/patch-pyproject.toml | 11 ++++++++ .../files/patch-vispy_util_dpi_____init____.py | 11 ++++++++ .../files/patch-vispy_util_fonts___freetype.py | 11 ++++++++ .../files/patch-vispy_util_fonts___triage.py | 12 ++++++++ graphics/py-vispy/pkg-descr | 3 ++ 8 files changed, 85 insertions(+) diff --git a/graphics/Makefile b/graphics/Makefile index 82e21992a16e..417cc6998319 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -1008,6 +1008,7 @@ SUBDIR += py-urbansim SUBDIR += py-utm SUBDIR += py-vecrec + SUBDIR += py-vispy SUBDIR += py-visvis SUBDIR += py-wand SUBDIR += py-webcolors diff --git a/graphics/py-vispy/Makefile b/graphics/py-vispy/Makefile new file mode 100644 index 000000000000..4b96f5d51cdc --- /dev/null +++ b/graphics/py-vispy/Makefile @@ -0,0 +1,33 @@ +PORTNAME= vispy +DISTVERSION= 0.14.3 +CATEGORIES= graphics science python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= High-performance interactive 2D/3D data visualization library +WWW= https://vispy.org/ + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cython3>=3.0:lang/cython3@${PY_FLAVOR} \ + ${PYNUMPY} \ + ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=7.1:devel/py-setuptools-scm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}freetype-py>0:print/py-freetype-py@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}hsluv>0:graphics/py-hsluv@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}kiwisolver>0:math/py-kiwisolver@${PY_FLAVOR} \ + ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} + +USES= python +USE_PYTHON= pep517 autoplist pytest # pytest crashes on some tests, and then keeps restarting + +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/vispy/visuals/text/_sdf_cpu${PYTHON_EXT_SUFFIX}.so + +.include <bsd.port.mk> diff --git a/graphics/py-vispy/distinfo b/graphics/py-vispy/distinfo new file mode 100644 index 000000000000..59c9ad4bec40 --- /dev/null +++ b/graphics/py-vispy/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1725682365 +SHA256 (vispy-0.14.3.tar.gz) = efbbb847a908baf7e7169ab9bf296138a39364f367e6cb0a8ec03ad71699d31d +SIZE (vispy-0.14.3.tar.gz) = 2508703 diff --git a/graphics/py-vispy/files/patch-pyproject.toml b/graphics/py-vispy/files/patch-pyproject.toml new file mode 100644 index 000000000000..05cbb6a12162 --- /dev/null +++ b/graphics/py-vispy/files/patch-pyproject.toml @@ -0,0 +1,11 @@ +--- pyproject.toml.orig 2024-09-07 04:18:42 UTC ++++ pyproject.toml +@@ -3,7 +3,7 @@ requires = [ + "wheel", + "setuptools>=42", + # see https://numpy.org/devdocs/dev/depending_on_numpy.html#numpy-2-0-specific-advice +- "numpy>=2.0.0rc2", ++ "numpy", + "setuptools_scm[toml]>=7.1", + "Cython>=3.0.0" + ] diff --git a/graphics/py-vispy/files/patch-vispy_util_dpi_____init____.py b/graphics/py-vispy/files/patch-vispy_util_dpi_____init____.py new file mode 100644 index 000000000000..0c024a9ff26d --- /dev/null +++ b/graphics/py-vispy/files/patch-vispy_util_dpi_____init____.py @@ -0,0 +1,11 @@ +--- vispy/util/dpi/__init__.py.orig 2023-09-09 07:30:09 UTC ++++ vispy/util/dpi/__init__.py +@@ -11,6 +11,8 @@ __all__ = ['get_dpi'] + + if sys.platform.startswith('linux'): + from ._linux import get_dpi ++elif sys.platform.startswith('freebsd'): ++ from ._linux import get_dpi + elif sys.platform == 'darwin': + from ._quartz import get_dpi + elif sys.platform.startswith('win'): diff --git a/graphics/py-vispy/files/patch-vispy_util_fonts___freetype.py b/graphics/py-vispy/files/patch-vispy_util_fonts___freetype.py new file mode 100644 index 000000000000..868e6cac5121 --- /dev/null +++ b/graphics/py-vispy/files/patch-vispy_util_fonts___freetype.py @@ -0,0 +1,11 @@ +--- vispy/util/fonts/_freetype.py.orig 2023-09-09 07:33:03 UTC ++++ vispy/util/fonts/_freetype.py +@@ -14,6 +14,8 @@ import numpy as np + from ._vispy_fonts import _vispy_fonts, _get_vispy_font_filename + if sys.platform.startswith('linux'): + from ...ext.fontconfig import find_font ++elif sys.platform.startswith('freebsd'): ++ from ...ext.fontconfig import find_font + elif sys.platform.startswith('win'): + from ._win32 import find_font # noqa, analysis:ignore + else: diff --git a/graphics/py-vispy/files/patch-vispy_util_fonts___triage.py b/graphics/py-vispy/files/patch-vispy_util_fonts___triage.py new file mode 100644 index 000000000000..26730f182a02 --- /dev/null +++ b/graphics/py-vispy/files/patch-vispy_util_fonts___triage.py @@ -0,0 +1,12 @@ +--- vispy/util/fonts/_triage.py.orig 2023-09-09 07:31:17 UTC ++++ vispy/util/fonts/_triage.py +@@ -10,6 +10,9 @@ from ._vispy_fonts import _vispy_fonts + if sys.platform.startswith('linux'): + from ._freetype import _load_glyph + from ...ext.fontconfig import _list_fonts ++elif sys.platform.startswith('freebsd'): ++ from ._freetype import _load_glyph ++ from ...ext.fontconfig import _list_fonts + elif sys.platform == 'darwin': + from ._quartz import _load_glyph, _list_fonts + elif sys.platform.startswith('win'): diff --git a/graphics/py-vispy/pkg-descr b/graphics/py-vispy/pkg-descr new file mode 100644 index 000000000000..0ecb213f15ae --- /dev/null +++ b/graphics/py-vispy/pkg-descr @@ -0,0 +1,3 @@ +VisPy is a high-performance interactive 2D/3D data visualization library +leveraging the computational power of modern Graphics Processing Units +(GPUs) through the OpenGL library to display very large datasets.