|
|
564204d |
# Koji has two types of builders:
|
|
|
564204d |
# 16Gb + 6 cores
|
|
|
564204d |
# 128Gb + 48 cores
|
|
|
564204d |
# There's no way to choose either, so we rely on luck
|
|
|
564204d |
#
|
|
|
564204d |
# This needs about 15 gigs per thread, otherwise OOMs. So, we calculate the number of threads we can afford to use for make:
|
|
|
564204d |
# meminfo gives output in kB (1000 bytes)
|
|
|
ed6313d |
%global numthreads %(awk '/MemTotal:/ {print int($2/15e6)}' /proc/meminfo)
|
|
|
564204d |
# But make sure it is > 0
|
|
|
564204d |
%if 0%{numthreads} == 0
|
|
|
564204d |
%global numthreads 1
|
|
|
564204d |
%endif
|
|
|
564204d |
|
|
|
564204d |
# If _smp_build_ncpus is not defined (on older rpms)
|
|
|
564204d |
# assume there's only one
|
|
|
564204d |
%if 0%{?_smp_build_ncpus} == 0
|
|
|
564204d |
%global _smp_build_ncpus 1
|
|
|
564204d |
%endif
|
|
|
564204d |
|
|
|
564204d |
# Use the smaller number of threads
|
|
|
564204d |
%if 0%{numthreads} > 0%{?_smp_build_ncpus}
|
|
|
564204d |
%global numthreads %{?_smp_build_ncpus}
|
|
|
564204d |
%endif
|
|
|
564204d |
|
|
|
564204d |
%global modname graph-tool
|
|
|
564204d |
%global pymodname graph_tool
|
|
|
564204d |
|
|
|
b20f124 |
# Builds fail with LTO
|
|
|
b20f124 |
%global _lto_cflags %{nil}
|
|
|
b20f124 |
|
|
|
564204d |
%global _description %{expand:
|
|
|
564204d |
Graph-tool is an efficient Python module for manipulation and statistical
|
|
|
564204d |
analysis of graphs (a.k.a. networks). Contrary to most other python modules
|
|
|
564204d |
with similar functionality, the core data structures and algorithms are
|
|
|
564204d |
implemented in C++, making extensive use of template metaprogramming, based
|
|
|
564204d |
heavily on the Boost Graph Library. This confers it a level of performance that
|
|
|
564204d |
is comparable (both in memory usage and computation time) to that of a pure
|
|
|
564204d |
C/C++ library.
|
|
|
564204d |
|
|
|
564204d |
Please refer to https://graph-tool.skewed.de/static/doc/index.html for
|
|
|
564204d |
documentation.}
|
|
|
564204d |
|
|
|
564204d |
Name: python-%{modname}
|
|
|
b20f124 |
Version: 2.33
|
|
|
5d3997b |
Release: 4%{?dist}
|
|
|
564204d |
Summary: Efficient network analysis tool written in Python
|
|
|
564204d |
|
|
|
b20f124 |
License: LGPLv3+
|
|
|
564204d |
URL: https://graph-tool.skewed.de/
|
|
|
564204d |
Source0: https://downloads.skewed.de/%{modname}/%{modname}-%{version}.tar.bz2
|
|
|
564204d |
|
|
|
15648c6 |
# Fails on i686: issue filed: https://git.skewed.de/count0/graph-tool/issues/617
|
|
|
15648c6 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1771023
|
|
|
15648c6 |
# Fails on armv7hl: virtual memory exhausted
|
|
|
15648c6 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1771024
|
|
|
15648c6 |
# Fails on ppc64le: note: variable tracking size limit exceeded with '-fvar-tracking-assignments', retrying without
|
|
|
15648c6 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1771031
|
|
|
15648c6 |
# Fails on s390x: note: variable tracking size limit exceeded with '-fvar-tracking-assignments', retrying without
|
|
|
15648c6 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1771034
|
|
|
15648c6 |
# Takes ~23 hours on x86_64 if we get unlucky and get a 6 core 16gig machine, ~4 hours if we get a 48 core 128gig machine
|
|
|
15648c6 |
# Takes ~45 hours on aarch64
|
|
|
15648c6 |
ExcludeArch: i686 armv7hl ppc64le s390x
|
|
|
15648c6 |
|
|
|
564204d |
# Workaround for https://git.skewed.de/count0/graph-tool/issues/613
|
|
|
564204d |
# CGAL 5.x is now header only
|
|
|
564204d |
# Required on F32+
|
|
|
564204d |
%if 0%{?fedora} >= 32
|
|
|
564204d |
Patch0: 0001-Use-header-only-CGAL-library.patch
|
|
|
564204d |
%endif
|
|
|
564204d |
|
|
|
564204d |
# Remove the compiler flags upstream tries to put
|
|
|
564204d |
Patch1: 0002-Remove-upstreams-flags.patch
|
|
|
45be2a3 |
BuildRequires: make
|
|
|
564204d |
BuildRequires: git-core
|
|
|
564204d |
BuildRequires: autoconf
|
|
|
564204d |
BuildRequires: automake
|
|
|
564204d |
BuildRequires: libtool
|
|
|
ed6313d |
BuildRequires: gawk
|
|
|
564204d |
|
|
|
564204d |
%description %_description
|
|
|
564204d |
|
|
|
564204d |
%package -n python3-%{modname}
|
|
|
564204d |
Summary: %{summary}
|
|
|
564204d |
BuildRequires: python3-devel
|
|
|
564204d |
BuildRequires: boost-devel
|
|
|
564204d |
BuildRequires: boost-python3-devel
|
|
|
564204d |
BuildRequires: CGAL-devel
|
|
|
5d3997b |
BuildRequires: pkgconfig(cairomm-1.0)
|
|
|
564204d |
BuildRequires: expat-devel
|
|
|
564204d |
BuildRequires: gcc-g++
|
|
|
564204d |
BuildRequires: gmp-devel
|
|
|
564204d |
BuildRequires: gtk3-devel
|
|
|
564204d |
BuildRequires: python3-cairo-devel
|
|
|
564204d |
BuildRequires: python3-devel
|
|
|
564204d |
BuildRequires: %{py3_dist scipy}
|
|
|
564204d |
BuildRequires: %{py3_dist matplotlib}
|
|
|
564204d |
BuildRequires: %{py3_dist numpy}
|
|
|
564204d |
BuildRequires: sparsehash-devel
|
|
|
564204d |
|
|
|
564204d |
Provides: graph-tool%{?_isa} = %{version}-%{release}
|
|
|
564204d |
|
|
|
564204d |
# Not a setuptools style project, but leaving this in
|
|
|
564204d |
%{?python_provide:%python_provide python3-%{modname}}
|
|
|
564204d |
|
|
|
564204d |
%description -n python3-%{modname} %_description
|
|
|
564204d |
|
|
|
564204d |
%prep
|
|
|
564204d |
%autosetup -S git -n %{modname}-%{version}
|
|
|
564204d |
# Remove shebangs
|
|
|
564204d |
find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'
|
|
|
564204d |
|
|
|
564204d |
|
|
|
564204d |
%build
|
|
|
564204d |
./autogen.sh
|
|
|
15648c6 |
%configure --with-python-module-path=%{python3_sitearch} --with-boost-libdir=%{_libdir}
|
|
|
564204d |
echo "Building with %{numthreads} of %{?_smp_build_ncpus} available CPUs"
|
|
|
564204d |
# Uses the latest value set by -j
|
|
|
564204d |
%make_build -j%{numthreads}
|
|
|
564204d |
|
|
|
564204d |
%install
|
|
|
564204d |
%make_install
|
|
|
564204d |
|
|
|
564204d |
# Remove installed doc sources
|
|
|
564204d |
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/%{modname}
|
|
|
564204d |
|
|
|
564204d |
# Remove static objects
|
|
|
564204d |
find $RPM_BUILD_ROOT -name "*.la" -delete
|
|
|
564204d |
|
|
|
564204d |
|
|
|
564204d |
%files -n python3-%{modname}
|
|
|
b20f124 |
%license COPYING
|
|
|
564204d |
%doc README.md ChangeLog AUTHORS
|
|
|
564204d |
%{python3_sitearch}/%{pymodname}
|
|
|
564204d |
%{_libdir}/pkgconfig/%{modname}-py%{python3_version}.pc
|
|
|
564204d |
|
|
|
564204d |
%changelog
|
|
|
5d3997b |
* Fri Feb 12 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 2.33-4
|
|
|
5d3997b |
- Use pkgconfig to BR the required cairomm API/ABI version 1.0 (vs. 1.16)
|
|
|
5d3997b |
|
|
|
dba6e3d |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.33-3
|
|
|
dba6e3d |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
dba6e3d |
|
|
|
ee1dd37 |
* Fri Jan 22 2021 Jonathan Wakely <jwakely@redhat.com> - 2.33-2
|
|
|
ee1dd37 |
- Rebuilt for Boost 1.75
|
|
|
ee1dd37 |
|
|
|
b20f124 |
* Fri Sep 04 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.33-1
|
|
|
b20f124 |
- Update to latest release
|
|
|
b20f124 |
- Disable LTO
|
|
|
b20f124 |
- update COPYING file name
|
|
|
b20f124 |
- Update license
|
|
|
b20f124 |
|
|
|
6963054 |
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.29-7
|
|
|
6963054 |
- Second attempt - Rebuilt for
|
|
|
6963054 |
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
6963054 |
|
|
|
3a88267 |
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.29-6
|
|
|
3a88267 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
3a88267 |
|
|
|
5097cdc |
* Sat May 30 2020 Jonathan Wakely <jwakely@redhat.com> - 2.29-5
|
|
|
5097cdc |
- Rebuilt for Boost 1.73
|
|
|
ed6313d |
- Simplify shell command to determine number of threads to use
|
|
|
5097cdc |
|
|
|
4e22b1a |
* Tue May 26 2020 Miro HronĨok <mhroncok@redhat.com> - 2.29-4
|
|
|
4e22b1a |
- Rebuilt for Python 3.9
|
|
|
4e22b1a |
|
|
|
5c579e0 |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.29-3
|
|
|
5c579e0 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
5c579e0 |
|
|
|
15648c6 |
* Sat Nov 09 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.29-2
|
|
|
15648c6 |
- Exclude builds on arches: usually falls short of resources
|
|
|
15648c6 |
|
|
|
564204d |
* Fri Nov 01 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.29-1
|
|
|
564204d |
- Remove unneeded shebangs
|
|
|
564204d |
|
|
|
564204d |
* Tue Oct 22 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.29-1
|
|
|
564204d |
- Improve conditional to handle cases where _smp_build_ncpus is not defined
|
|
|
564204d |
- Correct conditional hack
|
|
|
564204d |
|
|
|
564204d |
* Tue Oct 15 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.29-1
|
|
|
564204d |
- Initial build
|