2014-03-30 06:28:38 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-networkx
|
|
|
|
#
|
2019-01-02 14:18:54 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-03-30 06:28:38 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-01-02 14:18:54 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-03-30 06:28:38 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-05-16 12:43:40 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2014-03-30 06:28:38 +00:00
|
|
|
Name: python-networkx
|
2019-01-02 14:18:54 +00:00
|
|
|
Version: 2.2
|
2014-03-30 06:28:38 +00:00
|
|
|
Release: 0
|
2019-02-03 18:47:28 +00:00
|
|
|
Summary: Python package for the study of complex networks
|
2014-09-17 15:26:53 +00:00
|
|
|
License: BSD-3-Clause
|
2014-03-30 06:28:38 +00:00
|
|
|
Group: Development/Languages/Python
|
2019-01-02 14:18:54 +00:00
|
|
|
URL: https://networkx.github.io/
|
2017-11-09 13:01:23 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/n/networkx/networkx-%{version}.zip
|
2017-05-16 12:43:40 +00:00
|
|
|
BuildRequires: %{python_module PyYAML}
|
|
|
|
BuildRequires: %{python_module decorator >= 3.4.0}
|
2017-11-09 13:01:23 +00:00
|
|
|
BuildRequires: %{python_module matplotlib}
|
2019-01-02 14:18:54 +00:00
|
|
|
BuildRequires: %{python_module nose >= 0.10.1}
|
2017-05-16 12:43:40 +00:00
|
|
|
BuildRequires: %{python_module pydot}
|
|
|
|
BuildRequires: %{python_module pyparsing}
|
|
|
|
BuildRequires: %{python_module scipy}
|
2017-11-09 13:01:23 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: unzip
|
2014-09-17 15:26:53 +00:00
|
|
|
Requires: python-decorator >= 3.4.0
|
2018-09-04 20:56:20 +00:00
|
|
|
Recommends: python-PyYAML
|
|
|
|
Recommends: python-matplotlib
|
2014-03-30 06:28:38 +00:00
|
|
|
Recommends: python-pydot
|
|
|
|
Recommends: python-pygraphviz
|
|
|
|
Recommends: python-pyparsing
|
|
|
|
Recommends: python-scipy
|
|
|
|
BuildArch: noarch
|
2017-05-16 12:43:40 +00:00
|
|
|
%python_subpackages
|
2014-03-30 06:28:38 +00:00
|
|
|
|
|
|
|
%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
|
2019-02-03 18:47:28 +00:00
|
|
|
* Exchange of network algorithms between applications, disciplines, and platforms
|
2014-03-30 06:28:38 +00:00
|
|
|
* 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.
|
|
|
|
* Unit-tested
|
2017-11-09 13:01:23 +00:00
|
|
|
|
2017-05-16 12:43:40 +00:00
|
|
|
%package -n %{name}-doc
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
Group: Documentation/Other
|
|
|
|
Provides: %{python_module networkx-doc = %{version}}
|
|
|
|
|
|
|
|
%description -n %{name}-doc
|
|
|
|
Documentation and examples for %{name}.
|
|
|
|
|
2014-03-30 06:28:38 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n networkx-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-05-16 12:43:40 +00:00
|
|
|
%python_build
|
2014-03-30 06:28:38 +00:00
|
|
|
|
|
|
|
%install
|
2017-05-16 12:43:40 +00:00
|
|
|
%python_install
|
|
|
|
|
|
|
|
# Move docs into correct directory if necessary
|
|
|
|
if [ "%{_docdir}" != "%{_datadir}/doc" ] ; then
|
|
|
|
mkdir -p %{buildroot}%{_docdir}/
|
|
|
|
mv %{buildroot}%{_datadir}/doc/networkx-%{version} %{buildroot}%{_docdir}/
|
|
|
|
fi
|
2014-03-30 06:28:38 +00:00
|
|
|
|
2017-08-12 18:26:36 +00:00
|
|
|
%fdupes %{buildroot}%{_docdir}
|
|
|
|
|
|
|
|
%{python_expand pushd %{buildroot}%{$python_sitelib}
|
|
|
|
# Fix wrong-script-interpreter
|
2019-02-03 18:47:28 +00:00
|
|
|
find networkx -name '*test*.py' -exec sed -i "s|#!%{_bindir}/env python|#!%__$python|" {} +
|
|
|
|
find networkx -name '*test*.py' -exec grep -q '#!%__$python' {} \; -exec chmod a+x {} +
|
2017-08-12 18:26:36 +00:00
|
|
|
# Deduplicating files can generate a RPMLINT warning for pyc mtime
|
|
|
|
find networkx -name '*test*.py' -exec $python -m compileall -d %{$python_sitelib} {} \;
|
|
|
|
find networkx -name '*test*.py' -exec $python -O -m compileall -d %{$python_sitelib} {} \;
|
|
|
|
rm -f _current_flavor
|
|
|
|
%fdupes .
|
|
|
|
popd
|
|
|
|
}
|
|
|
|
|
2019-01-02 14:18:54 +00:00
|
|
|
%check
|
2019-01-22 11:34:19 +00:00
|
|
|
# test excluded because it leads to crashes on i586, gh#networkx/networkx#3304
|
|
|
|
%python_exec setup.py nosetests -v -e 'test_subgraph_centrality_big_graph'
|
2019-01-02 14:18:54 +00:00
|
|
|
|
2017-05-16 12:43:40 +00:00
|
|
|
%files %{python_files}
|
2018-09-04 20:56:20 +00:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc README.rst CONTRIBUTING.rst
|
2014-03-30 06:28:38 +00:00
|
|
|
%{python_sitelib}/networkx/
|
|
|
|
%{python_sitelib}/networkx-%{version}-py*.egg-info
|
|
|
|
|
2017-05-16 12:43:40 +00:00
|
|
|
%files -n %{name}-doc
|
2018-09-04 20:56:20 +00:00
|
|
|
%license LICENSE.txt
|
2017-05-16 12:43:40 +00:00
|
|
|
%{_docdir}/networkx-%{version}/
|
|
|
|
|
2014-03-30 06:28:38 +00:00
|
|
|
%changelog
|