Updated flatcam and dependency galore / minor updates to other ebuilds

This commit is contained in:
layman
2022-11-27 22:14:54 +01:00
parent b722f6b0a1
commit 1a100e11bc
38 changed files with 1073 additions and 24 deletions
+11
View File
@@ -0,0 +1,11 @@
AUX vispy-0.12.0-use-local-demo-data.patch 7304 BLAKE2B d35e9b7a919f10eb558c44e28b8ad6204a9e8eb9a43eaa70e097a3f30149bf38a2d9c71f9ac03336d24e1950430c931a8df220c57c23b1656eb850f29a08148b SHA512 7d0f7bf0f6471071ff091bee24f2fb9881119e926206d28f5a16d67ac556e61a34727769e7e0fedb488596fe2cc6776f434de335f77bfb6ec7e813eb8b12f82d
DIST vispy-0.12.1.tar.gz 2461071 BLAKE2B 78198a1ced391e9b9f8c2f1cbfcd857276f33eba6575455672fd4caed420164dc66750313c9c0afd40c7217a3c513fb22b7d650068c7c2079d28a0de1163722d SHA512 e3988a843a7ce0c74a4d792c7ec848140f621b0db0ebc5d754ee016bc600b2e8ca33606a7463e2e61ed624c51952cd8745182f60a25928f6838fe27b67717b89
DIST vispy-20190506-d-crate.npz 77690 BLAKE2B e7335331551ca263df9d266bd7f333d42ab31af5bf1472613e8f4b91c8f511d6bf260e8e6995523b3349d993ebdb12620a54aaa80669d120bb3c5acd0323de24 SHA512 fed07482ef2ce2471fee1f7d82ec8b07610b42749d913051c98b6b018853fe8536831f6685586731d122175a33621c81cb55faed3ed689e4d34821df85b79961
DIST vispy-20190506-d-mona_lisa_sm.png 837399 BLAKE2B 1053de94a98fdfea51fd40bc27d550030e7da27605db517283cc3394323daa03f25d9b7c7d1e08032065f9ff6eae34db892f54601eb45f4efcd38b5279b92aa7 SHA512 91c09bafb5f87849b17fffe99736eb905a6778ad1fcfb29548149ad45f952a75668bec019dfc0b67989fed85bbf8c79ca9832bb4386b1082bc41f55e1e08d924
DIST vispy-20190506-d-mri.npz 4074541 BLAKE2B 3e561213b34cff7e69e2606352f25c58ed3f9cb3158255826fdc54fd6ed71d607ce730547c03042c4668f99ae424348e1500cc42fb1d425f6b91d7f3f0d691a8 SHA512 d31eea95908429250f609fff56a4d6a5650117e5c868e99b3d087c12d098d238305d7bee31ebe2fb37dbbcd6cd347892a0421785c65801d46fc6bae79570972a
DIST vispy-20190506-d-spot.obj.gz 108255 BLAKE2B 15ef6bd58fa1bc29414ca51cc4563ab4be73ccf961b253ae7afbaf3210fd432e968220f86e58672f92cef2ed525300fb0ff0365eb0c9597d684d7650bf218398 SHA512 c354258c48ca5a7fa2f0838a977cc46cc65f5a6b9c36ad70f16e992bac44ced1c1ea3c2a1fc61103288717b8b851e0f4a830bfaa904d1c806d2922c1c8c0894e
DIST vispy-20190506-d-spot.png 78699 BLAKE2B 8188da450812f6f2457685915e7183c740cd6f0ce765122205eb85409c2645d18fd6be5236cb6d072a81e7674ebcbd3daa7efcbf1db7936ffabc021e10ef3dba SHA512 0a548d57a35c93cc95109111a4edeea8042f7e5b264a2ff10bf2610ed0d39a4f4c48e8d4e15ff9c663db9162d119044236309eb9679a9291790372872a7a4a06
DIST vispy-20190506-d-stent.npz 824612 BLAKE2B 47d93e7f66937a39c17e8b4491977c072f35e0d459eb304c1dc0115345415a439c5bff92252d43452e98ad74c5cef16e80077b8aa826aa4cd50aea1b0f388f8d SHA512 00ba59177f5dd20687c56f549b3f24b312971202f9d641b54d33e5a1eb98f6a9635b5d17e89c00062755f669d1fa5a14fa88474f35bce7a7fea011f16e7b2fa9
DIST vispy-20190506-d-triceratops.obj.gz 143970 BLAKE2B 932f7b655f6d200174f5081d66453bb2c36d6a97600b91e863f5172c4765bcc95c2b7e7e3c58a95735d6228096533c37f494b4b047d718f9d35d3a83fc269cc8 SHA512 6f2236e7f2c96b2055f60355979d766847b0b9c44f6a2a931a0bae4e56f50328260a54cc34c5bbf506f3c162684c581d54d67ec8389964c62645a2f3e721f0f0
EBUILD vispy-0.12.1.ebuild 3811 BLAKE2B 5c86a4683dba59f52da8c66caa05c9ffa86148a4ef996aca43d7cc31b375d343a88d5bb2b596eb4690a047423bd10f98d0057f6964d56c6b422295644d9503b4 SHA512 166cd04aa3d07601bb27528e8f5d014ab554e54bffea113f639de9d9da9373010536f65acd8531cc3459a259ca0668269b064e577b28b89d3ba9556c9da83c93
MISC metadata.xml 1456 BLAKE2B fc50e63b861486204d61e43f30da8482b9ed93aeaed63db6138f91e514b20c0253a3ecb0ae5a1fa91b4880efbce659403cd4f0022277c6cabba147ac0f799606 SHA512 e6b44279855e4f127e46a8953bc9a74b60f6a706a49f584de1a12e56f8d2994b5f8c13e36aeaa1dc7e713ae2299ef91a4e39c9c03325d3bb4bb3abd38c58c873
@@ -0,0 +1,180 @@
--- a/examples/plotting/volume_plot.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/plotting/volume_plot.py 2022-07-26 20:45:34.932699691 +0800
@@ -15,7 +15,8 @@
fig = vp.Fig(bgcolor='k', size=(800, 800), show=False)
-vol_data = np.load(io.load_data_file('brain/mri.npz'))['data']
+try: vol_data = np.load(io.load_data_file('brain/mri.npz'))['data']
+except Exception: vol_data = np.load('mri.npz')['data']
vol_data = np.flipud(np.rollaxis(vol_data, 1))
vol_data = vol_data.astype(np.float32)
--- a/examples/scene/clipping_planes.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/scene/clipping_planes.py 2022-07-26 19:36:08.699950700 +0800
@@ -24,7 +24,8 @@
view = canvas.central_widget.add_view()
# Create the visuals
-vol = np.load(io.load_data_file('volume/stent.npz'))['arr_0']
+try: vol = np.load(io.load_data_file('volume/stent.npz'))['arr_0']
+except Exception: vol = np.load('stent.npz')['arr_0']
volume = scene.visuals.Volume(vol, parent=view.scene, threshold=0.225)
np.random.seed(1)
--- a/examples/scene/contour.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/scene/contour.py 2022-07-26 14:56:04.667132876 +0800
@@ -24,7 +24,8 @@
view = canvas.central_widget.add_view()
interpolation = 'cubic'
-img_data = read_png(load_data_file('mona_lisa/mona_lisa_sm.png'))
+try: img_data = read_png(load_data_file('mona_lisa/mona_lisa_sm.png'))
+except Exception: img_data = read_png('mona_lisa_sm.png')
image = scene.visuals.Image(img_data, interpolation=interpolation,
parent=view.scene, method='impostor')
level = 10
--- a/examples/scene/flipped_axis.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/scene/flipped_axis.py 2022-07-26 19:37:26.926953177 +0800
@@ -27,7 +27,8 @@
from vispy import app, scene, io
# Read volume
-vol1 = np.load(io.load_data_file('volume/stent.npz'))['arr_0']
+try: vol1 = np.load(io.load_data_file('volume/stent.npz'))['arr_0']
+except Exception: vol1 = np.load('stent.npz')['arr_0']
# Prepare canvas
canvas = scene.SceneCanvas(keys='interactive', size=(800, 600), show=True)
--- a/examples/scene/image_custom_kernel.py 2022-11-08 17:13:28.000000000 +0800
+++ b/examples/scene/image_custom_kernel.py 2022-11-11 18:48:20.187045450 +0800
@@ -32,10 +32,14 @@
view = canvas.central_widget.add_view()
# Load the image with a slight blur (so we can later show the sharpening filter)
-img_data = gaussian_filter(
- read_png(load_data_file('mona_lisa/mona_lisa_sm.png')),
- sigma=1,
-)
+try: img_data = gaussian_filter(
+ read_png(load_data_file('mona_lisa/mona_lisa_sm.png')),
+ sigma=1,
+ )
+except Exception: img_data = gaussian_filter(
+ read_png('mona_lisa_sm.png'),
+ sigma=1,
+ )
# build gaussian kernel
small_gaussian_window = gaussian(5, 1)
--- a/examples/scene/image.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/scene/image.py 2022-07-26 19:28:07.967807623 +0800
@@ -25,7 +25,8 @@
view = canvas.central_widget.add_view()
# Create the image
-img_data = read_png(load_data_file('mona_lisa/mona_lisa_sm.png'))
+try: img_data = read_png(load_data_file('mona_lisa/mona_lisa_sm.png'))
+except Exception: img_data = read_png('mona_lisa_sm.png')
interpolation = 'nearest'
image = scene.visuals.Image(img_data, interpolation=interpolation,
--- a/examples/scene/mesh_normals.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/scene/mesh_normals.py 2022-07-26 19:44:23.872044303 +0800
@@ -17,7 +17,8 @@
from vispy.visuals.filters import WireframeFilter
-mesh_file = load_data_file('orig/triceratops.obj.gz')
+try: mesh_file = load_data_file('orig/triceratops.obj.gz')
+except Exception: mesh_file = 'triceratops.obj.gz'
vertices, faces, _, _ = read_mesh(mesh_file)
mesh = Mesh(vertices, faces, shading='flat')
--- a/examples/scene/mesh_shading.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/scene/mesh_shading.py 2022-07-26 19:50:49.250307944 +0800
@@ -21,7 +21,8 @@
parser = argparse.ArgumentParser()
-default_mesh = load_data_file('orig/triceratops.obj.gz')
+try: default_mesh = load_data_file('orig/triceratops.obj.gz')
+except Exception: default_mesh = 'triceratops.obj.gz'
parser.add_argument('--mesh', default=default_mesh)
parser.add_argument('--shininess', default=100)
parser.add_argument('--wireframe-width', default=1)
--- a/examples/scene/mesh_texture.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/scene/mesh_texture.py 2022-07-26 19:30:50.795219791 +0800
@@ -27,8 +27,10 @@
help="shading mode")
args, _ = parser.parse_known_args()
-mesh_path = load_data_file('spot/spot.obj.gz')
-texture_path = load_data_file('spot/spot.png')
+try: mesh_path = load_data_file('spot/spot.obj.gz')
+except Exception: mesh_path = 'spot.obj.gz'
+try: texture_path = load_data_file('spot/spot.png')
+except Exception: texture_path = 'spot.png'
vertices, faces, normals, texcoords = read_mesh(mesh_path)
texture = np.flipud(imread(texture_path))
--- a/examples/scene/one_cam_two_scenes.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/scene/one_cam_two_scenes.py 2022-07-26 20:29:47.386543725 +0800
@@ -31,7 +31,8 @@
grid.add_widget(vb2, 0, 1)
# Create the image
-im1 = io.load_crate().astype('float32') / 255
+try: im1 = io.load_crate().astype('float32') / 255
+except Exception: im1 = np.load('crate.npz')['crate'].astype('float32') / 255
# Make gray, smooth, and take derivatives: edge enhancement
im2 = im1[:, :, 1]
im2 = (im2[1:-1, 1:-1] + im2[0:-2, 1:-1] + im2[2:, 1:-1] +
--- a/examples/scene/one_scene_four_cams.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/scene/one_scene_four_cams.py 2022-07-26 20:31:14.493566153 +0800
@@ -20,6 +20,8 @@
import sys
+import numpy as np
+
from vispy import app, scene, io
canvas = scene.SceneCanvas(keys='interactive')
@@ -42,7 +44,8 @@
grid.add_widget(vb4, 1, 1)
# Create some visuals to show
-im1 = io.load_crate().astype('float32') / 255
+try: im1 = io.load_crate().astype('float32') / 255
+except Exception: im1 = np.load('crate.npz')['crate'].astype('float32') / 255
for par in scenes:
image = scene.visuals.Image(im1, grid=(20, 20), parent=par)
--- a/examples/scene/volume_plane.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/scene/volume_plane.py 2022-07-26 20:30:56.050157494 +0800
@@ -25,7 +25,8 @@
from vispy.visuals.transforms import STTransform
# Read volume
-vol = np.load(io.load_data_file('volume/stent.npz'))['arr_0']
+try: vol = np.load(io.load_data_file('volume/stent.npz'))['arr_0']
+except Exception: vol = np.load('stent.npz')['arr_0']
# Prepare canvas
canvas = scene.SceneCanvas(keys='interactive', show=True)
--- a/examples/scene/volume.py 2022-07-04 22:38:36.000000000 +0800
+++ b/examples/scene/volume.py 2022-07-26 20:22:35.644780291 +0800
@@ -39,8 +39,10 @@
from vispy.visuals.transforms import STTransform
# Read volume
-vol1 = np.load(io.load_data_file('volume/stent.npz'))['arr_0']
-vol2 = np.load(io.load_data_file('brain/mri.npz'))['data']
+try: vol1 = np.load(io.load_data_file('volume/stent.npz'))['arr_0']
+except Exception: vol1 = np.load('stent.npz')['arr_0']
+try: vol2 = np.load(io.load_data_file('brain/mri.npz'))['data']
+except Exception: vol2 = np.load('mri.npz')['data']
vol2 = np.flipud(np.rollaxis(vol2, 1))
# Prepare canvas
+28
View File
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>universebenzene@sina.com</email>
<name>Astro Benzene</name>
</maintainer>
<longdescription lang="en">
VisPy is a high-performance interactive 2D/3D data visualization library.
VisPy leverages the computational power of modern Graphics Processing Units (GPUs)
through the OpenGL library to display very large datasets.
</longdescription>
<upstream>
<remote-id type="pypi">vispy</remote-id>
<remote-id type="github">vispy/vispy</remote-id>
</upstream>
<use>
<flag name="io">Extra io support</flag>
<flag name="ipython-static">ipython-static support via <pkg>dev-python/ipython</pkg></flag>
<flag name="pyglet">Enable support for pyglet backend via <pkg>dev-python/pyglet</pkg></flag>
<flag name="pyqt5">Enable support for pyqt5 backend via <pkg>dev-python/PyQt5</pkg></flag>
<flag name="pyqt6">Enable support for pyqt6 backend via <pkg>dev-python/PyQt6</pkg></flag>
<flag name="pyside2">Enable support for pyside2 backend via <pkg>dev-python/pyside2</pkg></flag>
<flag name="pyside6">Enable support for pyside6 backend via <pkg>dev-python/pyside6</pkg></flag>
<flag name="sdl2">Enable support for sdl backend via <pkg>dev-python/PySDL2</pkg></flag>
<flag name="wx">Enable support for wx backend via <pkg>dev-python/wxpython</pkg></flag>
</use>
</pkgmetadata>
+113
View File
@@ -0,0 +1,113 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..10} )
DATA_COM="5a3db8447d3e13ed402545662f20f5ff191a6d42"
DATA_DATE="20190506"
inherit distutils-r1 virtualx xdg-utils
DESCRIPTION="Interactive visualization in Python"
HOMEPAGE="http://vispy.org"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
doc? (
https://github.com/vispy/demo-data/raw/${DATA_COM}/mona_lisa/mona_lisa_sm.png -> ${PN}-${DATA_DATE}-d-mona_lisa_sm.png
https://github.com/vispy/demo-data/raw/${DATA_COM}/spot/spot.obj.gz -> ${PN}-${DATA_DATE}-d-spot.obj.gz
https://github.com/vispy/demo-data/raw/${DATA_COM}/spot/spot.png -> ${PN}-${DATA_DATE}-d-spot.png
https://github.com/vispy/demo-data/raw/${DATA_COM}/volume/stent.npz -> ${PN}-${DATA_DATE}-d-stent.npz
https://github.com/vispy/demo-data/raw/${DATA_COM}/orig/triceratops.obj.gz -> ${PN}-${DATA_DATE}-d-triceratops.obj.gz
https://github.com/vispy/demo-data/raw/${DATA_COM}/orig/crate.npz -> ${PN}-${DATA_DATE}-d-crate.npz
https://github.com/vispy/demo-data/raw/${DATA_COM}/brain/mri.npz -> ${PN}-${DATA_DATE}-d-mri.npz
)
"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64" # no x86 KEYWORD for meshio PyQt6 pyside6
IUSE="examples io ipython-static pyglet +pyqt5 pyqt6 pyside2 pyside6 sdl2 wx"
PROPERTIES="test_network"
RESTRICT="test"
REQUIRED_USE="|| ( pyglet pyqt5 pyqt6 pyside2 pyside6 sdl2 wx )"
DEPEND="dev-python/numpy[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}
dev-python/freetype-py[${PYTHON_USEDEP}]
dev-python/hsluv[${PYTHON_USEDEP}]
dev-python/kiwisolver[${PYTHON_USEDEP}]
dev-python/packaging[${PYTHON_USEDEP}]
io? (
dev-python/meshio[${PYTHON_USEDEP}]
dev-python/pillow[${PYTHON_USEDEP}]
)
ipython-static? ( dev-python/ipython[${PYTHON_USEDEP}] )
pyglet? ( >=dev-python/pyglet-1.2[${PYTHON_USEDEP}] )
pyqt5? ( dev-python/PyQt5[${PYTHON_USEDEP},gui,testlib,widgets] )
pyqt6? ( dev-python/PyQt6[${PYTHON_USEDEP},gui,testlib,widgets] )
pyside2? ( dev-python/pyside2[${PYTHON_USEDEP},gui,testlib,widgets] )
pyside6? ( dev-python/pyside6[${PYTHON_USEDEP},gui,testlib,widgets] )
sdl2? ( dev-python/PySDL2[${PYTHON_USEDEP}] )
wx? ( dev-python/wxpython[${PYTHON_USEDEP}] )
"
BDEPEND="dev-python/setuptools_scm_git_archive[${PYTHON_USEDEP}]
>=dev-python/cython-0.29.2[${PYTHON_USEDEP}]
doc? (
media-libs/fontconfig
virtual/opengl
)
test? (
dev-python/imageio[${PYTHON_USEDEP}]
dev-python/meshio[${PYTHON_USEDEP}]
dev-python/networkx[${PYTHON_USEDEP}]
dev-python/numpydoc[${PYTHON_USEDEP}]
dev-python/pyopengl[${PYTHON_USEDEP}]
dev-python/sphinx-gallery[${PYTHON_USEDEP}]
media-libs/fontconfig
virtual/opengl
)
"
distutils_enable_tests pytest
# QThread: Destroyed while thread is still running
distutils_enable_sphinx doc dev-python/sphinx-gallery \
dev-python/sphinxcontrib-apidoc \
dev-python/pydata-sphinx-theme \
dev-python/imageio \
dev-python/myst_parser \
dev-python/networkx \
dev-python/numpydoc \
dev-python/pyopengl \
dev-python/pytest
python_prepare_all() {
use doc && { eapply "${FILESDIR}"/${PN}-0.12.0-use-local-demo-data.patch ; \
for dat in "${DISTDIR}"/*-d-*; do { cp ${dat} "${S}"/examples/scene/${dat##*-d-} || die ; } ; done ; \
cp {"${DISTDIR}"/${PN}-${DATA_DATE}-d-,"${S}"/examples/plotting/}mri.npz || die ; }
xdg_environment_reset
distutils-r1_python_prepare_all
}
python_compile_all() {
if use doc; then
cp "${BUILD_DIR}"/install/$(python_get_sitedir)/${PN}/visuals/text/*.cpython*so ${PN}/visuals/text || die
virtx sphinx_compile_all
fi
}
python_install_all() {
if use examples; then
docompress -x "/usr/share/doc/${PF}/examples"
docinto examples
dodoc -r examples/.
fi
distutils-r1_python_install_all
}
python_test() {
virtx epytest "${BUILD_DIR}"
}