I've tested building graph-tool 2.2.36 on CentOS 7.

The only major challenge is that Red Hat ships boost 1.53, which means that I had to modify the packages for boost 1.54 to create a package named "boost154" that I could install in parallel with boost 1.53.

For rpm systems that ship boost 1.54 or newer, the required rpm spec is somewhat cleaner than the last one I sent. I've included that with this message. Let me know if there's anything else I can do to help ship packages for rpm based systems.
%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

Name:           python-graph-tool
Version:        2.2.36
Release:        1%{?dist}
Summary:        Efficient network analysis for Python

Group:          Development/Languages
License:        GPLv3
URL:            http://graph-tool.skewed.de/
Source0:        http://downloads.skewed.de/graph-tool/graph-tool-%{version}.tar.bz2

BuildRequires:  python2-devel
BuildRequires:  gcc
BuildRequires:  boost >= 1.54.0
BuildRequires:  expat-devel
BuildRequires:  scipy
BuildRequires:  numpy
BuildRequires:  CGAL-devel
BuildRequires:  sparsehash-devel
BuildRequires:  cairomm-devel
BuildRequires:  pycairo-devel
BuildRequires:  python-matplotlib


%description
Graph-tool is an efficient Python module for manipulation and statistical
analysis of graphs (a.k.a. networks). Contrary to most other python
modules with similar functionality, the core data structures and 
algorithms are implemented in C++, making extensive use of template 
metaprogramming, based heavily on the Boost Graph Library. This confers it
a level of performance that is comparable (both in memory usage and 
computation time) to that of a pure C/C++ library. 

%prep
%setup -q -n graph-tool-%{version}


%build
./configure CFLAGS="$RPM_OPT_FLAGS" \
  --with-sparsehash-prefix=google
make


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

 
%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc /usr/local/share/doc/graph-tool
%{python2_sitearch}/graph_tool


%changelog
_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to