%global srcname orange-source-snapshot %global snapshotdate 2010-10-20 Name: python-orange Version: 2.0 Release: 0.3%{?dist} Summary: Orange data mining library for python Group: Development/Libraries License: GPLv3+ and BSD URL: http://www.ailab.si/orange Source0: http://www.ailab.si/orange/download/%{srcname}-%{snapshotdate}.zip Source1: python-orange.desktop BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: numpy BuildRequires: desktop-file-utils Requires: numpy Requires: PyQwt %description Open source data visualization and analysis for novice and experts. Data mining through visual programming or Python scripting. Components for machine learning. Extensions for bioinformatics and text mining. Packed with features for data analytics. %prep %setup -q -c -n %{srcname}-%{snapshotdate} %build # Necessary modification to compile it under Python 2.7 sed -i 's/"dynamic"/"dylib"/g' setup.py %{__python} setup.py build %install %{__python} setup.py install --skip-build --root %{buildroot} # This file is missing when doing setup.py install -pm 644 OrangeCanvas/WidgetTabs.txt %{buildroot}/%{python_sitearch}/orange/OrangeCanvas/ # Install the desktop icon install -d %{buildroot}/%{_datadir}/pixmaps/ install -pm 644 OrangeWidgets/icons/OrangeWidgetsIcon.png %{buildroot}/%{_datadir}/pixmaps/ desktop-file-install --dir=%{buildroot}/%{_datadir}/applications %{SOURCE1} # Remove shebang for lib in `find %{buildroot}%{python_sitearch}/orange/ -name '*.py'`; do sed '/\/usr\/bin\/env/d' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done %files %defattr(-,root,root,-) %doc README.txt source/LICENSES source/COPYING source/BUILDING %{_bindir}/orange-canvas %{python_sitearch}/orange* %{_datadir}/pixmaps/OrangeWidgetsIcon.png %{_datadir}/applications/python-orange.desktop %changelog * Sun Oct 24 2010 Howard Ning - 2.0-0.3 - Correct the license tag - Add license doc * Fri Oct 22 2010 Howard Ning - 2.0-0.2 - Add desktop file * Tue Oct 20 2010 Howard Ning - 2.0-0.1 - Initial Release