Version 2.7.1.
Do not build documentation by default. Reorganize BRs and Rs by type (extras, tests, docs, etc.).
This commit is contained in:
parent
0536354700
commit
604dbaae73
@ -1,12 +1,14 @@
|
||||
%global srcname networkx
|
||||
# Building documentation requires pydata-sphinx-theme, which can no longer be
|
||||
# updated in Fedora and doesn't exist in RHEL/EPEL.
|
||||
%bcond_with doc
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 2.6.3
|
||||
Release: 3%{?dist}
|
||||
Name: python-networkx
|
||||
Version: 2.7.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Creates and Manipulates Graphs and Networks
|
||||
License: BSD
|
||||
URL: https://networkx.org/
|
||||
Source0: https://github.com/networkx/networkx/archive/%{srcname}-%{version}.tar.gz
|
||||
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
|
||||
@ -25,37 +27,42 @@ BuildRequires: %{py3_dist matplotlib}
|
||||
BuildRequires: %{py3_dist numpy}
|
||||
BuildRequires: %{py3_dist pandas}
|
||||
BuildRequires: %{py3_dist pip}
|
||||
BuildRequires: %{py3_dist pygments}
|
||||
BuildRequires: %{py3_dist scipy}
|
||||
BuildRequires: %{py3_dist setuptools}
|
||||
BuildRequires: %{py3_dist wheel}
|
||||
|
||||
%if 0%{?rhel} == 0
|
||||
# Extras
|
||||
BuildRequires: %{py3_dist lxml}
|
||||
BuildRequires: %{py3_dist pygraphviz}
|
||||
BuildRequires: %{py3_dist pydot}
|
||||
|
||||
# Tests
|
||||
BuildRequires: %{py3_dist pytest}
|
||||
BuildRequires: %{py3_dist pytest-mpl}
|
||||
|
||||
# Documentation
|
||||
BuildRequires: %{py3_dist docutils}
|
||||
%endif
|
||||
|
||||
%if %{with doc}
|
||||
BuildRequires: python-pygraphviz-doc
|
||||
BuildRequires: python3-docs
|
||||
BuildRequires: python3-numpy-doc
|
||||
BuildRequires: %{py3_dist cairocffi}
|
||||
BuildRequires: %{py3_dist contextily}
|
||||
BuildRequires: %{py3_dist gdal}
|
||||
BuildRequires: %{py3_dist geopandas}
|
||||
BuildRequires: %{py3_dist igraph}
|
||||
BuildRequires: %{py3_dist libpysal}
|
||||
BuildRequires: %{py3_dist lxml}
|
||||
BuildRequires: %{py3_dist nb2plots}
|
||||
BuildRequires: %{py3_dist numpydoc}
|
||||
BuildRequires: %{py3_dist pillow}
|
||||
BuildRequires: %{py3_dist pydata-sphinx-theme}
|
||||
BuildRequires: %{py3_dist pydot}
|
||||
BuildRequires: %{py3_dist pygraphviz}
|
||||
BuildRequires: %{py3_dist pytest}
|
||||
BuildRequires: %{py3_dist pytest-cov}
|
||||
BuildRequires: %{py3_dist rtree}
|
||||
BuildRequires: %{py3_dist seaborn}
|
||||
BuildRequires: %{py3_dist sphinx}
|
||||
BuildRequires: %{py3_dist sphinx-gallery}
|
||||
BuildRequires: %{py3_dist texext}
|
||||
BuildRequires: xdg-utils
|
||||
|
||||
# Documentation
|
||||
BuildRequires: tex(latex)
|
||||
BuildRequires: tex-preview
|
||||
%endif
|
||||
@ -64,20 +71,18 @@ 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-%{srcname}
|
||||
%package -n python3-networkx
|
||||
Summary: Creates and Manipulates Graphs and Networks
|
||||
Recommends: %{py3_dist gdal}
|
||||
Recommends: %{py3_dist lxml}
|
||||
Recommends: %{py3_dist pillow}
|
||||
Recommends: %{py3_dist pydot}
|
||||
Recommends: %{py3_dist pygraphviz}
|
||||
Recommends: xdg-utils
|
||||
|
||||
%description -n python3-%{srcname}
|
||||
%description -n python3-networkx
|
||||
NetworkX is a Python 3 package for the creation, manipulation, and
|
||||
study of the structure, dynamics, and functions of complex networks.
|
||||
|
||||
%if 0%{?rhel} == 0
|
||||
%if %{with doc}
|
||||
%package doc
|
||||
Summary: Documentation for networkx
|
||||
Requires: fontawesome5-fonts-all
|
||||
@ -86,10 +91,13 @@ Provides: bundled(js-underscore)
|
||||
|
||||
%description doc
|
||||
Documentation for networkx
|
||||
%else
|
||||
# This can be removed when F40 reaches EOL or the doc subpackage is brought back
|
||||
Obsoletes: %{name}-doc < 2.7-1
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p0 -n %{srcname}-%{srcname}-%{version}
|
||||
%autosetup -p0 -n networkx-networkx-%{version}
|
||||
|
||||
# Do not use env
|
||||
for f in $(grep -FRl %{_bindir}/env .); do
|
||||
@ -100,27 +108,33 @@ for f in $(grep -FRl %{_bindir}/env .); do
|
||||
rm $f.orig
|
||||
done
|
||||
|
||||
%if %{with doc}
|
||||
# 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"|' \
|
||||
-i doc/conf.py
|
||||
%endif
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%if 0%{?rhel} == 0
|
||||
%if %{with doc}
|
||||
# Build the documentation
|
||||
PYTHONPATH=$PWD/build/lib make -C doc html
|
||||
PYTHONPATH=%{pyproject_build_lib} make -C doc html
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} == 0
|
||||
rst2html --no-datestamp README.rst README.html
|
||||
%endif
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%pyproject_save_files networkx
|
||||
mv %{buildroot}%{_docdir}/networkx-%{version} ./installed-docs
|
||||
rm -f installed-docs/INSTALL.txt
|
||||
|
||||
%if 0%{?rhel} == 0
|
||||
%if %{with doc}
|
||||
# Repack uncompressed zip archives
|
||||
for fil in $(find doc/build -name \*.zip); do
|
||||
mkdir zip
|
||||
@ -137,19 +151,22 @@ done
|
||||
%pytest
|
||||
%endif
|
||||
|
||||
%files -n python3-networkx
|
||||
%files -n python3-networkx -f %{pyproject_files}
|
||||
%if 0%{?rhel} == 0
|
||||
%doc README.html installed-docs/*
|
||||
%endif
|
||||
%license LICENSE.txt
|
||||
%{python3_sitelib}/networkx*
|
||||
|
||||
%if 0%{?rhel} == 0
|
||||
%if %{with doc}
|
||||
%files doc
|
||||
%doc doc/build/html/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (networkx-2.6.3.tar.gz) = 514728c5bd6d3f6e984d96a9c3e98a87825cd5d0552d645d0451a57696a366afb4c24887aa480c64bd2b2f95bd36cc60b2401c9908dcf4635af7fc5ab58f0b74
|
||||
SHA512 (networkx-2.7.1.tar.gz) = 71b233c74aea61aa07a0898e72aaedbb3bedb5f25c9e9ee3a62ff639ccf932e238a6650bf0d88f7b6d28d9952df02b522fc8db9fe855c58c39fce6e709040966
|
||||
|
||||
Loading…
Reference in New Issue
Block a user