%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %if 0%{?fedora} > 12 # python3-numpy is only in f15 yet %global with_python3 0 %endif %{?filter_setup: %filter_provides_in %{python_sitearch}/.*\.so* %filter_from_requires /cvisualmodule\.so/d %filter_setup } Name: python-visual Version: 5.61 Release: 1%{?dist} Summary: 3D Programming Group: Development/Languages # See license.txt file for clarification License: Boost and MIT URL: http://vpython.org Source0: http://vpython.org/contents/download/visual-%{version}_release.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: boost-devel BuildRequires: gtkglextmm-devel BuildRequires: libglademm24-devel BuildRequires: python2-devel BuildRequires: numpy Requires: fonttools %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-numpy %endif Obsoletes: vpython < %{version} Provides: vpython = %{version} %if 0%{?with_python3} %package -n python3-visual Summary: 3D Programming Group: Development/Languages %description -n python3-visual Visual Python makes it easy to create navigable 3D displays and animations, even for those with limited programming experience. Because it is based on Python, it also has much to offer for experienced programmers and researchers. %package -n python3-visual-doc Summary: Documentation and examples for %{name} Group: Documentation BuildArch: noarch %description -n python3-visual-doc Documentation and examples for developing with %{name} %endif # with_python3 %description Visual Python makes it easy to create navigable 3D displays and animations, even for those with limited programming experience. Because it is based on Python, it also has much to offer for experienced programmers and researchers. %package doc Summary: Documentation and examples for %{name} Group: Documentation BuildArch: noarch %description doc Documentation and examples for developing with %{name} %prep %setup -q -n visual-%{version}_release #rm -r dependencies sed -i 's/\r//' \ docs/visual/VisualRef.css # make the build more verbose, with deleting all redirections to log file sed -i 's/2\?>> \?\$(LOGFILE).*//' src/Makefile.in sed -i 's/boost_thread/boost_thread-mt/g' src/Makefile.in %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %if 0%{?with_python3} pushd %{py3dir} %configure --with-html-dir=%{_defaultdocdir}/%{name}-doc-%{version} # remove rpath sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool CFLAGS="%{optflags}" make %{?_smp_mflags} popd %endif # with_python3 %configure --with-html-dir=%{_defaultdocdir}/%{name}-doc-%{version} # remove rpath sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool CFLAGS="%{optflags}" make %{?_smp_mflags} %install rm -rf %{buildroot} %if 0%{?with_python3} pushd %{py3dir} make install DESTDIR=%{buildroot} INSTALL="install -p" find %{buildroot}%{python3_sitearch} -name '*.la' | xargs rm -f # remove installed examples and docs, they go into -doc in %%files section rm -r %{buildroot}%{python3_sitearch}/visual/examples rm -r %{buildroot}%{_docdir}/* # IDLE is not packaged in fedora, delete vpython excecuable rm -f %{buildroot}%{_bindir}/vpython %endif # with_python3 make install DESTDIR=%{buildroot} INSTALL="install -p" find %{buildroot}%{python_sitearch} -name '*.la' | xargs rm -f # remove installed examples and docs, they go into -doc in %%files section rm -r %{buildroot}%{python_sitearch}/visual/examples rm -r %{buildroot}%{_docdir}/* # IDLE is not packaged in fedora, delete vpython excecuable rm -f %{buildroot}%{_bindir}/vpython %clean rm -rf %{buildroot} %if 0%{?with_python3} %files -n python3-visual %defattr(-,root,root,-) %doc license.txt authors.txt NEWS.txt %{python3_sitearch}/vis %{python3_sitearch}/visual %files -n python3-visual-doc %defattr(-,root,root,-) %doc examples docs/index.html docs/visual %endif # with_python3 %files %defattr(-,root,root,-) %doc license.txt authors.txt NEWS.txt %{python_sitearch}/vis %{python_sitearch}/visual %files doc %defattr(-,root,root,-) %doc examples docs/index.html docs/visual %changelog * Sun Mar 27 2011 Thomas Spura <tomspur@fedoraproject.org> - 5.61-1 - update to new version * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.40-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sun Feb 06 2011 Thomas Spura <tomspur@fedoraproject.org> - 5.40-3 - rebuild for new boost * Tue Nov 30 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.40-2 - use corrent filter_setup (thanks to Kalev Lember) * Tue Nov 30 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.40-1 - update to new version - add disabled python3 subpackage - disable filter_setup (#657851) * Wed Nov 24 2010 Dan Horák <dan[at]danny.cz> - 5.32-11 - fix the 64-bit architectures list * Mon Nov 15 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.32-10 - add BR gtkglextmm-devel workaround for #580984 * Thu Oct 7 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.32-9 - follow Packaging:AutoProvidesAndRequiresFiltering * Mon Jun 14 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.32-8 - change license to Boost and MIT * Wed Jun 2 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.32-7 - make the build verbose (Thanks to ELMORABITY Mohamed) - correct removing of cvisualmodule.so from provides/requires list * Mon May 31 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.32-6 - remove cvisualmodule.so from provides/requires list * Wed May 26 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.32-5 - move examples somewhere else, so the package can be noarch again * Wed May 26 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.32-4 - doc subpackage needs to be non-noarch * Sun May 2 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.32-3 - move examples subfolder to doc package * Mon Apr 12 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.32-2 - restrict moving of python_sitelib -> python_sitearch to 64bit * Sat Apr 10 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.32-1 - new version (again) - rename vpython -> python-visual * Wed Apr 7 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.31-1 - new version * Thu Mar 11 2010 Thomas Spura <tomspur@fedoraproject.org> - 5.22-1 - new version - move python_sitelib/* to python_sitearch in %%install (if not, patch always needs to regenerated) * Thu Nov 26 2009 Thomas Spura <tomspur@fedoraproject.org> - 5.13-3 - remove patch1: boost bug (#537612) gone * Thu Nov 18 2009 Thomas Spura <tomspur@fedoraproject.org> - 5.13-2 - remove wrong-file-end-of-line-encoding * Thu Nov 17 2009 Thomas Spura <tomspur@fedoraproject.org> - 5.13-1 - Initial creation