Allow bootstrap for new Python version
This commit is contained in:
parent
887edf7bc1
commit
64c7d2a2df
@ -15,18 +15,22 @@ Source0: https://github.com/networkx/networkx/archive/networkx-%{version}
|
|||||||
# - plot_lines requires momepy
|
# - plot_lines requires momepy
|
||||||
Patch0: %{name}-doc.patch
|
Patch0: %{name}-doc.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
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: %{py3_dist setuptools}
|
||||||
|
BuildRequires: %{py3_dist pip}
|
||||||
|
BuildRequires: %{py3_dist wheel}
|
||||||
|
%if %{without bootstrap}
|
||||||
BuildRequires: %{py3_dist matplotlib}
|
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 pygments}
|
BuildRequires: %{py3_dist pygments}
|
||||||
BuildRequires: %{py3_dist scipy}
|
BuildRequires: %{py3_dist scipy}
|
||||||
BuildRequires: %{py3_dist setuptools}
|
|
||||||
BuildRequires: %{py3_dist wheel}
|
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
%if 0%{?rhel} == 0
|
||||||
# Extras
|
# Extras
|
||||||
@ -62,6 +66,7 @@ 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
|
||||||
@ -78,6 +83,7 @@ Recommends: xdg-utils
|
|||||||
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 0%{?rhel} == 0
|
%if 0%{?rhel} == 0
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for networkx
|
Summary: Documentation for networkx
|
||||||
@ -88,6 +94,7 @@ Provides: bundled(js-underscore)
|
|||||||
%description doc
|
%description doc
|
||||||
Documentation for networkx
|
Documentation for networkx
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p0 -n networkx-networkx-%{version}
|
%autosetup -p0 -n networkx-networkx-%{version}
|
||||||
@ -104,7 +111,7 @@ sed -e 's|\("https://docs\.python\.org/3/", \)None|\1"%{_docdir}/python3-docs/ht
|
|||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
%if %{without bootstrap} && 0%{?rhel} == 0
|
||||||
# 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
|
||||||
@ -116,7 +123,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 0%{?rhel} == 0
|
%if %{without bootstrap} && 0%{?rhel} == 0
|
||||||
# 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
|
||||||
@ -130,15 +137,19 @@ done
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
%if 0%{?rhel} == 0
|
%if 0%{?rhel} == 0
|
||||||
|
%if %{without bootstrap}
|
||||||
%pytest
|
%pytest
|
||||||
|
%else
|
||||||
|
%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 0%{?rhel} == 0
|
%if %{without bootstrap} && 0%{?rhel} == 0
|
||||||
%doc README.html installed-docs/*
|
%doc README.html installed-docs/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
%if %{without bootstrap} && 0%{?rhel} == 0
|
||||||
%files doc
|
%files doc
|
||||||
%doc doc/build/html/*
|
%doc doc/build/html/*
|
||||||
%endif
|
%endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user