/[pkgs]/devel/Mayavi/Mayavi.spec
ViewVC logotype

Contents of /devel/Mayavi/Mayavi.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Jul 24 15:37:50 2009 UTC (3 months, 4 weeks ago) by jkeating
Branch: MAIN
CVS Tags: F-12-split, Mayavi-3_2_0-7_fc12, HEAD
Changes since 1.1: +4 -1 lines
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
1 # sitelib for noarch packages, sitearch for others (remove the unneeded one)
2 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
3
4 Name: Mayavi
5 Version: 3.2.0
6 Release: 7%{?dist}
7 Summary: Scientific data 3-dimensional visualizer
8
9 Group: Applications/Engineering
10 License: BSD and EPL and LGPLv2+ and LGPLv3+
11 URL: http://pypi.python.org/pypi/Mayavi/
12 Source0: http://www.enthought.com/repo/ETS/%{name}-%{version}.tar.gz
13 Source1: Mayavi.desktop
14 Source2: tvtk_doc.desktop
15 # Removes already generated tvtk class zip file
16 # https://svn.enthought.com/enthought/ticket/1817
17 Patch0: Mayavi-3.1.0-enthought_tvtk_code_gen_py.patch
18 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19 BuildRequires: python-setuptools, python-setupdocs, python-sphinx
20 BuildRequires: vtk-python, desktop-file-utils
21 %if 0%{?fedora} >= 11
22 BuildRequires: numpy-f2py
23 %else
24 BuildRequires: numpy
25 %endif
26 Requires: numpy, vtk-python
27 Requires: wxPython
28 Requires: python-AppTools
29 Requires: python-EnthoughtBase
30 Requires: python-EnvisageCore
31 Requires: python-EnvisagePlugins
32 Requires: python-Traits >= 3.1.0
33 Requires: python-TraitsGUI
34 Requires: python-TraitsBackendQt >= 3.1.0
35
36 %description
37
38 The Mayavi project includes two related packages for 3-dimensional
39 visualization:
40
41 * Mayavi2: A tool for easy and interactive visualization of data.
42 * TVTK: A Traits-based wrapper for the Visualization Toolkit, a
43 popular open-source visualization library.
44 These operate at different levels of abstraction. TVTK manipulates
45 visualization objects, while Mayavi2 lets you operate on your data,
46 and then see the results. Most users either use the Mayavi user
47 interface or program to its scripting interface; you probably don't
48 need to interact with TVTK unless you want to create a new Mayavi
49 module.
50
51 %prep
52 %setup -q -n %{name}-%{version}
53 %patch0 -p1 -b enthought_tvtk_code_gen_py
54 rm -rf Mayavi.egg-info
55
56 # removes .buildinfo files
57 find enthought/mayavi/html/ enthought/tvtk/html/ -name \.buildinfo \
58 -type f -print | xargs rm -f -
59
60 # Fixed license naming
61 sed 's/icon_/image_/g' image_LICENSE.txt > image_LICENSE.txt.fixed
62 touch -c -r image_LICENSE.txt image_LICENSE.txt.fixed
63 mv -f image_LICENSE.txt.fixed image_LICENSE.txt
64
65 # wrong-file-end-of-line-encoding
66 sed 's/\r//' examples/mayavi/wx_mayavi_embed_in_notebook.py > \
67 examples/mayavi/wx_mayavi_embed_in_notebook.py.fixed
68 touch -c -r examples/mayavi/wx_mayavi_embed_in_notebook.py \
69 examples/mayavi/wx_mayavi_embed_in_notebook.py.fixed
70 mv -f examples/mayavi/wx_mayavi_embed_in_notebook.py.fixed \
71 examples/mayavi/wx_mayavi_embed_in_notebook.py
72
73 sed 's/\r//' examples/mayavi/data/room_vis.wrl > \
74 examples/mayavi/data/room_vis.wrl.fixed
75 touch -c -r examples/mayavi/data/room_vis.wrl \
76 examples/mayavi/data/room_vis.wrl.fixed
77 mv -f examples/mayavi/data/room_vis.wrl.fixed \
78 examples/mayavi/data/room_vis.wrl
79
80 sed 's/\r//' examples/tvtk/dscene.py > examples/tvtk/dscene.py.fixed
81 touch -c -r examples/tvtk/dscene.py examples/tvtk/dscene.py.fixed
82 mv -f examples/tvtk/dscene.py.fixed examples/tvtk/dscene.py
83
84 sed 's/\r//' image_LICENSE_Nuvola.txt > image_LICENSE_Nuvola.txt.fixed
85 touch -c -r image_LICENSE_Nuvola.txt image_LICENSE_Nuvola.txt.fixed
86 mv -f image_LICENSE_Nuvola.txt.fixed image_LICENSE_Nuvola.txt
87
88 sed 's/\r//' image_LICENSE_OOo.txt > image_LICENSE_OOo.txt.fixed
89 touch -c -r image_LICENSE_OOo.txt image_LICENSE_OOo.txt.fixed
90 mv -f image_LICENSE_OOo.txt.fixed image_LICENSE_OOo.txt
91
92 sed 's/\r//' image_LICENSE_Eclipse.txt > image_LICENSE_Eclipse.txt.fixed
93 touch -c -r image_LICENSE_Eclipse.txt image_LICENSE_Eclipse.txt.fixed
94 mv -f image_LICENSE_Eclipse.txt.fixed image_LICENSE_Eclipse.txt
95
96 # file-not-utf8
97 iconv -f iso8859-1 -t utf-8 image_LICENSE_OOo.txt > image_LICENSE_OOo.txt.conv \
98 && touch -c -r image_LICENSE_OOo.txt image_LICENSE_OOo.txt.conv \
99 && mv -f image_LICENSE_OOo.txt.conv image_LICENSE_OOo.txt
100 iconv -f iso8859-1 -t utf-8 image_LICENSE_Eclipse.txt > image_LICENSE_Eclipse.txt.conv \
101 && touch -c -r image_LICENSE_Eclipse.txt image_LICENSE_Eclipse.txt.conv \
102 && mv -f image_LICENSE_Eclipse.txt.conv image_LICENSE_Eclipse.txt
103 iconv -f iso8859-1 -t utf-8 README-mayavi.txt > README-mayavi.txt.conv \
104 && touch -c -r README-mayavi.txt README-mayavi.txt.conv \
105 && mv -f README-mayavi.txt.conv README-mayavi.txt
106 iconv -f iso8859-1 -t utf-8 docs/THANKS.txt > docs/THANKS.txt.conv \
107 && touch -c -r docs/THANKS.txt docs/THANKS.txt.conv \
108 && mv -f docs/THANKS.txt.conv docs/THANKS.txt
109
110 # spurious-executable-perm
111 chmod -x examples/mayavi/mayavi_traits_ui.py examples/mayavi/test.py \
112 examples/mayavi/nongui.py examples/mayavi/numeric_source.py \
113 examples/mayavi/glyph.py examples/tvtk/plugins/test.py \
114 examples/mayavi/compute_in_thread.py examples/mayavi/contour.py \
115 examples/mayavi/streamline.py examples/mayavi/offscreen.py \
116 enthought/mayavi/tests/data/cellsnd.ascii.inp
117
118 %build
119 CFLAGS="$RPM_OPT_FLAGS" python setup.py release build
120
121
122 %install
123 rm -rf $RPM_BUILD_ROOT
124 python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
125 sed -i 's/\.dev$//g' $RPM_BUILD_ROOT/%{python_sitearch}/%{name}-%{version}-*.egg-info/requires.txt
126
127 # non-executable-script
128 chmod +x $RPM_BUILD_ROOT/%{python_sitearch}/enthought/mayavi/tests/runtests.py \
129 $RPM_BUILD_ROOT/%{python_sitearch}/enthought/mayavi/scripts/mayavi2.py \
130 $RPM_BUILD_ROOT/%{python_sitearch}/enthought/tvtk/setup.py
131
132 rm $RPM_BUILD_ROOT/%{python_sitearch}/*-nspkg.pth
133 mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/
134 mv docs/mayavi2.man $RPM_BUILD_ROOT/%{_mandir}/man1/%{name}.1
135 desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE1}
136 desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE2}
137 mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/
138 install -p -m 644 ./docs/source/mayavi/images/mayavi2-48x48.png \
139 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/mayavi2.png
140 install -p -m 644 ./docs/source/mayavi/images/mayavi2-48x48.png \
141 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/tvtk_doc.png
142
143 # removes .buildinfo files
144 find docs/source/ \( -name \.static -o -name \.templates \) \
145 -type d -print | xargs rm -rf -
146
147
148 %clean
149 rm -rf $RPM_BUILD_ROOT
150
151
152 %post
153 touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
154
155 %postun
156 if [ $1 -eq 0 ] ; then
157 touch --no-create %{_datadir}/icons/hicolor &>/dev/null
158 gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
159 fi
160
161 %posttrans
162 gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
163
164
165 %files
166 %defattr(-,root,root,-)
167 %doc *.txt docs/*.txt examples/ docs/pdf/*.pdf
168 %doc docs/pdf/*/*.pdf docs/source
169 %{_bindir}/mayavi2
170 %{_bindir}/tvtk_doc
171 %{python_sitearch}/enthought/*
172 %{python_sitearch}/*.egg-info
173 %{_mandir}/man1/%{name}.1.gz
174 %{_datadir}/applications/%{name}.desktop
175 %{_datadir}/applications/tvtk_doc.desktop
176 %{_datadir}/icons/hicolor/48x48/apps/tvtk_doc.png
177 %{_datadir}/icons/hicolor/48x48/apps/mayavi2.png
178
179
180 %changelog
181 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-7
182 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
183
184 * Fri Jun 26 2009 Rakesh Pandit <rakesh@fedoraproject.org> 3.2.0-6
185 - Fixed BR, and removed .template & .static directories from docs/source
186 - Included missing icon from .desktop
187
188 * Fri Jun 26 2009 Rakesh Pandit <rakesh@fedoraproject.org> 3.2.0-5
189 - Using mayavi2-48x48.png has icons for both .desktop files
190 - Added Categories to .desktop files
191
192 * Thu Jun 25 2009 Rakesh Pandit <rakesh@fedoraproject.org> 3.2.0-4
193 - Removed wrong scriplets and corrected 'commets' in
194 - tvtk_doc.desktop file.
195
196 * Wed Jun 24 2009 Rakesh Pandit <rakesh@fedoraproject.org> 3.2.0-3
197 - Fixed license issue and group tag
198 - Added a .desktop file
199
200 * Mon Jun 15 2009 Rakesh Pandit <rakesh@fedoraproject.org> 3.2.0-3
201 - included man page, adjusted description, removed useless BR's,
202 - fixed owned directory issue, cleaned up spec
203
204 * Fri Jun 12 2009 Rakesh Pandit <rakesh@fedoraproject.org> 3.2.0-2
205 - Saving timestamp, and fixed indentation
206
207 * Fri Jun 12 2009 Rakesh Pandit <rakesh@fedoraproject.org> 3.2.0-1
208 - Updated
209
210 * Wed Jun 10 2009 Rakesh Pandit <rakesh@fedoraproject.org> 3.1.0-3
211 - Changed name to Mayavi
212
213 * Tue Jan 27 2009 Rakesh Pandit <rakesh@fedoraproject.org> 3.1.0-2
214 - Fixed description.
215
216 * Tue Jan 27 2009 Rakesh Pandit <rakesh@fedoraproject.org> 3.1.0-1
217 - Initial package

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2