## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 %bcond tests 1 Name: python-%{pypi_name} Version: 0.14.3 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 # BSD-2-Clause: vispy/ext/cubehelix.py # BSD-2-Clause-Views: vispy/glsl/build_spatial_filters.py # MIT: vispy/io/stl.py # LicenseRef-Fedora-Public-Domain: # - vispy/visuals/text/_sdf_gpu.py # - examples/demo/gloo/jfa/*.glsl # - examples/demo/gloo/jfa/*.py License: BSD-3-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND LicenseRef-Fedora-Public-Domain URL: http://vispy.org/ Source0: %forgesource0 Source1: %forgesource1 # 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 %if %{with tests} BuildRequires: %{py3_dist pytest-xvfb} # Tests need `QtOpenGLWidgets` which is not in the base package, which # provides `python3dist(pyqt6)` BuildRequires: python3-pyqt6 BuildRequires: (xdpyinfo or xrandr) %endif %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 %package doc Summary: Examples for %{pypi_name} Requires: python3dist(%{pypi_name}) = %{?epoch:%{epoch}:}%{version}-%{release} BuildArch: noarch %description doc Coding examples for all the backends supported by %{pypi_name}. %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 # Remove executable bit from examples find examples/ -type f -executable -exec chmod a-x '{}' \; # Remove shebang from modules for FILE in $(grep -rl '^#!.*python' vispy/) do sed -i '/^#!.*python/d' ${FILE} done %generate_buildrequires %pyproject_buildrequires -x ipython-static,pyglet,pyqt5,pyqt6,pyside6,glfw,sdl2,wx,tk,io%{?with_tests:,test} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{pypi_name} %check %if %{with tests} # https://github.com/vispy/vispy/blob/main/.github/workflows/main.yml # We start the X server in order to run `vispy.sysinfo()` 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" # Failing `pyglet` test # AssertionError: is not pyglet="${pyglet-}${pyglet+ and }not test_use_desktop" mkdir _test pushd _test # A bogus test just displaying `vispy.sys_info()` cat > test_show_sys_info.py < - 0.14.3-1 - Update to 0.14.3 - Review dependencies and use `test` extra for test dependencies - Review and amend License - Fix executable bits and shebangs - Review and rework tests * Tue May 28 2024 Sandro - 0.14.2-6 - Add examples and make test conditional * 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