|
|
|
@ -1,54 +1,42 @@
|
|
|
|
|
# There is a bootstrap loop between libpysal and networkx when tests/docs are
|
|
|
|
|
# enabled
|
|
|
|
|
%bcond_with bootstrap
|
|
|
|
|
|
|
|
|
|
# Whether to build documentation and run tests
|
|
|
|
|
%if %{without bootstrap} && 0%{?rhel} == 0
|
|
|
|
|
%bcond_without doctest
|
|
|
|
|
%else
|
|
|
|
|
%bcond_with doctest
|
|
|
|
|
%endif
|
|
|
|
|
%global srcname networkx
|
|
|
|
|
|
|
|
|
|
Name: python-networkx
|
|
|
|
|
Version: 3.2.1
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Name: python-%{srcname}
|
|
|
|
|
Version: 2.6.2
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Summary: Creates and Manipulates Graphs and Networks
|
|
|
|
|
License: BSD-3-Clause
|
|
|
|
|
URL: https://networkx.org/
|
|
|
|
|
Source0: https://github.com/networkx/networkx/archive/networkx-%{version}.tar.gz
|
|
|
|
|
# Some examples cannot be executed, so expect them to fail.
|
|
|
|
|
# Examples that require network access:
|
|
|
|
|
# - football
|
|
|
|
|
# - plot_delaunay (via contextily)
|
|
|
|
|
# - plot_points (via contextily)
|
|
|
|
|
# Examples that require packages not available from Fedora:
|
|
|
|
|
# - osmnx requires osmnx
|
|
|
|
|
# - plot_lines requires momepy
|
|
|
|
|
Patch0: %{name}-doc.patch
|
|
|
|
|
# Temporary workaround for a failing test.
|
|
|
|
|
# See https://github.com/networkx/networkx/issues/5913
|
|
|
|
|
Patch1: %{name}-test.patch
|
|
|
|
|
# Remove nbconvert upper pin (revert #6984) (#7083)
|
|
|
|
|
# https://github.com/networkx/networkx/commit/7394b61059c0bb84f6386eb301f8ccad60e7045d
|
|
|
|
|
# Patch re-created to work with -p0 like the existing patches.
|
|
|
|
|
Patch2: %{name}-unpin-nbconvert.patch
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: http://networkx.github.io/
|
|
|
|
|
Source0: https://github.com/networkx/networkx/archive/%{srcname}-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: %{py3_dist setuptools}
|
|
|
|
|
|
|
|
|
|
%if %{with doctest}
|
|
|
|
|
# Tests
|
|
|
|
|
BuildRequires: %{py3_dist pytest-mpl}
|
|
|
|
|
%if 0%{?rhel} == 0
|
|
|
|
|
BuildRequires: python3-docs
|
|
|
|
|
BuildRequires: %{py3_dist gdal}
|
|
|
|
|
BuildRequires: %{py3_dist lxml}
|
|
|
|
|
BuildRequires: %{py3_dist matplotlib}
|
|
|
|
|
BuildRequires: %{py3_dist nb2plots}
|
|
|
|
|
BuildRequires: %{py3_dist numpy}
|
|
|
|
|
BuildRequires: %{py3_dist numpydoc}
|
|
|
|
|
BuildRequires: %{py3_dist pandas}
|
|
|
|
|
BuildRequires: %{py3_dist pillow}
|
|
|
|
|
BuildRequires: %{py3_dist pydot}
|
|
|
|
|
BuildRequires: %{py3_dist pygraphviz}
|
|
|
|
|
BuildRequires: %{py3_dist pytest}
|
|
|
|
|
BuildRequires: %{py3_dist pytest-cov}
|
|
|
|
|
BuildRequires: %{py3_dist pyyaml}
|
|
|
|
|
BuildRequires: %{py3_dist scipy}
|
|
|
|
|
BuildRequires: %{py3_dist sphinx}
|
|
|
|
|
BuildRequires: %{py3_dist sphinx-gallery}
|
|
|
|
|
BuildRequires: %{py3_dist sphinx-rtd-theme}
|
|
|
|
|
BuildRequires: %{py3_dist texext}
|
|
|
|
|
BuildRequires: xdg-utils
|
|
|
|
|
|
|
|
|
|
# Documentation
|
|
|
|
|
BuildRequires: python-pygraphviz-doc
|
|
|
|
|
BuildRequires: python3-docs
|
|
|
|
|
BuildRequires: python3-numpy-doc
|
|
|
|
|
BuildRequires: %{py3_dist geopandas}
|
|
|
|
|
BuildRequires: %{py3_dist libpysal}
|
|
|
|
|
BuildRequires: sympy-doc
|
|
|
|
|
BuildRequires: tex(latex)
|
|
|
|
|
BuildRequires: tex-preview
|
|
|
|
|
%endif
|
|
|
|
@ -57,94 +45,74 @@ BuildRequires: tex-preview
|
|
|
|
|
NetworkX is a Python package for the creation, manipulation, and
|
|
|
|
|
study of the structure, dynamics, and functions of complex networks.
|
|
|
|
|
|
|
|
|
|
%package -n python3-networkx
|
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
|
Summary: Creates and Manipulates Graphs and Networks
|
|
|
|
|
Recommends: %{py3_dist gdal}
|
|
|
|
|
Recommends: %{py3_dist lxml}
|
|
|
|
|
Recommends: %{py3_dist matplotlib}
|
|
|
|
|
Recommends: %{py3_dist numpy}
|
|
|
|
|
Recommends: %{py3_dist pandas}
|
|
|
|
|
Recommends: %{py3_dist pillow}
|
|
|
|
|
Recommends: %{py3_dist pydot}
|
|
|
|
|
Recommends: %{py3_dist pygraphviz}
|
|
|
|
|
Recommends: %{py3_dist pyparsing}
|
|
|
|
|
Recommends: %{py3_dist pyyaml}
|
|
|
|
|
Recommends: %{py3_dist scipy}
|
|
|
|
|
Recommends: xdg-utils
|
|
|
|
|
|
|
|
|
|
%description -n python3-networkx
|
|
|
|
|
# This can be removed when Fedora 30 reaches EOL
|
|
|
|
|
Obsoletes: python3-%{srcname}-test < 2.3-2
|
|
|
|
|
Provides: python3-%{srcname}-test = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{srcname}
|
|
|
|
|
NetworkX is a Python 3 package for the creation, manipulation, and
|
|
|
|
|
study of the structure, dynamics, and functions of complex networks.
|
|
|
|
|
|
|
|
|
|
%if %{with doctest}
|
|
|
|
|
%if 0%{?rhel} == 0
|
|
|
|
|
%package doc
|
|
|
|
|
# The content is BSD-3-Clause. Other licenses are due to files copied in by
|
|
|
|
|
# Sphinx.
|
|
|
|
|
# _static/_sphinx_javascript_frameworks_compat.js: BSD-2-Clause
|
|
|
|
|
# _static/basic.css: BSD-2-Clause
|
|
|
|
|
# _static/binder_badge_logo.svg: BSD-3-Clause
|
|
|
|
|
# _static/broken_example.png: BSD-3-Clause
|
|
|
|
|
# _static/copybutton.js
|
|
|
|
|
# _static/custom.css: BSD-3-Clause
|
|
|
|
|
# _static/doctools.js: BSD-2-Clause
|
|
|
|
|
# _static/documentation_options.js: BSD-2-Clause
|
|
|
|
|
# _static/file.png: BSD-2-Clause
|
|
|
|
|
# _static/jquery*.js: MIT
|
|
|
|
|
# _static/language_data.js: BSD-2-Clause
|
|
|
|
|
# _static/minus.png: BSD-2-Clause
|
|
|
|
|
# _static/no_image.png: BSD-3-Clause
|
|
|
|
|
# _static/opensearch.xml: BSD-2-Clause
|
|
|
|
|
# _static/plus.png: BSD-2-Clause
|
|
|
|
|
# _static/scripts/pydata-sphinx-theme.js: BSD-3-Clause
|
|
|
|
|
# _static/searchtools.js: BSD-2-Clause
|
|
|
|
|
# _static/sg_gallery.css: BSD-3-Clause
|
|
|
|
|
# _static/sg_gallery-binder.css: BSD-3-Clause
|
|
|
|
|
# _static/sg_gallery-dataframe.css: BSD-3-Clause
|
|
|
|
|
# _static/sg_gallery-rendered-html.css: BSD-3-Clause
|
|
|
|
|
# _static/sphinx_highlight.js: BSD-2-Clause
|
|
|
|
|
# _static/styles/pydata-sphinx-theme.css: BSD-3-Clause
|
|
|
|
|
# _static/styles/theme.css: BSD-3-Clause
|
|
|
|
|
# _static/underscore*.js: MIT
|
|
|
|
|
# genindex.html: BSD-2-Clause
|
|
|
|
|
# search.html: BSD-2-Clause
|
|
|
|
|
# searchindex.js: BSD-2-Clause
|
|
|
|
|
License: BSD-3-Clause AND BSD-2-Clause AND MIT
|
|
|
|
|
Summary: Documentation for networkx
|
|
|
|
|
Requires: fontawesome-fonts-all
|
|
|
|
|
Provides: bundled(js-jquery)
|
|
|
|
|
Requires: font(fontawesome)
|
|
|
|
|
Requires: font(lato)
|
|
|
|
|
Requires: font(robotoslab)
|
|
|
|
|
Provides: bundled(jquery)
|
|
|
|
|
Provides: bundled(js-underscore)
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
Documentation for networkx
|
|
|
|
|
|
|
|
|
|
%pyproject_extras_subpkg -n python3-networkx extra
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p0 -n networkx-networkx-%{version}
|
|
|
|
|
%autosetup -p0 -n %{srcname}-%{srcname}-%{version}
|
|
|
|
|
|
|
|
|
|
# Do not use env
|
|
|
|
|
for f in $(grep -FRl %{_bindir}/env .); do
|
|
|
|
|
sed -e 's,%{_bindir}/env python[[:digit:]]*,%{python3},' \
|
|
|
|
|
-e 's,%{_bindir}/env ,%{_bindir},' \
|
|
|
|
|
-i.orig $f
|
|
|
|
|
touch -r $f.orig $f
|
|
|
|
|
rm $f.orig
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%if %{with doctest}
|
|
|
|
|
# Use local objects.inv for intersphinx
|
|
|
|
|
sed -e 's|\("https://docs\.python\.org/3/", \)None|\1"%{_docdir}/python3-docs/html/objects.inv"|' \
|
|
|
|
|
-e 's|\("https://numpy\.org/doc/stable/", \)None|\1"%{_docdir}/python3-numpy-doc/objects.inv"|' \
|
|
|
|
|
-e 's|\("https://pygraphviz.github.io/documentation/stable/", \)None|\1"%{_docdir}/python-pygraphviz/html/objects.inv"|' \
|
|
|
|
|
-e 's|\("https://docs.sympy.org/latest/", \)None|\1"%{_docdir}/sympy-doc/html/objects.inv"|' \
|
|
|
|
|
sed -e 's|\("https://docs\.python\.org/3/": \)None|\1"%{_docdir}/python3-docs/html/objects.inv"|' \
|
|
|
|
|
-e 's|\("https://numpy\.org/doc/stable/": \)None|\1"%{_docdir}/python3-numpy-doc/objects.inv"|' \
|
|
|
|
|
-i doc/conf.py
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Permit older versions of doc packages where Fedora is behind
|
|
|
|
|
sed -e 's/\(sphinx-gallery>=\)0\.14/\10.11.1/' \
|
|
|
|
|
-i pyproject.toml requirements/doc.txt
|
|
|
|
|
|
|
|
|
|
# Fedora does not have osmnx or momepy
|
|
|
|
|
sed -i '/osmnx/d;/momepy/d' requirements/example.txt
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
%pyproject_buildrequires %{?with_doctest:-x doc,extra,test requirements/example.txt}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%pyproject_wheel
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
%if %{with doctest}
|
|
|
|
|
%if 0%{?rhel} == 0
|
|
|
|
|
# Build the documentation
|
|
|
|
|
PYTHONPATH=$PWD/build/lib make -C doc html
|
|
|
|
|
rst2html --no-datestamp README.rst README.html
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%pyproject_install
|
|
|
|
|
%pyproject_save_files networkx
|
|
|
|
|
%py3_install
|
|
|
|
|
mv %{buildroot}%{_docdir}/networkx-%{version} ./installed-docs
|
|
|
|
|
rm -f installed-docs/INSTALL.txt
|
|
|
|
|
|
|
|
|
|
%if %{with doctest}
|
|
|
|
|
%if 0%{?rhel} == 0
|
|
|
|
|
# Repack uncompressed zip archives
|
|
|
|
|
for fil in $(find doc/build -name \*.zip); do
|
|
|
|
|
mkdir zip
|
|
|
|
@ -157,135 +125,32 @@ done
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
export FLEXIBLAS=NETLIB
|
|
|
|
|
%if %{with doctest}
|
|
|
|
|
%pytest
|
|
|
|
|
%else
|
|
|
|
|
%pyproject_check_import -e '*.tests.*' -e '*.conftest'
|
|
|
|
|
%if 0%{?rhel} == 0
|
|
|
|
|
pytest
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-networkx -f %{pyproject_files}
|
|
|
|
|
%if %{with doctest}
|
|
|
|
|
%doc README.html
|
|
|
|
|
%files -n python3-networkx
|
|
|
|
|
%if 0%{?rhel} == 0
|
|
|
|
|
%doc README.html installed-docs/*
|
|
|
|
|
%endif
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%{python3_sitelib}/networkx*
|
|
|
|
|
|
|
|
|
|
%if %{with doctest}
|
|
|
|
|
%if 0%{?rhel} == 0
|
|
|
|
|
%files doc
|
|
|
|
|
%doc doc/build/html/*
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.2.1-5
|
|
|
|
|
- Rebuilt for MSVSphere 10
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.2.1-5
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Jan 27 2024 Jerry James <loganjerry@gmail.com> - 3.2.1-4
|
|
|
|
|
- Test with netlib
|
|
|
|
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 01 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 3.2.1-2
|
|
|
|
|
- Remove the upper bound on the version of python-nbconvert (fix RHBZ#2256372)
|
|
|
|
|
|
|
|
|
|
* Tue Dec 5 2023 Jerry James <loganjerry@gmail.com> - 3.2.1-1
|
|
|
|
|
- Version 3.2.1
|
|
|
|
|
- Bring back the test patch
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jul 20 2023 Python Maint <python-maint@redhat.com> - 3.1-3
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.1-2
|
|
|
|
|
- Bootstrap for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Fri Apr 7 2023 Jerry James <loganjerry@gmail.com> - 3.1-1
|
|
|
|
|
- Version 3.1
|
|
|
|
|
- Drop obsolete test patch
|
|
|
|
|
- Dynamically generate python dependencies
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.6.2-2
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Thu Mar 30 2023 Jerry James <loganjerry@gmail.com> - 2.8.8-3
|
|
|
|
|
- Add "extra" extras subpackage
|
|
|
|
|
- Simplify conditionals
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.8-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Dec 13 2022 Jerry James <loganjerry@gmail.com> - 2.8.8-1
|
|
|
|
|
- Version 2.8.8
|
|
|
|
|
- Clarify license of the doc subpackage
|
|
|
|
|
|
|
|
|
|
* Sat Oct 1 2022 Jerry James <loganjerry@gmail.com> - 2.8.7-1
|
|
|
|
|
- Version 2.8.7
|
|
|
|
|
- Drop upstreamed matplotlib patch
|
|
|
|
|
|
|
|
|
|
* Wed Aug 31 2022 Jerry James <loganjerry@gmail.com> - 2.8.6-2
|
|
|
|
|
- Add patch to adapt an example to matplotlib 3.6.0
|
|
|
|
|
|
|
|
|
|
* Mon Aug 22 2022 Jerry James <loganjerry@gmail.com> - 2.8.6-1
|
|
|
|
|
- Version 2.8.6
|
|
|
|
|
- Convert License tag to SPDX
|
|
|
|
|
|
|
|
|
|
* Tue Aug 2 2022 Jerry James <loganjerry@gmail.com> - 2.8.5-1
|
|
|
|
|
- Version 2.8.5
|
|
|
|
|
- Add -test patch to work around a test failure
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.3-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jun 23 2022 Python Maint <python-maint@redhat.com> - 2.8.3-3
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 2.8.3-2
|
|
|
|
|
- Bootstrap for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Wed Jun 8 2022 Jerry James <loganjerry@gmail.com> - 2.8.3-1
|
|
|
|
|
- Version 2.8.3
|
|
|
|
|
|
|
|
|
|
* Wed May 18 2022 Jerry James <loganjerry@gmail.com> - 2.8.1-1
|
|
|
|
|
- Version 2.8.1
|
|
|
|
|
|
|
|
|
|
* Wed Apr 20 2022 Jerry James <loganjerry@gmail.com> - 2.8-1
|
|
|
|
|
- Version 2.8
|
|
|
|
|
- Bring back the doc subpackage
|
|
|
|
|
|
|
|
|
|
* Tue Mar 29 2022 Jerry James <loganjerry@gmail.com> - 2.7.1-1
|
|
|
|
|
- Version 2.7.1
|
|
|
|
|
- Do not build documentation by default
|
|
|
|
|
- Reorganize BRs and Rs by type (extras, tests, docs, etc.)
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.3-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Oct 29 2021 Jerry James <loganjerry@gmail.com> - 2.6.3-2
|
|
|
|
|
- Change igraph dependency to match change in Rawhide
|
|
|
|
|
- Update project URL
|
|
|
|
|
|
|
|
|
|
* Fri Sep 10 2021 Jerry James <loganjerry@gmail.com> - 2.6.3-1
|
|
|
|
|
- Version 2.6.3
|
|
|
|
|
|
|
|
|
|
* Wed Aug 25 2021 Jerry James <loganjerry@gmail.com> - 2.6.2-1
|
|
|
|
|
* Wed Aug 4 2021 Petr Lautrbach <plautrba@redhat.com> - 2.6.2-1
|
|
|
|
|
- Version 2.6.2
|
|
|
|
|
- Drop upstreamed -pyyaml patch
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.5.1-3
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Tue May 4 2021 Jerry James <loganjerry@gmail.com> - 2.5.1-2
|
|
|
|
|
- Allow use of decorator >= 5.0.7
|
|
|
|
|
|
|
|
|
|
* Tue Apr 6 2021 Jerry James <loganjerry@gmail.com> - 2.5.1-1
|
|
|
|
|
- Verion 2.5.1
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.5-4
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Jerry James <loganjerry@gmail.com> - 2.5-3
|
|
|
|
|
- Add -pyyaml patch to fix FTBFS
|
|
|
|
|