3 %bcond_with doc # Sphinx documentation, TODO: fix this
4 %bcond_with tests # unit tests
6 %define module networkx
7 Summary: High-productivity software for complex networks
8 Summary(pl.UTF-8): Efektywne operacje na skomplikowanych grafach
13 Group: Libraries/Python
14 Source0: https://pypi.python.org/packages/source/n/networkx/%{module}-%{version}.tar.gz
15 # Source0-md5: 21f25be1f4373e19153a9beca63346e7
16 URL: http://networkx.github.io/index.html
17 BuildRequires: python3-modules >= 1:3.6
18 BuildRequires: python3-setuptools
20 BuildRequires: python3-decorator >= 4.3.0
22 BuildRequires: rpm-pythonprov
23 BuildRequires: rpmbuild(macros) >= 1.714
25 BuildRequires: python3-nb2plots
26 BuildRequires: python3-sphinx-gallery
27 BuildRequires: python3-texext
28 BuildRequires: sphinx-pdg-3 >= 1.3
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Python language software package for the creation, manipulation, and
35 study of the structure, dynamics, and functions of complex networks.
37 %description -l pl.UTF-8
38 Pakiet oprogramowania do tworzenia, manipulacji i badania struktury
39 dynamiki i funkcji złożonych sieci.
41 %package -n python3-%{module}
42 Summary: High-productivity software for complex networks
43 Summary(pl.UTF-8): Efektywne operacje na skomplikowanych grafach
44 Group: Libraries/Python
45 Requires: python3-modules
47 %description -n python3-%{module}
48 Python language software package for the creation, manipulation, and
49 study of the structure, dynamics, and functions of complex networks.
51 %description -n python3-%{module} -l pl.UTF-8
52 Pakiet oprogramowania do tworzenia, manipulacji i badania struktury
53 dynamiki i funkcji złożonych sieci.
56 Summary: API documentation for Python %{module} module
57 Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
61 API documentation for Python %{module} module.
63 %description apidocs -l pl.UTF-8
64 Dokumentacja API modułu Pythona %{module}.
67 %setup -q -n %{module}-%{version}
74 %{__make} -C doc html \
75 SPHINXBUILD=sphinx-build-3
79 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
84 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
85 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
86 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
88 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{module}-%{version}
91 rm -rf $RPM_BUILD_ROOT
93 %files -n python3-%{module}
94 %defattr(644,root,root,755)
96 %{py3_sitescriptdir}/%{module}
97 %{py3_sitescriptdir}/%{module}-*.egg-info
98 %{_examplesdir}/python3-%{module}-%{version}
102 %defattr(644,root,root,755)
103 %doc docs/_build/html/*