%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define SDIR %{name}-%{version}-beta1 %bcond_with rhel Name: cgal-python Version: 0.9.4 Release: 0.7.beta1%{?dist} Summary: Python bindings for the CGAL library Group: Development/Libraries License: LGPLv2 URL: http://cgal-python.gforge.inria.fr/ Source0: https://gforge.inria.fr/frs/download.php/19498/%{SDIR}.tgz Source1: CGAL_PYTHON_1.pdf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel >= 2.3 boost-devel CGAL-devel gmp-devel gcc-c++ BuildRequires: qt-devel %{_libdir}/libmpfr.so %description The goal of the CGAL-Python project is to provide Python bindings for the CGAL library. CGAL is the Computational Geometry Algorithms Library, a C++ library of generic, efficient and robust geometric algorithms. CGAL-Python is implemented using Boost.Python, which allows to mimic a large part of the original C++ interface of CGAL. Since CGAL is heavily based on the generic programming paradigm (templates), some choices have been made to accommodate the Python programming model instead. Python allows much faster prototyping than C++, by simplifying the complexity of the language and removing the typical long compilation times of C++. We also hope that CGAL-Python can be used for teaching geometric algorithms, without requiring knowledge of C++ as is currently the case with CGAL. %prep %setup -q -n %{SDIR} %build export CPATH=`ls -d %{_includedir}/python*`:%{_includedir}/boost python setup.py build %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{python_sitearch}/%{name}-%{version} python setup.py install -O1 --root=%{buildroot} cp %{SOURCE1} $RPM_BUILD_DIR/%{SDIR}/%{name}.pdf %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc LICENSE.LGPL README.txt %{name}.pdf %{python_sitearch}/%{name}-%{version} %{python_sitearch}/CGAL %{!?with_rhel:%{python_sitearch}/*.egg-info} %changelog * Fri Nov 13 2009 Paulo Roma 0.9.4-0.7.beta1 - Rebuilt with CGAL 3.5 - Installing egg-info. * Sat Jun 20 2009 Paulo Roma 0.9.4-0.6.beta1 - Update to 0.9.4 - Using setup.py * Tue Nov 06 2007 Paulo Roma 0.9.3-6 - No new feature has been added, but it works now with CGAL 3.3, and it also works on Mac OS X. - Using %%{SDIR} since the source is in %{name} and not in %{name}-%{version} anymore. * Sun Mar 11 2007 Paulo Roma 0.9.1-5 - Replaced cgal_package for a symbolic link in %%{python_sitearch} to CGAL. - Replaced BR mpfr-devel for %{_libdir}/libmpfr.so * Sat Mar 10 2007 Paulo Roma 0.9.1-3 - Installing in %{name}-%{version} following windows version. - Created fake cgal-package, and a symbolic link, for the examples work. * Sat Mar 10 2007 Paulo Roma 0.9.1-2 - Removed .h, .o, .cpp, and .vcproj from package. * Tue Mar 06 2007 Paulo Roma 0.9.1-1 - Initial spec file.