]> git.pld-linux.org Git - packages/python-networkx.git/blob - python-networkx.spec
- release 7 (by relup.sh)
[packages/python-networkx.git] / python-networkx.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # Sphinx documentation, TODO: fix this
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  networkx
8 Summary:        High-productivity software for complex networks
9 Summary(pl.UTF-8):      Efektywne operacje na skompliwkoanych grafach.
10 Name:           python-%{module}
11 Version:        1.8.1
12 Release:        7
13 License:        BSD
14 Group:          Libraries/Python
15 Source0:        https://pypi.python.org/packages/source/n/networkx/%{module}-%{version}.tar.gz
16 # Source0-md5:  b4a9e68ecd1b0164446ee432d2e20bd0
17 URL:            http://networkx.github.io/index.html
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.710
20 %if %{with python2}
21 BuildRequires:  python-distribute
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-modules
25 BuildRequires:  python3-setuptools
26 %endif
27 %{?with_doc:BuildRequires:      python-matplotlib}
28 Requires:       python-modules
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Python language software package for the creation, manipulation, and
34 study of the structure, dynamics, and functions of complex networks.
35
36 %description -l pl.UTF-8
37 Pakiet oprogramowania do tworzenia, manipulacji i badania struktury
38 dynamiki i funkcji zlozonych sieci.
39
40 %package -n python3-%{module}
41 Summary:        High-productivity software for complex networks
42 Summary(pl.UTF-8):      Efektywne operacje na skompliwkoanych grafach.
43 Group:          Libraries/Python
44 Requires:       python3-modules
45
46 %description -n python3-%{module}
47 Python language software package for the creation, manipulation, and
48 study of the structure, dynamics, and functions of complex networks.
49
50 %description -n python3-%{module} -l pl.UTF-8
51 Pakiet oprogramowania do tworzenia, manipulacji i badania struktury
52 dynamiki i funkcji zlozonych sieci.
53
54 %package apidocs
55 Summary:        API documentation for Python %{module} module
56 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona %{module}
57 Group:          Documentation
58
59 %description apidocs
60 API documentation for Python %{module} module.
61
62 %description apidocs -l pl.UTF-8
63 Dokumentacja API modułu Pythona %{module}.
64
65 %prep
66 %setup -q -n %{module}-%{version}
67
68 %build
69 %if %{with python2}
70 %py_build
71 %endif
72
73 %if %{with python3}
74 %py3_build
75 %endif
76
77 %if %{with doc}
78 cd doc
79 %{__make} -j1 html
80 rm -rf _build/html/_sources
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %py_install
88
89 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
90 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
91 %py_postclean
92
93 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
94 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
95 find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -name '*.py' \
96         | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
97 %endif
98
99 %if %{with python3}
100 %py3_install
101
102 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
103 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
104 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
105         | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
106 %endif
107
108 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{module}-%{version}
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %if %{with python2}
114 %files
115 %defattr(644,root,root,755)
116 %doc README.txt
117 %{py_sitescriptdir}/%{module}
118 %{py_sitescriptdir}/%{module}-*.egg-info
119 %{_examplesdir}/python-%{module}-%{version}
120 %endif
121
122 %if %{with python3}
123 %files -n python3-%{module}
124 %defattr(644,root,root,755)
125 %doc README.txt
126 %{py3_sitescriptdir}/%{module}
127 %{py3_sitescriptdir}/%{module}-*.egg-info
128 %{_examplesdir}/python3-%{module}-%{version}
129 %endif
130
131 %if %{with doc}
132 %files apidocs
133 %defattr(644,root,root,755)
134 %doc docs/_build/html/*
135 %endif
This page took 0.062307 seconds and 3 git commands to generate.