#global commit db518f882c19b04c72d1be26f6a43bd0e611ee18 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: Mayavi Version: 4.8.2 Release: 4%{?dist} Summary: Scientific data 3-dimensional visualizer # Automatically converted from old format: BSD and EPL and LGPLv2+ and LGPLv2 and LGPLv3 - review is highly recommended. License: LicenseRef-Callaway-BSD AND LicenseRef-Callaway-EPL AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-LGPLv2 AND LGPL-3.0-only URL: http://code.enthought.com/projects/mayavi/ Source0: https://github.com/enthought/mayavi/archive/%{version}/mayavi-%{version}.tar.gz Source1: mayavi2.desktop # NumPy 2.x patch # https://github.com/enthought/mayavi/pull/1315 Patch: https://github.com/enthought/mayavi/pull/1315.patch BuildRequires: gcc BuildRequires: make BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-Cython BuildRequires: python%{python3_pkgversion}-setuptools # For tests BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-apptools BuildRequires: python%{python3_pkgversion}-qt5 BuildRequires: python%{python3_pkgversion}-traits BuildRequires: python%{python3_pkgversion}-traitsui BuildRequires: python%{python3_pkgversion}-numpy BuildRequires: python%{python3_pkgversion}-vtk # For HTML docs BuildRequires: /usr/bin/sphinx-build-3 Requires: python%{python3_pkgversion}-mayavi BuildRequires: desktop-file-utils BuildRequires: xorg-x11-server-Xvfb BuildRequires: xwayland-run %description The Mayavi project includes two related packages for 3-dimensional visualization: * Mayavi2: A tool for easy and interactive visualization of data. * TVTK: A Traits-based wrapper for the Visualization Toolkit, a popular open-source visualization library. These operate at different levels of abstraction. TVTK manipulates visualization objects, while Mayavi2 lets you operate on your data, and then see the results. Most users either use the Mayavi user interface or program to its scripting interface; you probably don't need to interact with TVTK unless you want to create a new Mayavi module. %package -n python%{python3_pkgversion}-mayavi Summary: Python 3 mayavi module Requires: python%{python3_pkgversion}-vtk Requires: python%{python3_pkgversion}-apptools Requires: python%{python3_pkgversion}-traitsui Requires: python%{python3_pkgversion}-envisage Requires: python%{python3_pkgversion}-pyface-qt %{?python_provide:%python_provide python%{python3_pkgversion}-mayavi} %description -n python%{python3_pkgversion}-mayavi Python 3 mayavi module %package doc Summary: Documentation for %{name} %description doc Documentation for %{name}. %prep %autosetup -p1 -n mayavi-%{version} # vtk not discoverable by pkg_resources sed -i -e "/^ *'vtk'/d" mayavi/__init__.py # Remove pregenerated C sources grep -lr '/\* Generated by Cython' | xargs rm -v # fix wrong-file-end-of-line-encoding for file in *.txt examples/mayavi/data/room_vis.wrl examples/tvtk/dscene.py \ examples/mayavi/interactive/wx_mayavi_embed*.py ; do sed "s|\r||g" $file > $file.new && \ touch -r $file $file.new && \ mv $file.new $file done # file-not-utf8 for file in *.txt docs/*.txt; do iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ touch -r $file $file.new && \ mv $file.new $file done # remove shebang for file in mayavi/scripts/*.py; do sed '/^#!\//, 1d' $file > $file.new && \ touch -r $file $file.new && \ mv $file.new $file done # fix shebang %py3_shebang_fix mayavi/scripts/mayavi2 mayavi/tests/{csv_files/csv_2_py,runtests.py} # remove exec permission find examples -type f -exec chmod 0644 {} ";" chmod 0644 mayavi/tests/data/cellsnd.ascii.inp %build # Recythonize the sources find -name '*.pyx' -exec cython --verbose {} \; %py3_build # Need xwfb-run for html doc building SPHINXBUILD=/usr/bin/sphinx-build-3 xwfb-run -- %{__python3} setup.py build_docs %install %py3_install # fix wrong-file-end-of-line-encoding for file in docs/build/mayavi/html/_downloads/wx_mayavi*.py; do sed "s|\r||g" $file > $file.new && \ touch -r $file $file.new && \ mv $file.new $file done mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/ cp -p docs/mayavi2.man $RPM_BUILD_ROOT/%{_mandir}/man1/mayavi2.1 desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE1} mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/ install -p -m 644 ./docs/source/mayavi/images/mayavi2-48x48.png \ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/mayavi2.png %check # This isn't working yet #libdir=`echo build/lib.*` #ln tvtk/tvtk_classes.zip ${libdir}/tvtk/ # Mayavi tests appear to hang running under xvfb-run #PYTHONPATH=${libdir} mayavi/scripts/mayavi2 -t || : xvfb-run env %pytest -v mayavi %files %license *LICENSE* %doc README-tvtk.txt docs/*.txt %{_bindir}/mayavi2 %{_bindir}/tvtk_doc %{_mandir}/man1/mayavi2.1.* %{_datadir}/applications/mayavi2.desktop %{_datadir}/icons/hicolor/48x48/apps/mayavi2.png %files -n python%{python3_pkgversion}-mayavi %license *LICENSE* %doc docs/*.txt README-tvtk.txt %dir %{python3_sitearch}/mayavi %{python3_sitearch}/mayavi/[_a-gi-z]* %{python3_sitearch}/mayavi*.egg-info %{python3_sitearch}/tvtk/ %files doc %license *LICENSE* %doc README-tvtk.txt docs/*.txt docs/build/mayavi docs/build/tvtk examples/ %changelog * Tue Oct 29 2024 Sandro - 4.8.2-4 - Apply patch for NumPy 2.x * Wed Jul 17 2024 Fedora Release Engineering - 4.8.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 14 2024 Python Maint - 4.8.2-2 - Rebuilt for Python 3.13 * Sat May 25 2024 Orion Poplawski - 4.8.2-1 - Update to 4.8.2 * Wed Apr 10 2024 Orion Poplawski - 4.8.1^20240314.db518f8-1 - Update to latest git snapshot (FTBFS bz#2260963) * Mon Jan 22 2024 Fedora Release Engineering - 4.8.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 4.8.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Jul 19 2023 Fedora Release Engineering - 4.8.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sat Jun 17 2023 Python Maint - 4.8.1-4 - Rebuilt for Python 3.12 * Mon May 08 2023 Orion Poplawski - 4.8.1-3 - Add upstream patch to fix build with Python 3.11 (FTBFS bz#2171427) * Wed Jan 18 2023 Fedora Release Engineering - 4.8.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Oct 20 2022 Orion Poplawski - 4.8.1-1 - Update to 4.8.1 * Wed Jul 20 2022 Fedora Release Engineering - 4.7.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 14 2022 Python Maint - 4.7.4-4 - Rebuilt for Python 3.11 * Wed Jan 19 2022 Fedora Release Engineering - 4.7.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Nov 25 2021 Orion Poplawski - 4.7.4-2 - Rebuild for vtk 9.1.0 * Mon Nov 15 2021 Orion Poplawski - 4.7.4-1 - Update to 4.7.4 * Mon Jul 26 2021 David - 4.7.3-3 - Fix FTBFS * Wed Jul 21 2021 Fedora Release Engineering - 4.7.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 18 2021 Orion Poplawski - 4.7.3-1 - Update to 4.7.3 * Fri Jun 04 2021 Python Maint - 4.7.2-3 - Rebuilt for Python 3.10 * Mon Jan 25 2021 Fedora Release Engineering - 4.7.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Sep 02 2020 Orion Poplawski - 4.7.2-1 - Update to 4.7.2 * Sat Aug 01 2020 Fedora Release Engineering - 4.7.1-5 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Jul 27 2020 Fedora Release Engineering - 4.7.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 4.7.1-3 - Rebuilt for Python 3.9 * Tue Jan 28 2020 Fedora Release Engineering - 4.7.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Sat Dec 28 2019 Orion Poplawski - 4.7.1-1 - Update to 4.7.1 * Sat Dec 28 2019 Orion Poplawski - 4.6.2-7 - Remove setuptools requirement on vtk (bz#1786402) - Drop old python2 suppot from spec * Thu Oct 03 2019 Miro Hrončok - 4.6.2-6 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 4.6.2-5 - Rebuilt for Python 3.8 * Wed Jul 24 2019 Fedora Release Engineering - 4.6.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sun Feb 24 2019 Orion Poplawski - 4.6.2-3 - Use pyface-qt with python3 (bug #1680381) * Thu Jan 31 2019 Fedora Release Engineering - 4.6.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Oct 27 2018 Orion Poplawski - 4.6.2-1 - Update to 4.6.2 - Use Python 3 for Fedora 30+ * Fri Jul 20 2018 Orion Poplawski - 4.6.1-1 - Update to 4.6.1 - Split python libraries into separate package (bug #1279193) * Thu Jul 12 2018 Fedora Release Engineering - 4.5.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Feb 07 2018 Fedora Release Engineering - 4.5.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Wed Aug 02 2017 Fedora Release Engineering - 4.5.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 4.5.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 4.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Aug 9 2016 Orion Poplawski - 4.5.0-1 - Update to 4.5.0 * Tue Jul 19 2016 Fedora Release Engineering - 4.4.4-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Wed Mar 16 2016 Orion Poplawski - 4.4.4-1 - Update to 4.4.4 - Drop upstream patch - Use %%license * Wed Feb 03 2016 Fedora Release Engineering - 4.4.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Nov 25 2015 Orion Poplawski - 4.4.3-3 - BR /usr/bin/sphinx-build instead of python-sphinx * Thu Nov 5 2015 Orion Poplawski - 4.4.3-2 - Add upstream PR for vtk 6.3.0 support * Thu Oct 29 2015 Orion Poplawski - 4.4.3-2 - Rebuild for vtk 6.3.0 * Wed Sep 9 2015 Orion Poplawski - 4.4.3-1 - Update to 4.4.3 * Tue Jun 16 2015 Fedora Release Engineering - 4.4.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Thu Jun 11 2015 Orion Poplawski - 4.4.2-1 - Update to 4.4.2 * Tue Mar 3 2015 Orion Poplawski - 4.4.0-1 - Update to 4.4.0 * Fri Aug 15 2014 Fedora Release Engineering - 4.3.2-0.3.20140421git2054fd4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Fri Jun 06 2014 Fedora Release Engineering - 4.3.2-0.2.20140421git2054fd4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri May 9 2014 Orion Poplawski - 4.3.2-0.1.20140421git2054fd4 - Update to latest git snapshot for VTK 6 support * Thu Mar 13 2014 Orion Poplawski - 4.3.1-1 - Update to 4.3.1 - Split docs into separate subpackage * Thu Sep 19 2013 Orion Poplawski - 4.3.0-8 - Update to current git to build against vtk 6 * Wed Sep 18 2013 Orion Poplawski - 4.3.0-7 - Add patch to fix vtkQt class loading issue (bug #1008392) * Mon Sep 16 2013 Orion Poplawski - 4.3.0-6 - Require python-pyface-wx (bug #1008392) * Tue Aug 06 2013 Orion Poplawski - 4.3.0-5 - Drop BR on python-setupdocs, no longer used * Fri Aug 02 2013 Fedora Release Engineering - 4.3.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed May 22 2013 Orion Poplawski - 4.3.0-3 - Use lowercase names in BR * Mon May 13 2013 Orion Poplawski - 4.3.0-2 - Change requires to python-envisage * Fri May 10 2013 Orion Poplawski - 4.3.0-1 - Update to 4.3.0 * Wed Feb 13 2013 Fedora Release Engineering - 4.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Wed Jul 18 2012 Fedora Release Engineering - 4.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri May 25 2012 Orion Poplawski - 4.2.0-1 - Update to 4.2.0 - Add BR python-sphinx and patch to set new html build location - Drop %%defattr() * Thu Jan 12 2012 Fedora Release Engineering - 3.4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Mon Feb 07 2011 Fedora Release Engineering - 3.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Jan 05 2011 Rakesh Pandit 3.4.0-1 - Updated to 3.4.0 * Fri Aug 13 2010 Chen Lei 3.3.2-1 - Update spec to match latest guidelines w.r.t %%clean - Remove explict dependency on python-TraitsBackendQt.spec - Rename man page(Mayavi -> mayavi2) - Remove docs src - Remove tvtk_doc.desktop to avoid confusion - Fix timestampes for example files * Wed Jul 21 2010 David Malcolm - 3.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Sun Jan 31 2010 Rakesh Pandit 3.3.0-1 - Updated to 3.2.0 * Fri Jul 24 2009 Fedora Release Engineering - 3.2.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Fri Jun 26 2009 Rakesh Pandit 3.2.0-6 - Fixed BR, and removed .template & .static directories from docs/source - Included missing icon from .desktop * Fri Jun 26 2009 Rakesh Pandit 3.2.0-5 - Using mayavi2-48x48.png has icons for both .desktop files - Added Categories to .desktop files * Thu Jun 25 2009 Rakesh Pandit 3.2.0-4 - Removed wrong scriplets and corrected 'commets' in - tvtk_doc.desktop file. * Wed Jun 24 2009 Rakesh Pandit 3.2.0-3 - Fixed license issue and group tag - Added a .desktop file * Mon Jun 15 2009 Rakesh Pandit 3.2.0-3 - included man page, adjusted description, removed useless BR's, - fixed owned directory issue, cleaned up spec * Fri Jun 12 2009 Rakesh Pandit 3.2.0-2 - Saving timestamp, and fixed indentation * Fri Jun 12 2009 Rakesh Pandit 3.2.0-1 - Updated * Wed Jun 10 2009 Rakesh Pandit 3.1.0-3 - Changed name to Mayavi * Tue Jan 27 2009 Rakesh Pandit 3.1.0-2 - Fixed description. * Tue Jan 27 2009 Rakesh Pandit 3.1.0-1 - Initial package