]> git.pld-linux.org Git - packages/python3-networkx.git/blob - python-networkx.spec
rebuild with tests and docs
[packages/python3-networkx.git] / python-networkx.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # Sphinx documentation, TODO: fix this
4 %bcond_with     tests   # unit tests
5
6 %define         module  networkx
7 Summary:        High-productivity software for complex networks
8 Summary(pl.UTF-8):      Efektywne operacje na skomplikowanych grafach
9 Name:           python-%{module}
10 Version:        2.5
11 Release:        4
12 License:        BSD
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
19 %if %{with tests}
20 BuildRequires:  python3-decorator >= 4.3.0
21 %endif
22 BuildRequires:  rpm-pythonprov
23 BuildRequires:  rpmbuild(macros) >= 1.714
24 %if %{with doc}
25 BuildRequires:  python3-nb2plots
26 BuildRequires:  python3-sphinx-gallery
27 BuildRequires:  python3-texext
28 BuildRequires:  sphinx-pdg-3 >= 1.3
29 %endif
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Python language software package for the creation, manipulation, and
35 study of the structure, dynamics, and functions of complex networks.
36
37 %description -l pl.UTF-8
38 Pakiet oprogramowania do tworzenia, manipulacji i badania struktury
39 dynamiki i funkcji złożonych sieci.
40
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
46
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.
50
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.
54
55 %package apidocs
56 Summary:        API documentation for Python %{module} module
57 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona %{module}
58 Group:          Documentation
59
60 %description apidocs
61 API documentation for Python %{module} module.
62
63 %description apidocs -l pl.UTF-8
64 Dokumentacja API modułu Pythona %{module}.
65
66 %prep
67 %setup -q -n %{module}-%{version}
68
69 %build
70 %py3_build
71
72 %if %{with doc}
73 PYTHONPATH=$(pwd) \
74 %{__make} -C doc html \
75         SPHINXBUILD=sphinx-build-3
76 %endif
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %py3_install
82
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}|'
87
88 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{module}-%{version}
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %files -n python3-%{module}
94 %defattr(644,root,root,755)
95 %doc README.rst
96 %{py3_sitescriptdir}/%{module}
97 %{py3_sitescriptdir}/%{module}-*.egg-info
98 %{_examplesdir}/python3-%{module}-%{version}
99
100 %if %{with doc}
101 %files apidocs
102 %defattr(644,root,root,755)
103 %doc docs/_build/html/*
104 %endif
This page took 0.086521 seconds and 3 git commands to generate.