diff --git a/.gitignore b/.gitignore index ce2c5f0..a95d47c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ Mayavi-3.3.2.tar.gz /Mayavi-3.4.0.tar.gz +/mayavi-4.2.0.tar.gz diff --git a/Mayavi-sphinx.patch b/Mayavi-sphinx.patch new file mode 100644 index 0000000..85c9550 --- /dev/null +++ b/Mayavi-sphinx.patch @@ -0,0 +1,21 @@ +diff -up enthought-mayavi-a1e562a/setup.py.sphinx enthought-mayavi-a1e562a/setup.py +--- enthought-mayavi-a1e562a/setup.py.sphinx 2012-05-16 13:08:48.000000000 -0600 ++++ enthought-mayavi-a1e562a/setup.py 2012-05-25 11:08:03.848464103 -0600 +@@ -81,7 +81,7 @@ from setuptools.command import develop, + info = {} + execfile(join('mayavi', '__init__.py'), info) + +-DEFAULT_HTML_TARGET_DIR = join('build', 'docs', 'html') ++DEFAULT_HTML_TARGET_DIR = join('docs', 'build') + DEFAULT_INPUT_DIR = join('docs', 'source',) + + class GenDocs(Command): +@@ -270,7 +270,7 @@ def list_docs_data_files(project): + + returns a list of (install_dir, [data_files, ]) tuples. + """ +- project_target_dir = join(DEFAULT_HTML_TARGET_DIR, project) ++ project_target_dir = join(DEFAULT_HTML_TARGET_DIR, project, 'html') + return_list = [] + for root, dirs, files in os.walk(project_target_dir, topdown=True): + # Modify inplace the list of directories to walk diff --git a/Mayavi.spec b/Mayavi.spec index 94925c9..5f29ce9 100644 --- a/Mayavi.spec +++ b/Mayavi.spec @@ -1,13 +1,17 @@ Name: Mayavi -Version: 3.4.0 -Release: 3%{?dist} +Version: 4.2.0 +Release: 1%{?dist} Summary: Scientific data 3-dimensional visualizer Group: Applications/Engineering License: BSD and EPL and LGPLv2+ and LGPLv2 and LGPLv3 URL: http://code.enthought.com/projects/mayavi/ -Source0: http://www.enthought.com/repo/ETS/%{name}-%{version}.tar.gz +Source0: http://www.enthought.com/repo/ets/mayavi-%{version}.tar.gz Source1: mayavi2.desktop +# Patch for new sphinx doc build dir +Patch0: Mayavi-sphinx.patch BuildRequires: python2-devel, python-setuptools, python-setupdocs +# For HTML docs +BuildRequires: python-sphinx BuildRequires: numpy, vtk-python, desktop-file-utils Requires: vtk-python, python-AppTools # EnthoughtBase, Traits[ui] and numpy come with TraitsGUI @@ -30,7 +34,8 @@ need to interact with TVTK unless you want to create a new Mayavi module. %prep -%setup -q -n %{name}-%{version} +%setup -q -n mayavi-%{version} +%patch0 -p1 -b .sphinx rm -rf *.egg-info @@ -50,7 +55,7 @@ for file in *.txt docs/*.txt; do done # remove shebang -for file in enthought/mayavi/scripts/*.py; do +for file in mayavi/scripts/*.py; do sed '/^#!\//, 1d' $file > $file.new && \ touch -r $file $file.new && \ mv $file.new $file @@ -58,7 +63,7 @@ done # remove exec permission find examples -type f -exec chmod 0644 {} ";" -chmod 0644 enthought/mayavi/tests/data/cellsnd.ascii.inp +chmod 0644 mayavi/tests/data/cellsnd.ascii.inp %build CFLAGS="$RPM_OPT_FLAGS" python setup.py build @@ -67,19 +72,19 @@ CFLAGS="$RPM_OPT_FLAGS" python setup.py build python setup.py install --skip-build --root $RPM_BUILD_ROOT # remove useless files -rm -f $RPM_BUILD_ROOT%{python_sitearch}/enthought/tvtk/setup.py* -find $RPM_BUILD_ROOT%{python_sitearch}/enthought -name \.buildinfo \ +rm -f $RPM_BUILD_ROOT%{python_sitearch}/tvtk/setup.py* +find $RPM_BUILD_ROOT%{python_sitearch} -name \.buildinfo \ -type f -print | xargs rm -f - # fix wrong-file-end-of-line-encoding -for file in $RPM_BUILD_ROOT%{python_sitearch}/enthought/mayavi/html/_downloads/wx_mayavi*.py; do +for file in $RPM_BUILD_ROOT%{python_sitearch}/mayavi/html/_downloads/wx_mayavi*.py; do sed "s|\r||g" $file > $file.new && \ touch -r $file $file.new && \ mv $file.new $file done # non-executable-script -chmod +x $RPM_BUILD_ROOT%{python_sitearch}/enthought/mayavi/tests/runtests.py +chmod +x $RPM_BUILD_ROOT%{python_sitearch}/mayavi/tests/runtests.py mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/ cp -p docs/mayavi2.man $RPM_BUILD_ROOT/%{_mandir}/man1/mayavi2.1 @@ -102,17 +107,14 @@ fi gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -%defattr(-,root,root,-) %doc *.txt docs/*.txt examples/ -#doc build/docs/html -%dir %{python_sitearch}/enthought/mayavi -%dir %{python_sitearch}/enthought/tvtk -%doc %{python_sitearch}/enthought/mayavi/html -%doc %{python_sitearch}/enthought/tvtk/html -%{python_sitearch}/enthought/mayavi/[_a-gi-z]* -%{python_sitearch}/enthought/tvtk/[_a-gi-z]* +%dir %{python_sitearch}/mayavi +%dir %{python_sitearch}/tvtk +%doc %{python_sitearch}/mayavi/html +%doc %{python_sitearch}/tvtk/html +%{python_sitearch}/mayavi/[_a-gi-z]* +%{python_sitearch}/tvtk/[_a-gi-z]* %{python_sitearch}/*.egg-info -%{python_sitearch}/*.pth %{_bindir}/mayavi2 %{_bindir}/tvtk_doc %{_mandir}/man1/mayavi2.1.* @@ -120,6 +122,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/icons/hicolor/48x48/apps/mayavi2.png %changelog +* 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 diff --git a/sources b/sources index 55b2f43..af077ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6e3a24de9fc4251cb8abbab734166cfe Mayavi-3.4.0.tar.gz +2b3e853f511a2e7bd5e34cfa5b99d2d4 mayavi-4.2.0.tar.gz