|
|
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}
|
|
|
3f5393a |
Version: 2.43
|
|
|
5783921 |
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
|
|
|
3f5393a |
# Remove the compilation flags upstream sets
|
|
|
3f5393a |
Patch0: 0001-remove-upstream-compilation-flags.patch
|
|
|
564204d |
|
|
|
d41b471 |
# Need to reduce debugging symbols to make compiling possible on these
|
|
|
d41b471 |
# architectures at all. See:
|
|
|
d41b471 |
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/GIBNORLNGSUHAMX6PZ7XUPQ2SQUK7AX4/
|
|
|
d41b471 |
#
|
|
|
d41b471 |
# Works around:
|
|
|
d41b471 |
# Fails on armv7hl:
|
|
|
d41b471 |
# virtual memory exhausted
|
|
|
15648c6 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1771024
|
|
|
d41b471 |
# Fails on ppc64le:
|
|
|
d41b471 |
# note: variable tracking size limit exceeded with
|
|
|
d41b471 |
# '-fvar-tracking-assignments', retrying without
|
|
|
15648c6 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1771031
|
|
|
d41b471 |
# Fails on s390x:
|
|
|
d41b471 |
# note: variable tracking size limit exceeded with
|
|
|
d41b471 |
# '-fvar-tracking-assignments', retrying without
|
|
|
15648c6 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1771034
|
|
|
d41b471 |
%ifarch armv7hl ppc64le s390x
|
|
|
d41b471 |
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
|
|
d41b471 |
%endif
|
|
|
d41b471 |
|
|
|
d41b471 |
# Fails on i686, armv7hl
|
|
|
d41b471 |
# ../../../src/pcg-cpp/include/pcg_random.hpp:1247:40: error: call to
|
|
|
d41b471 |
# non-'constexpr' function 'pcg_extras::uint_x4<U, V>
|
|
|
d41b471 |
# pcg_extras::operator-(const pcg_extras::uint_x4<U, V>&, const
|
|
|
d41b471 |
# pcg_extras::uint_x4<U, V>&) [with UInt = unsigned int; UIntX2 = long
|
|
|
d41b471 |
# long unsigned int]'
|
|
|
d41b471 |
# 1247 | (state_type(1U) << table_pow2) - state_type(1U);
|
|
|
d41b471 |
# | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
|
|
|
d41b471 |
# In file included from ../../../src/pcg-cpp/include/pcg_extras.hpp:84,
|
|
|
d41b471 |
# from ../../../src/pcg-cpp/include/pcg_random.hpp:114,
|
|
|
d41b471 |
# from ../../../src/graph/random.hh:21,
|
|
|
d41b471 |
# from graph_motifs.hh:26,
|
|
|
d41b471 |
# from graph_motifs.cc:24:
|
|
|
d41b471 |
# ../../../src/pcg-cpp/include/pcg_uint128.hpp:642:22: note:
|
|
|
d41b471 |
# 'pcg_extras::uint_x4<U, V> pcg_extras::operator-(const
|
|
|
d41b471 |
# pcg_extras::uint_x4<U, V>&, const pcg_extras::uint_x4<U, V>&) [with
|
|
|
d41b471 |
# UInt = unsigned int; UIntX2 = long long unsigned int]' declared here
|
|
|
d41b471 |
# 642 | uint_x4<UInt,UIntX2> operator-(const uint_x4<UInt,UIntX2>& a,
|
|
|
d41b471 |
# | ^~~~~~~~
|
|
|
d41b471 |
# issue filed: https://git.skewed.de/count0/graph-tool/issues/617
|
|
|
d41b471 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1771023
|
|
|
d41b471 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1771024
|
|
|
d41b471 |
#
|
|
|
d41b471 |
# Fails on ppc64le:
|
|
|
d41b471 |
# /usr/include/boost/math/tools/promotion.hpp:138:10:
|
|
|
d41b471 |
# error: static assertion failed:
|
|
|
d41b471 |
# Sorry, but this platform does not have sufficient long double support for
|
|
|
d41b471 |
# the special functions to be reliably implemented.
|
|
|
d41b471 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1771031
|
|
|
d41b471 |
#
|
|
|
d41b471 |
# Takes ~23 hours on x86_64 if we get unlucky and get a 6 core 16gig machine,
|
|
|
d41b471 |
# ~4 hours if we get a 48 core 128gig machine
|
|
|
15648c6 |
# Takes ~45 hours on aarch64
|
|
|
d41b471 |
ExcludeArch: %{ix86} armv7hl ppc64le
|
|
|
15648c6 |
|
|
|
3f5393a |
BuildRequires: make
|
|
|
564204d |
BuildRequires: git-core
|
|
|
564204d |
BuildRequires: autoconf
|
|
|
564204d |
BuildRequires: automake
|
|
|
564204d |
BuildRequires: libtool
|
|
|
ed6313d |
BuildRequires: gawk
|
|
|
564204d |
|
|
|
564204d |
%description %_description
|
|
|
564204d |
|
|
|
7e9b2e3 |
|
|
|
564204d |
%package -n python3-%{modname}
|
|
|
564204d |
Summary: %{summary}
|
|
|
7e9b2e3 |
|
|
|
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
|
|
|
7e9b2e3 |
BuildRequires: gcc-c++
|
|
|
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
|
|
|
7e9b2e3 |
# BR -static package of header-only libraries for tracking per guidelines
|
|
|
7e9b2e3 |
BuildRequires: pcg-cpp-devel
|
|
|
7e9b2e3 |
BuildRequires: pcg-cpp-static
|
|
|
564204d |
|
|
|
564204d |
Provides: graph-tool%{?_isa} = %{version}-%{release}
|
|
|
564204d |
|
|
|
564204d |
%description -n python3-%{modname} %_description
|
|
|
564204d |
|
|
|
7e9b2e3 |
|
|
|
7e9b2e3 |
%package -n python3-%{modname}-devel
|
|
|
7e9b2e3 |
Summary: %{summary}
|
|
|
7e9b2e3 |
|
|
|
7e9b2e3 |
Requires: python3-%{modname}%{?_isa} = %{version}-%{release}
|
|
|
7e9b2e3 |
# Since this header-only package is re-exposed as part of the extension API,
|
|
|
7e9b2e3 |
# dependent packages should ideally also BuildRequire pcg-cpp-static for
|
|
|
7e9b2e3 |
# tracking, per guidelines.
|
|
|
1b96014 |
Requires: pcg-cpp-devel
|
|
|
7e9b2e3 |
|
|
|
7e9b2e3 |
Provides: graph-tool-devel%{?_isa} = %{version}-%{release}
|
|
|
7e9b2e3 |
|
|
|
7e9b2e3 |
%description -n python3-%{modname}-devel %_description
|
|
|
7e9b2e3 |
|
|
|
7e9b2e3 |
|
|
|
564204d |
%prep
|
|
|
564204d |
%autosetup -S git -n %{modname}-%{version}
|
|
|
8e0ba16 |
# Remove shebangs from non-script sources
|
|
|
8e0ba16 |
#
|
|
|
8e0ba16 |
# The pattern of selecting files before modifying them with sed keeps us from
|
|
|
8e0ba16 |
# unnecessarily discarding the original mtimes on unmodified files.
|
|
|
7e9b2e3 |
find 'src' -type f -name '*.py' \
|
|
|
8e0ba16 |
-exec gawk '/^#!/ { print FILENAME }; { nextfile }' '{}' '+' |
|
|
|
8e0ba16 |
xargs -r sed -r -i '1{/^#!/d}'
|
|
|
8e0ba16 |
# Fix shebang(s) in sample script(s)
|
|
|
8e0ba16 |
%py3_shebang_fix doc
|
|
|
564204d |
|
|
|
7e9b2e3 |
# Unbundle pcg-cpp. To avoid having to patch the Makefiles, we use symbolic
|
|
|
7e9b2e3 |
# links from the original locations. Note that these are followed when the
|
|
|
7e9b2e3 |
# extension API headers are installed, so we need to re-create them afterwards.
|
|
|
7e9b2e3 |
rm -vf src/pcg-cpp/include/*
|
|
|
7e9b2e3 |
ln -sv \
|
|
|
7e9b2e3 |
'%{_includedir}/pcg_extras.hpp' \
|
|
|
7e9b2e3 |
'%{_includedir}/pcg_random.hpp' \
|
|
|
7e9b2e3 |
'%{_includedir}/pcg_uint128.hpp' \
|
|
|
7e9b2e3 |
'src/pcg-cpp/include/'
|
|
|
7e9b2e3 |
|
|
|
564204d |
|
|
|
564204d |
%build
|
|
|
564204d |
./autogen.sh
|
|
|
3f5393a |
%configure --with-python-module-path=%{python3_sitearch} --with-boost-libdir=%{_libdir} --enable-debug
|
|
|
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 |
|
|
|
7e9b2e3 |
|
|
|
564204d |
%install
|
|
|
564204d |
%make_install
|
|
|
564204d |
|
|
|
564204d |
# Remove installed doc sources
|
|
|
7e9b2e3 |
rm -rf %{buildroot}/%{_datadir}/doc/%{modname}
|
|
|
564204d |
|
|
|
564204d |
# Remove static objects
|
|
|
7e9b2e3 |
find %{buildroot} -name '*.la' -print -delete
|
|
|
7e9b2e3 |
|
|
|
7e9b2e3 |
# Restore symbolic links that were followed in “wheelification”
|
|
|
7e9b2e3 |
ln -svf \
|
|
|
7e9b2e3 |
'%{_includedir}/pcg_extras.hpp' \
|
|
|
7e9b2e3 |
'%{_includedir}/pcg_random.hpp' \
|
|
|
7e9b2e3 |
'%{_includedir}/pcg_uint128.hpp' \
|
|
|
7e9b2e3 |
'%{buildroot}%{python3_sitearch}/%{pymodname}/include/pcg-cpp/'
|
|
|
564204d |
|
|
|
564204d |
|
|
|
564204d |
%files -n python3-%{modname}
|
|
|
b20f124 |
%license COPYING
|
|
|
564204d |
%doc README.md ChangeLog AUTHORS
|
|
|
564204d |
%{python3_sitearch}/%{pymodname}
|
|
|
7e9b2e3 |
%exclude %{python3_sitearch}/%{pymodname}/include
|
|
|
7e9b2e3 |
|
|
|
7e9b2e3 |
|
|
|
7e9b2e3 |
%files -n python3-%{modname}-devel
|
|
|
7e9b2e3 |
%{python3_sitearch}/%{pymodname}/include
|
|
|
564204d |
%{_libdir}/pkgconfig/%{modname}-py%{python3_version}.pc
|
|
|
564204d |
|
|
|
7e9b2e3 |
|
|
|
564204d |
%changelog
|
|
|
5783921 |
* Mon May 02 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 2.43-4
|
|
|
5783921 |
- Drop arch from pcg-cpp-devel dep; fix RHBZ#2080862
|
|
|
5783921 |
|
|
|
7e9b2e3 |
* Mon Sep 20 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 2.43-3
|
|
|
7e9b2e3 |
- Unbundle pcg-cpp
|
|
|
7e9b2e3 |
- Split out headers for C++ extension development into a -devel package
|
|
|
7e9b2e3 |
|
|
|
d41b471 |
* Fri Aug 27 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 2.43-2
|
|
|
d41b471 |
- Work around resource limits to re-enable s390x, and get closer to the root
|
|
|
d41b471 |
causes on the remaining excluded architectures
|
|
|
d41b471 |
|
|
|
3f5393a |
* Tue Aug 10 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.43-1
|
|
|
3f5393a |
- Update to latest release
|
|
|
3f5393a |
- Remove unneeded patches
|
|
|
3f5393a |
|
|
|
0881e38 |
* Sat Aug 07 2021 Jonathan Wakely <jwakely@redhat.com> - 2.33-7
|
|
|
0881e38 |
- Rebuilt for Boost 1.76
|
|
|
0881e38 |
|
|
|
9a7db3a |
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.33-6
|
|
|
9a7db3a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
9a7db3a |
|
|
|
71f9d55 |
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.33-5
|
|
|
71f9d55 |
- Rebuilt for Python 3.10
|
|
|
71f9d55 |
|
|
|
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
|