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}
|
Name: python-networkx
|
||||||
Version: 2.6.3
|
Version: 2.7.1
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Creates and Manipulates Graphs and Networks
|
Summary: Creates and Manipulates Graphs and Networks
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://networkx.org/
|
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.
|
# Some examples cannot be executed, so expect them to fail.
|
||||||
# Examples that require network access:
|
# Examples that require network access:
|
||||||
# - football
|
# - football
|
||||||
@ -25,37 +27,42 @@ BuildRequires: %{py3_dist matplotlib}
|
|||||||
BuildRequires: %{py3_dist numpy}
|
BuildRequires: %{py3_dist numpy}
|
||||||
BuildRequires: %{py3_dist pandas}
|
BuildRequires: %{py3_dist pandas}
|
||||||
BuildRequires: %{py3_dist pip}
|
BuildRequires: %{py3_dist pip}
|
||||||
|
BuildRequires: %{py3_dist pygments}
|
||||||
BuildRequires: %{py3_dist scipy}
|
BuildRequires: %{py3_dist scipy}
|
||||||
BuildRequires: %{py3_dist setuptools}
|
BuildRequires: %{py3_dist setuptools}
|
||||||
BuildRequires: %{py3_dist wheel}
|
BuildRequires: %{py3_dist wheel}
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
%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: python-pygraphviz-doc
|
||||||
BuildRequires: python3-docs
|
BuildRequires: python3-docs
|
||||||
BuildRequires: python3-numpy-doc
|
BuildRequires: python3-numpy-doc
|
||||||
BuildRequires: %{py3_dist cairocffi}
|
BuildRequires: %{py3_dist cairocffi}
|
||||||
BuildRequires: %{py3_dist contextily}
|
BuildRequires: %{py3_dist contextily}
|
||||||
BuildRequires: %{py3_dist gdal}
|
|
||||||
BuildRequires: %{py3_dist geopandas}
|
BuildRequires: %{py3_dist geopandas}
|
||||||
BuildRequires: %{py3_dist igraph}
|
BuildRequires: %{py3_dist igraph}
|
||||||
BuildRequires: %{py3_dist libpysal}
|
BuildRequires: %{py3_dist libpysal}
|
||||||
BuildRequires: %{py3_dist lxml}
|
|
||||||
BuildRequires: %{py3_dist nb2plots}
|
BuildRequires: %{py3_dist nb2plots}
|
||||||
BuildRequires: %{py3_dist numpydoc}
|
BuildRequires: %{py3_dist numpydoc}
|
||||||
BuildRequires: %{py3_dist pillow}
|
BuildRequires: %{py3_dist pillow}
|
||||||
BuildRequires: %{py3_dist pydata-sphinx-theme}
|
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 seaborn}
|
||||||
BuildRequires: %{py3_dist sphinx}
|
BuildRequires: %{py3_dist sphinx}
|
||||||
BuildRequires: %{py3_dist sphinx-gallery}
|
BuildRequires: %{py3_dist sphinx-gallery}
|
||||||
BuildRequires: %{py3_dist texext}
|
BuildRequires: %{py3_dist texext}
|
||||||
BuildRequires: xdg-utils
|
|
||||||
|
|
||||||
# Documentation
|
|
||||||
BuildRequires: tex(latex)
|
BuildRequires: tex(latex)
|
||||||
BuildRequires: tex-preview
|
BuildRequires: tex-preview
|
||||||
%endif
|
%endif
|
||||||
@ -64,20 +71,18 @@ BuildRequires: tex-preview
|
|||||||
NetworkX is a Python package for the creation, manipulation, and
|
NetworkX is a Python package for the creation, manipulation, and
|
||||||
study of the structure, dynamics, and functions of complex networks.
|
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
|
Summary: Creates and Manipulates Graphs and Networks
|
||||||
Recommends: %{py3_dist gdal}
|
|
||||||
Recommends: %{py3_dist lxml}
|
Recommends: %{py3_dist lxml}
|
||||||
Recommends: %{py3_dist pillow}
|
|
||||||
Recommends: %{py3_dist pydot}
|
Recommends: %{py3_dist pydot}
|
||||||
Recommends: %{py3_dist pygraphviz}
|
Recommends: %{py3_dist pygraphviz}
|
||||||
Recommends: xdg-utils
|
Recommends: xdg-utils
|
||||||
|
|
||||||
%description -n python3-%{srcname}
|
%description -n python3-networkx
|
||||||
NetworkX is a Python 3 package for the creation, manipulation, and
|
NetworkX is a Python 3 package for the creation, manipulation, and
|
||||||
study of the structure, dynamics, and functions of complex networks.
|
study of the structure, dynamics, and functions of complex networks.
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
%if %{with doc}
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for networkx
|
Summary: Documentation for networkx
|
||||||
Requires: fontawesome5-fonts-all
|
Requires: fontawesome5-fonts-all
|
||||||
@ -86,10 +91,13 @@ Provides: bundled(js-underscore)
|
|||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
Documentation for networkx
|
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
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p0 -n %{srcname}-%{srcname}-%{version}
|
%autosetup -p0 -n networkx-networkx-%{version}
|
||||||
|
|
||||||
# Do not use env
|
# Do not use env
|
||||||
for f in $(grep -FRl %{_bindir}/env .); do
|
for f in $(grep -FRl %{_bindir}/env .); do
|
||||||
@ -100,27 +108,33 @@ for f in $(grep -FRl %{_bindir}/env .); do
|
|||||||
rm $f.orig
|
rm $f.orig
|
||||||
done
|
done
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
# Use local objects.inv for intersphinx
|
# Use local objects.inv for intersphinx
|
||||||
sed -e 's|\("https://docs\.python\.org/3/", \)None|\1"%{_docdir}/python3-docs/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"|' \
|
-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://pygraphviz.github.io/documentation/stable/", \)None|\1"%{_docdir}/python-pygraphviz/html/objects.inv"|' \
|
||||||
-i doc/conf.py
|
-i doc/conf.py
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
%if %{with doc}
|
||||||
# Build the documentation
|
# 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
|
rst2html --no-datestamp README.rst README.html
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
|
%pyproject_save_files networkx
|
||||||
mv %{buildroot}%{_docdir}/networkx-%{version} ./installed-docs
|
mv %{buildroot}%{_docdir}/networkx-%{version} ./installed-docs
|
||||||
rm -f installed-docs/INSTALL.txt
|
rm -f installed-docs/INSTALL.txt
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
%if %{with doc}
|
||||||
# Repack uncompressed zip archives
|
# Repack uncompressed zip archives
|
||||||
for fil in $(find doc/build -name \*.zip); do
|
for fil in $(find doc/build -name \*.zip); do
|
||||||
mkdir zip
|
mkdir zip
|
||||||
@ -137,19 +151,22 @@ done
|
|||||||
%pytest
|
%pytest
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n python3-networkx
|
%files -n python3-networkx -f %{pyproject_files}
|
||||||
%if 0%{?rhel} == 0
|
%if 0%{?rhel} == 0
|
||||||
%doc README.html installed-docs/*
|
%doc README.html installed-docs/*
|
||||||
%endif
|
%endif
|
||||||
%license LICENSE.txt
|
|
||||||
%{python3_sitelib}/networkx*
|
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
%if %{with doc}
|
||||||
%files doc
|
%files doc
|
||||||
%doc doc/build/html/*
|
%doc doc/build/html/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%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
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.3-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
- 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