forked from pool/python-networkx
1 OBS-URL: https://build.opensuse.org/request/show/249853 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-networkx?expand=0&rev=3
86 lines
3.1 KiB
RPMSpec
86 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package python-networkx
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: python-networkx
|
|
Version: 1.9
|
|
Release: 0
|
|
Summary: Python package for the creation, manipulation,
|
|
License: BSD-3-Clause
|
|
Group: Development/Languages/Python
|
|
Url: http://networkx.lanl.gov
|
|
Source: http://pypi.python.org/packages/source/n/networkx/networkx-%{version}.tar.gz
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-PyYAML
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-matplotlib
|
|
BuildRequires: python-numpy-devel
|
|
BuildRequires: python-pydot
|
|
BuildRequires: python-pygraphviz
|
|
BuildRequires: python-pyparsing
|
|
BuildRequires: python-scipy
|
|
BuildRequires: python-setuptools
|
|
Requires: python-decorator >= 3.4.0
|
|
Recommends: python-matplotlib
|
|
Recommends: python-numpy
|
|
Recommends: python-pydot
|
|
Recommends: python-pygraphviz
|
|
Recommends: python-PyYAML
|
|
Recommends: python-pyparsing
|
|
Recommends: python-scipy
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
%else
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%description
|
|
NetworkX (NX) is a Python package for the creation, manipulation, and study of the structure, dynamics,
|
|
and functions of complex networks.
|
|
|
|
Features:
|
|
* Includes standard graph-theoretic and statistical physics functions
|
|
* Easy exchange of network algorithms between applications, disciplines, and platforms
|
|
* Includes many classic graphs and synthetic networks
|
|
* Nodes and edges can be "anything" (e.g. time-series, text, images, XML records)
|
|
* Exploits existing code from high-quality legacy software in C, C++, Fortran, etc.
|
|
* Open source (encourages community input)
|
|
* Unit-tested
|
|
|
|
%prep
|
|
%setup -q -n networkx-%{version}
|
|
sed -i -e "s@share/doc/networkx-.*@share/doc/packages/%{name}'@g" setup.py
|
|
find networkx/ examples/ -name "*.py" -exec sed -i -e '/^#!\s\?\/usr\/bin\/\(env\s\)\?python$/d' {} ';'
|
|
sed -i 's/\r//' examples/algorithms/hartford_drug.edgelist
|
|
|
|
%build
|
|
python setup.py build
|
|
|
|
%install
|
|
python setup.py install --prefix=%{_prefix} --root %{buildroot}
|
|
rm -r %{buildroot}%{_docdir}/%{name}/INSTALL.txt # Makes no sense
|
|
%fdupes -s %{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%{_docdir}/%{name}
|
|
%{python_sitelib}/networkx/
|
|
%{python_sitelib}/networkx-%{version}-py*.egg-info
|
|
|
|
%changelog
|