Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/python-networkx.git#27bee4b858d5bed980f8b43d0f18e88df1307055
This commit is contained in:
DistroBaker 2020-12-21 21:46:48 +00:00
parent 2698fac405
commit efe3c07905

View File

@ -2,7 +2,7 @@
Name: python-%{srcname}
Version: 2.5
Release: 1.1%{?dist}
Release: 2%{?dist}
Summary: Creates and Manipulates Graphs and Networks
License: BSD
URL: http://networkx.github.io/
@ -12,12 +12,16 @@ Patch0: %{name}-doc.patch
BuildArch: noarch
BuildRequires: make
BuildRequires: python3-devel
BuildRequires: %{py3_dist setuptools}
%if 0%{?rhel} == 0
BuildRequires: fontawesome-fonts-web
BuildRequires: font(fontawesome)
BuildRequires: font(lato)
BuildRequires: font(robotoslab)
BuildRequires: fontconfig
BuildRequires: python3-devel
BuildRequires: python3-docs
BuildRequires: python3-numpy-doc
BuildRequires: %{py3_dist decorator}
@ -35,7 +39,6 @@ BuildRequires: %{py3_dist pytest}
BuildRequires: %{py3_dist pytest-cov}
BuildRequires: %{py3_dist pyyaml}
BuildRequires: %{py3_dist scipy}
BuildRequires: %{py3_dist setuptools}
BuildRequires: %{py3_dist sphinx}
BuildRequires: %{py3_dist sphinx-gallery}
BuildRequires: %{py3_dist sphinx-rtd-theme}
@ -45,6 +48,7 @@ BuildRequires: xdg-utils
# Documentation
BuildRequires: tex(latex)
BuildRequires: tex-preview
%endif
%description
NetworkX is a Python package for the creation, manipulation, and
@ -73,6 +77,7 @@ Provides: python3-%{srcname}-test = %{version}-%{release}
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
%package doc
Summary: Documentation for networkx
Requires: fontawesome-fonts-web
@ -84,6 +89,7 @@ Provides: bundled(js-underscore)
%description doc
Documentation for networkx
%endif
%prep
%autosetup -p0 -n %{srcname}-%{srcname}-%{version}
@ -105,6 +111,7 @@ sed -e "s|'https://docs\.python\.org/2/': None|'https://docs.python.org/': '%{_d
%build
%py3_build
%if 0%{?rhel} == 0
# Build the documentation
PYTHONPATH=$PWD/build/lib make -C doc html
rst2html --no-datestamp README.rst README.html
@ -123,12 +130,14 @@ ln -s $(fc-match -f "%%{file}" "lato") Lato/lato-regular.ttf
ln -s $(fc-match -f "%%{file}" "robotoslab:bold") RobotoSlab/roboto-slab-v7-bold.ttf
ln -s $(fc-match -f "%%{file}" "robotoslab") RobotoSlab/roboto-slab-v7-regular.ttf
cd -
%endif
%install
%py3_install
mv %{buildroot}%{_docdir}/networkx-%{version} ./installed-docs
rm -f installed-docs/INSTALL.txt
%if 0%{?rhel} == 0
# Repack uncompressed zip archives
for fil in $(find doc/build -name \*.zip); do
mkdir zip
@ -138,21 +147,30 @@ for fil in $(find doc/build -name \*.zip); do
cd ..
rm -fr zip
done
%endif
%check
%if 0%{?rhel} == 0
pytest
%endif
%files -n python3-networkx
%if 0%{?rhel} == 0
%doc README.html installed-docs/*
%endif
%license LICENSE.txt
%{python3_sitelib}/networkx*
%if 0%{?rhel} == 0
%files doc
%doc doc/build/html/*
%endif
%changelog
* Sat Dec 19 2020 Petr Šabata <contyk@redhat.com> - 2.5-1.1
- Bump for gcc11
* Fri Dec 11 2020 Petr Lautrbach <plautrba@redhat.com> - 2.5-2
- Limit BuildRequires to necessary minimum in Red Hat Enterprise Linux
- Skip pytest in Red Hat Enterprise Linux
- Do not build -doc subpackage for Red Hat Enterprise Linux
* Sat Aug 22 2020 Jerry James <loganjerry@gmail.com> - 2.5-1
- Version 2.5