]> git.pld-linux.org Git - packages/python-networkx.git/blame - python-networkx.spec
- added python3 package
[packages/python-networkx.git] / python-networkx.spec
CommitLineData
c295a98f
JR
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
0ca5a8a7 6
c295a98f 7%define module networkx
2508e464
MK
8Summary: High-productivity software for complex networks
9Summary(pl.UTF-8): Efektywne operacje na skompliwkoanych grafach.
10Name: python-%{module}
eb4a0570 11Version: 1.8.1
2f746b1e 12Release: 3
2508e464
MK
13License: BSD
14Group: Libraries/Python
23a38f7a 15Source0: https://pypi.python.org/packages/source/n/networkx/%{module}-%{version}.tar.gz
eb4a0570 16# Source0-md5: b4a9e68ecd1b0164446ee432d2e20bd0
2508e464 17URL: http://networkx.github.io/index.html
2508e464 18BuildRequires: rpm-pythonprov
39c3ebbc 19BuildRequires: rpmbuild(macros) >= 1.710
c295a98f
JR
20%if %{with python2}
21BuildRequires: python-distribute
22%endif
23%if %{with python3}
24BuildRequires: python3-modules
25BuildRequires: python3-setuptools
26%endif
27%{?with_doc:BuildRequires: python-matplotlib}
2508e464
MK
28Requires: python-modules
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33Python language software package for the creation, manipulation, and
34study of the structure, dynamics, and functions of complex networks.
35
2508e464
MK
36%description -l pl.UTF-8
37Pakiet oprogramowania do tworzenia, manipulacji i badania struktury
38dynamiki i funkcji zlozonych sieci.
39
c295a98f
JR
40%package -n python3-%{module}
41Summary: High-productivity software for complex networks
42Summary(pl.UTF-8): Efektywne operacje na skompliwkoanych grafach.
43Group: Libraries/Python
44Requires: python3-modules
45
46%description -n python3-%{module}
47Python language software package for the creation, manipulation, and
48study of the structure, dynamics, and functions of complex networks.
49
50%description -n python3-%{module} -l pl.UTF-8
51Pakiet oprogramowania do tworzenia, manipulacji i badania struktury
52dynamiki i funkcji zlozonych sieci.
53
54%package apidocs
55Summary: API documentation for Python %{module} module
56Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
57Group: Documentation
58
59%description apidocs
60API documentation for Python %{module} module.
61
62%description apidocs -l pl.UTF-8
63Dokumentacja API modułu Pythona %{module}.
64
2508e464
MK
65%prep
66%setup -q -n %{module}-%{version}
67
68%build
c295a98f 69%if %{with python2}
66850fb0 70%py_build
c295a98f
JR
71%endif
72
73%if %{with python3}
74%py3_build
75%endif
76
77%if %{with doc}
78cd doc
79%{__make} -j1 html
80rm -rf _build/html/_sources
81%endif
2508e464 82
2508e464
MK
83%install
84rm -rf $RPM_BUILD_ROOT
2508e464 85
c295a98f
JR
86%if %{with python2}
87%py_install
2508e464
MK
88
89%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
90%py_comp $RPM_BUILD_ROOT%{py_sitedir}
91%py_postclean
92
c295a98f
JR
93install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
94cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
95find $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
102install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
103cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
104find $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
2508e464
MK
110%clean
111rm -rf $RPM_BUILD_ROOT
112
c295a98f 113%if %{with python2}
2508e464
MK
114%files
115%defattr(644,root,root,755)
c295a98f 116%doc README.txt
2508e464 117%{py_sitescriptdir}/%{module}
2508e464 118%{py_sitescriptdir}/%{module}-*.egg-info
c295a98f
JR
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/*
2508e464 135%endif
This page took 0.078197 seconds and 4 git commands to generate.