]>
Commit | Line | Data |
---|---|---|
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 | 7 | Summary: High-productivity software for complex networks |
27be23dc | 8 | Summary(pl.UTF-8): Efektywne operacje na skomplikowanych grafach |
2508e464 | 9 | Name: python-%{module} |
a571dedc | 10 | Version: 2.5 |
795a247b | 11 | Release: 3 |
2508e464 MK |
12 | License: BSD |
13 | Group: Libraries/Python | |
23a38f7a | 14 | Source0: https://pypi.python.org/packages/source/n/networkx/%{module}-%{version}.tar.gz |
a571dedc | 15 | # Source0-md5: 21f25be1f4373e19153a9beca63346e7 |
2508e464 | 16 | URL: http://networkx.github.io/index.html |
27be23dc | 17 | BuildRequires: python3-modules >= 1:3.6 |
c295a98f | 18 | BuildRequires: python3-setuptools |
27be23dc JB |
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 | |
2508e464 MK |
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 | ||
2508e464 MK |
37 | %description -l pl.UTF-8 |
38 | Pakiet oprogramowania do tworzenia, manipulacji i badania struktury | |
27be23dc | 39 | dynamiki i funkcji złożonych sieci. |
2508e464 | 40 | |
c295a98f JR |
41 | %package -n python3-%{module} |
42 | Summary: High-productivity software for complex networks | |
27be23dc | 43 | Summary(pl.UTF-8): Efektywne operacje na skomplikowanych grafach |
c295a98f JR |
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 | |
27be23dc | 53 | dynamiki i funkcji złożonych sieci. |
c295a98f JR |
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 | ||
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 |
73 | PYTHONPATH=$(pwd) \ |
74 | %{__make} -C doc html \ | |
75 | SPHINXBUILD=sphinx-build-3 | |
c295a98f | 76 | %endif |
2508e464 | 77 | |
2508e464 MK |
78 | %install |
79 | rm -rf $RPM_BUILD_ROOT | |
2508e464 | 80 | |
c295a98f JR |
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}|' | |
c295a98f JR |
87 | |
88 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{module}-%{version} | |
89 | ||
2508e464 MK |
90 | %clean |
91 | rm -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 |