## START: Set by rpmautospec ## (rpmautospec version 0.6.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pypi_name vispy Name: python-%{pypi_name} Version: 0.14.2 Release: %{autorelease} Summary: Interactive visualization in Python %global forgeurl0 https://github.com/vispy/vispy %global forgeurl1 https://github.com/vispy/test-data %global tag1 test-data-10 %forgemeta -a License: BSD-3-Clause URL: http://vispy.org/ Source0: %forgesource0 Source1: %forgesource1 # Add missing `glfw` extra # https://github.com/vispy/vispy/issues/2591 Patch: https://github.com/vispy/vispy/pull/2592.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: gcc BuildRequires: git-core BuildRequires: libglvnd-gles BuildRequires: libXi BuildRequires: mesa-dri-drivers BuildRequires: mesa-libEGL BuildRequires: mesa-libGL BuildRequires: python3-devel BuildRequires: python3dist(pytest) # Tests need `QtOpenGLWidgets` which is not in the base package. BuildRequires: python3-pyqt6 BuildRequires: (xdpyinfo or xrandr) BuildRequires: xorg-x11-server-Xvfb %global _description %{expand: 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. Applications of VisPy include: - High-quality interactive scientific plots with millions of points - Direct visualization of real-time data - Fast interactive visualization of 3D models (meshes, volume rendering) - OpenGL visualization demos - Scientific GUIs with fast, scalable visualization widgets (Qt or IPython notebook with WebGL)} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} Requires: (xdpyinfo or xrandr) Requires: (python3-pyqt6 if (python3-vispy+pyqt6 or python3-vispy+pyside6)) %description -n python3-%{pypi_name} %_description # Excluded extra's: # `pyside` - deprecated Qt4 bindings (use PySide6 and Qt6) # `pyside2` - deprecated Ot5 bindings (use PySide6 and Qt6) %pyproject_extras_subpkg -n python3-%{pypi_name} ipython-static pyglet pyqt5 pyqt6 pyside6 glfw sdl2 wx tk io %prep %forgeautosetup -p1 # Install test data (needs git repo) mkdir -p %{_builddir}/.vispy/test_data pushd %{_builddir}/.vispy/test_data tar xzf %{SOURCE1} --strip-components=1 git init git config user.name "Fedora" git config user.email "fedora@example.org" git add --all git commit -m "[Fedora] Test data for vispy" git tag %tag1 popd sed -r \ -e 's/oldest-supported-numpy/numpy/' \ -i pyproject.toml # Disable coverage for tests sed -r \ -e 's/coverage=True/coverage=False/' \ -i make/make.py %generate_buildrequires %pyproject_buildrequires -x ipython-static,pyglet,pyqt5,pyqt6,pyside6,glfw,sdl2,wx,tk,io %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{pypi_name} %check # https://github.com/vispy/vispy/blob/main/.github/workflows/main.yml # Start xvfb mkdir tmp export DISPLAY=:99.0 Xvfb :99 -screen 0 1400x900x24 -ac +extension GLX +render >/dev/null 2>&1 & sleep 5 # Tests requiring network k="${k-}${k+ and }not test_read_write_image" k="${k-}${k+ and }not test_wavefront" k="${k-}${k+ and }not test_config" k="${k-}${k+ and }not test_perspective_render" k="${k-}${k+ and }not test_panzoom" k="${k-}${k+ and }not test_turntable_gesture_zoom" k="${k-}${k+ and }not test_perspective_render" # Failing `pyglet` tests # AttributeError: module 'pyglet.window' has no attribute 'get_platform' pyglet="${pyglet-}${pyglet+ and }not test_fs" # AssertionError: assert 343 <= (3 + 20) pyglet="${pyglet-}${pyglet+ and }not test_multiple_canvases" # Failing `pyqt6` tests # Fatal Python error: Segmentation fault pyqt6="${pyqt6-}${pyqt6+ and }not test_run" # Failing `pyside6` tests # Fatal Python error: Segmentation fault pyside6="${pyside6-}${pyside6+ and }not test_functionality_proxy" pyside6="${pyside6-}${pyside6+ and }not test_init" pyside6="${pyside6-}${pyside6+ and }not test_run" # Failing `wx` tests # AssertionError wx="${wx-}${wx+ and }not test_canvas_render" wx="${wx-}${wx+ and }not test_blend_presets" # Failing `tkinter` tests # Fatal Python error: Segmentation fault tk="${tk-}${tk+ and }not test_image_clims_and_gamma" # AssertionError tk="${tk-}${tk+ and }not test_canvas_render" tk="${tk-}${tk+ and }not test_blend_presets" %{py3_test_envvars} %{python3} -c "import vispy; print(vispy.sys_info())" # Upstream provides a utility for testing. # Usage: python3 make test # Passing args to the script fails. Call it without the wrapper. %{py3_test_envvars} HOME=%{_builddir} _VISPY_TESTING_APP=nobackend \ %{python3} -m pytest -v -m 'not vispy_app_test' \ ${k+-k }"${k-}" \ -ra %{buildroot}%{python3_sitearch}/vispy %{py3_test_envvars} HOME=%{_builddir} _VISPY_TESTING_APP=pyglet \ %{python3} -m pytest -v -m 'vispy_app_test' \ ${k+-k }"${k-}${pyglet+ and }${pyglet-}" \ -ra %{buildroot}%{python3_sitearch}/vispy %{py3_test_envvars} HOME=%{_builddir} _VISPY_TESTING_APP=pyqt5 \ %{python3} -m pytest -v -m 'vispy_app_test' \ ${k+-k }"${k-}" \ -ra %{buildroot}%{python3_sitearch}/vispy %{py3_test_envvars} HOME=%{_builddir} _VISPY_TESTING_APP=pyqt6 \ %{python3} -m pytest -v -m 'vispy_app_test' \ ${k+-k }"${k-}${pyqt6+ and }${pyqt6-}" \ -ra %{buildroot}%{python3_sitearch}/vispy %{py3_test_envvars} HOME=%{_builddir} _VISPY_TESTING_APP=pyside6 \ %{python3} -m pytest -v -m 'vispy_app_test' \ ${k+-k }"${k-}${pyside6+ and }${pyside6-}" \ -ra %{buildroot}%{python3_sitearch}/vispy %{py3_test_envvars} HOME=%{_builddir} _VISPY_TESTING_APP=glfw \ %{python3} -m pytest -v -m 'not vispy_app_test' \ ${k+-k }"${k-}" \ -ra %{buildroot}%{python3_sitearch}/vispy %{py3_test_envvars} HOME=%{_builddir} _VISPY_TESTING_APP=sdl2 \ %{python3} -m pytest -v -m 'vispy_app_test' \ ${k+-k }"${k-}" \ -ra %{buildroot}%{python3_sitearch}/vispy %{py3_test_envvars} HOME=%{_builddir} _VISPY_TESTING_APP=wx \ %{python3} -m pytest -v -m 'vispy_app_test' \ ${k+-k }"${k-}${wx+ and }${wx-}" \ -ra %{buildroot}%{python3_sitearch}/vispy %{py3_test_envvars} HOME=%{_builddir} _VISPY_TESTING_APP=tkinter \ %{python3} -m pytest -v -m 'vispy_app_test' \ ${k+-k }"${k-}${tk+ and }${tk-}" \ -ra %{buildroot}%{python3_sitearch}/vispy %files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.rst CHANGELOG.md CITATION.rst %changelog ## START: Generated by rpmautospec * Tue May 28 2024 Sandro - 0.14.2-5 - Add missing glfw extra * Tue May 28 2024 Sandro - 0.14.2-4 - Don't bother with old skool 32-bit arches * Tue May 28 2024 Sandro - 0.14.2-3 - Add pyqt5 extra and glfw dependency * Mon May 27 2024 Sandro - 0.14.2-2 - Add missing extras / backends * Mon May 27 2024 Sandro - 0.14.2-1 - Initial package ## END: Generated by rpmautospec