]> git.pld-linux.org Git - packages/python-networkx.git/blame - python-networkx.spec
rebuild with python 3.10
[packages/python-networkx.git] / python-networkx.spec
CommitLineData
c295a98f
JR
1#
2# Conditional build:
3%bcond_with doc # Sphinx documentation, TODO: fix this
27be23dc 4%bcond_with tests # unit tests
0ca5a8a7 5
c295a98f 6%define module networkx
2508e464 7Summary: High-productivity software for complex networks
27be23dc 8Summary(pl.UTF-8): Efektywne operacje na skomplikowanych grafach
2508e464 9Name: python-%{module}
a571dedc 10Version: 2.5
795a247b 11Release: 3
2508e464
MK
12License: BSD
13Group: Libraries/Python
23a38f7a 14Source0: https://pypi.python.org/packages/source/n/networkx/%{module}-%{version}.tar.gz
a571dedc 15# Source0-md5: 21f25be1f4373e19153a9beca63346e7
2508e464 16URL: http://networkx.github.io/index.html
27be23dc 17BuildRequires: python3-modules >= 1:3.6
c295a98f 18BuildRequires: python3-setuptools
27be23dc
JB
19%if %{with tests}
20BuildRequires: python3-decorator >= 4.3.0
21%endif
22BuildRequires: rpm-pythonprov
23BuildRequires: rpmbuild(macros) >= 1.714
24%if %{with doc}
25BuildRequires: python3-nb2plots
26BuildRequires: python3-sphinx-gallery
27BuildRequires: python3-texext
28BuildRequires: sphinx-pdg-3 >= 1.3
29%endif
2508e464
MK
30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34Python language software package for the creation, manipulation, and
35study of the structure, dynamics, and functions of complex networks.
36
2508e464
MK
37%description -l pl.UTF-8
38Pakiet oprogramowania do tworzenia, manipulacji i badania struktury
27be23dc 39dynamiki i funkcji złożonych sieci.
2508e464 40
c295a98f
JR
41%package -n python3-%{module}
42Summary: High-productivity software for complex networks
27be23dc 43Summary(pl.UTF-8): Efektywne operacje na skomplikowanych grafach
c295a98f
JR
44Group: Libraries/Python
45Requires: python3-modules
46
47%description -n python3-%{module}
48Python language software package for the creation, manipulation, and
49study of the structure, dynamics, and functions of complex networks.
50
51%description -n python3-%{module} -l pl.UTF-8
52Pakiet oprogramowania do tworzenia, manipulacji i badania struktury
27be23dc 53dynamiki i funkcji złożonych sieci.
c295a98f
JR
54
55%package apidocs
56Summary: API documentation for Python %{module} module
57Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
58Group: Documentation
59
60%description apidocs
61API documentation for Python %{module} module.
62
63%description apidocs -l pl.UTF-8
64Dokumentacja API modułu Pythona %{module}.
65
2508e464
MK
66%prep
67%setup -q -n %{module}-%{version}
68
69%build
c295a98f 70%py3_build
c295a98f
JR
71
72%if %{with doc}
27be23dc
JB
73PYTHONPATH=$(pwd) \
74%{__make} -C doc html \
75 SPHINXBUILD=sphinx-build-3
c295a98f 76%endif
2508e464 77
2508e464
MK
78%install
79rm -rf $RPM_BUILD_ROOT
2508e464 80
c295a98f
JR
81%py3_install
82
83install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
84cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
85find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
86 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
c295a98f
JR
87
88%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{module}-%{version}
89
2508e464
MK
90%clean
91rm -rf $RPM_BUILD_ROOT
92
c295a98f
JR
93%files -n python3-%{module}
94%defattr(644,root,root,755)
a571dedc 95%doc README.rst
c295a98f
JR
96%{py3_sitescriptdir}/%{module}
97%{py3_sitescriptdir}/%{module}-*.egg-info
98%{_examplesdir}/python3-%{module}-%{version}
c295a98f
JR
99
100%if %{with doc}
101%files apidocs
102%defattr(644,root,root,755)
103%doc docs/_build/html/*
2508e464 104%endif
This page took 0.119358 seconds and 4 git commands to generate.