Add "extra" extras subpackage. Simplify conditionals.
This commit is contained in:
parent
e98af41da3
commit
554e1b8f22
@ -1,6 +1,17 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
Name: python-networkx
|
Name: python-networkx
|
||||||
Version: 2.8.8
|
Version: 2.8.8
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Creates and Manipulates Graphs and Networks
|
Summary: Creates and Manipulates Graphs and Networks
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
URL: https://networkx.org/
|
URL: https://networkx.org/
|
||||||
@ -18,9 +29,6 @@ Patch0: %{name}-doc.patch
|
|||||||
# See https://github.com/networkx/networkx/issues/5913
|
# See https://github.com/networkx/networkx/issues/5913
|
||||||
Patch1: %{name}-test.patch
|
Patch1: %{name}-test.patch
|
||||||
|
|
||||||
# There is a bootstrap loop between libpysal and networkx when tests/docs are enabled
|
|
||||||
%bcond_with bootstrap
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
@ -29,8 +37,7 @@ BuildRequires: pyproject-rpm-macros
|
|||||||
BuildRequires: %{py3_dist setuptools}
|
BuildRequires: %{py3_dist setuptools}
|
||||||
BuildRequires: %{py3_dist pip}
|
BuildRequires: %{py3_dist pip}
|
||||||
BuildRequires: %{py3_dist wheel}
|
BuildRequires: %{py3_dist wheel}
|
||||||
%if %{without bootstrap}
|
%if %{with doctest}
|
||||||
%if 0%{?rhel} == 0
|
|
||||||
BuildRequires: %{py3_dist matplotlib}
|
BuildRequires: %{py3_dist matplotlib}
|
||||||
BuildRequires: %{py3_dist numpy}
|
BuildRequires: %{py3_dist numpy}
|
||||||
BuildRequires: %{py3_dist pandas}
|
BuildRequires: %{py3_dist pandas}
|
||||||
@ -67,7 +74,6 @@ BuildRequires: sympy-doc
|
|||||||
BuildRequires: tex(latex)
|
BuildRequires: tex(latex)
|
||||||
BuildRequires: tex-preview
|
BuildRequires: tex-preview
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
NetworkX is a Python package for the creation, manipulation, and
|
NetworkX is a Python package for the creation, manipulation, and
|
||||||
@ -75,21 +81,13 @@ study of the structure, dynamics, and functions of complex networks.
|
|||||||
|
|
||||||
%package -n python3-networkx
|
%package -n python3-networkx
|
||||||
Summary: Creates and Manipulates Graphs and Networks
|
Summary: Creates and Manipulates Graphs and Networks
|
||||||
Recommends: %{py3_dist lxml}
|
|
||||||
Recommends: %{py3_dist matplotlib}
|
|
||||||
Recommends: %{py3_dist numpy}
|
|
||||||
Recommends: %{py3_dist pandas}
|
|
||||||
Recommends: %{py3_dist pydot}
|
|
||||||
Recommends: %{py3_dist pygraphviz}
|
|
||||||
Recommends: %{py3_dist scipy}
|
|
||||||
Recommends: xdg-utils
|
Recommends: xdg-utils
|
||||||
|
|
||||||
%description -n python3-networkx
|
%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 %{without bootstrap}
|
%if %{with doctest}
|
||||||
%if 0%{?rhel} == 0
|
|
||||||
%package doc
|
%package doc
|
||||||
# The content is BSD-3-Clause. Other licenses are due to files copied in by
|
# The content is BSD-3-Clause. Other licenses are due to files copied in by
|
||||||
# Sphinx.
|
# Sphinx.
|
||||||
@ -129,13 +127,14 @@ Provides: bundled(js-underscore)
|
|||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
Documentation for networkx
|
Documentation for networkx
|
||||||
%endif
|
|
||||||
|
%pyproject_extras_subpkg -n python3-networkx extra
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p0 -n networkx-networkx-%{version}
|
%autosetup -p0 -n networkx-networkx-%{version}
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
%if %{with doctest}
|
||||||
# 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"|' \
|
||||||
@ -144,10 +143,16 @@ sed -e 's|\("https://docs\.python\.org/3/", \)None|\1"%{_docdir}/python3-docs/ht
|
|||||||
-i doc/conf.py
|
-i doc/conf.py
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Fedora does not have osmnx or momepy
|
||||||
|
sed -i '/osmnx/d;/momepy/d' requirements/example.txt
|
||||||
|
|
||||||
|
# Allow use of numpydoc 1.4 until Fedora catches up
|
||||||
|
sed -i 's/\(numpydoc>=1.\)5/\14/' requirements/doc.txt
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
|
||||||
%if %{without bootstrap} && 0%{?rhel} == 0
|
%if %{with doctest}
|
||||||
# Build the documentation
|
# Build the documentation
|
||||||
PYTHONPATH=%{pyproject_build_lib} make -C doc html
|
PYTHONPATH=%{pyproject_build_lib} make -C doc html
|
||||||
rst2html --no-datestamp README.rst README.html
|
rst2html --no-datestamp README.rst README.html
|
||||||
@ -159,7 +164,7 @@ rst2html --no-datestamp README.rst README.html
|
|||||||
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 %{without bootstrap} && 0%{?rhel} == 0
|
%if %{with doctest}
|
||||||
# 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
|
||||||
@ -172,25 +177,27 @@ done
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if 0%{?rhel} == 0
|
%if %{with doctest}
|
||||||
%if %{without bootstrap}
|
|
||||||
%pytest
|
%pytest
|
||||||
%else
|
%else
|
||||||
%pyproject_check_import -e '*.tests.*' -e '*.conftest'
|
%pyproject_check_import -e '*.tests.*' -e '*.conftest'
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n python3-networkx -f %{pyproject_files}
|
%files -n python3-networkx -f %{pyproject_files}
|
||||||
%if %{without bootstrap} && 0%{?rhel} == 0
|
%if %{with doctest}
|
||||||
%doc README.html installed-docs/*
|
%doc README.html installed-docs/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{without bootstrap} && 0%{?rhel} == 0
|
%if %{with doctest}
|
||||||
%files doc
|
%files doc
|
||||||
%doc doc/build/html/*
|
%doc doc/build/html/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.8-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user