1
0
python-networkx/python-networkx.spec

97 lines
3.5 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-networkx
#
# Copyright (c) 2016 SUSE LINUX 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
Accepting request 330047 from devel:languages:python - update to 1.10: * connected_components, weakly_connected_components, and strongly_connected_components return now a generator of sets of nodes. Previously the generator was of lists of nodes. This PR also refactored the connected_components and weakly_connected_components implementations making them faster, especially for large graphs. * The func_iter functions in Di/Multi/Graphs classes are slated for removal in NetworkX 2.0 release. func will behave like func_iter and return an iterator instead of list. These functions are deprecated in NetworkX 1.10 release. * A enumerate_all_cliques function is added in the clique package (networkx.algorithms.clique) for enumerating all cliques (including nonmaximal ones) of undirected graphs. * A coloring package (networkx.algorithms.coloring) is created for graph coloring algorithms. Initially, a greedy_color function is provided for coloring graphs using various greedy heuristics. * A new generator edge_dfs, added to networkx.algorithms.traversal, implements a depth-first traversal of the edges in a graph. This complements functionality provided by a depth-first traversal of the nodes in a graph. For multigraphs, it allows the user to know precisely which edges were followed in a traversal. All NetworkX graph types are supported. A traversal can also reverse edge orientations or ignore them. * A find_cycle function is added to the networkx.algorithms.cycles package to find a cycle in a graph. Edge orientations can be optionally reversed or ignored. * Add a random generator for the duplication-divergence model. * A new networkx.algorithms.dominance package is added for dominance/dominator algorithms on directed graphs. It contains a immediate_dominators function for computing immediate dominators/dominator trees and a (forwarded request 330044 from tbechtold) OBS-URL: https://build.opensuse.org/request/show/330047 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-networkx?expand=0&rev=8
2015-09-11 07:03:58 +00:00
Version: 1.10
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-decorator >= 3.4.0
BuildRequires: python-devel
BuildRequires: python-numpy-devel
BuildRequires: python-pydot
BuildRequires: python-pyparsing
BuildRequires: python-setuptools
#don't use non available deps on SLES
%if 0%{?suse_version} && 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315
BuildRequires: python-matplotlib
BuildRequires: python-scipy
%endif
Requires: python-decorator >= 3.4.0
# Recommends: is not understood by redhat's RPM version
%if 0%{?suse_version}
Recommends: python-pydot
Recommends: python-pygraphviz
Recommends: python-PyYAML
Recommends: python-pyparsing
Recommends: python-numpy
%if 0%{?suse_version} && 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315
Recommends: python-matplotlib
Recommends: python-scipy
%endif
%endif
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-.*@%{_docdir}/%{name}'@g" setup.py
# _docdir contains absolute path, strip /usr/ prefix again
sed -i -e "/^docdirbase/s@/usr/@@" 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}
%doc README.rst LICENSE.txt
%{python_sitelib}/networkx/
%{python_sitelib}/networkx-%{version}-py*.egg-info
%changelog