Accepting request 494504 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/494504 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-networkx?expand=0&rev=11
This commit is contained in:
parent
640bcafda5
commit
31d15ec2d6
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 11 03:12:50 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Implement single-spec version.
|
||||||
|
- Fix source URL.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Aug 17 08:35:56 UTC 2016 - tbechtold@suse.com
|
Wed Aug 17 08:35:56 UTC 2016 - tbechtold@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-networkx
|
# spec file for package python-networkx
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,6 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-networkx
|
Name: python-networkx
|
||||||
Version: 1.11
|
Version: 1.11
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -23,39 +24,29 @@ Summary: Python package for the creation, manipulation,
|
|||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: http://networkx.lanl.gov
|
Url: http://networkx.lanl.gov
|
||||||
Source: http://pypi.python.org/packages/source/n/networkx/networkx-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/n/networkx/networkx-%{version}.tar.gz
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-PyYAML
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python-decorator >= 3.4.0
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: python-devel
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: python-numpy-devel
|
BuildRequires: %{python_module PyYAML}
|
||||||
BuildRequires: python-pydot
|
BuildRequires: %{python_module decorator >= 3.4.0}
|
||||||
BuildRequires: python-pyparsing
|
BuildRequires: %{python_module numpy-devel}
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: %{python_module pydot}
|
||||||
#don't use non available deps on SLES
|
BuildRequires: %{python_module pyparsing}
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315
|
BuildRequires: %{python_module matplotlib}
|
||||||
BuildRequires: python-matplotlib
|
BuildRequires: %{python_module scipy}
|
||||||
BuildRequires: python-scipy
|
|
||||||
%endif
|
|
||||||
Requires: python-decorator >= 3.4.0
|
Requires: python-decorator >= 3.4.0
|
||||||
# Recommends: is not understood by redhat's RPM version
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
Recommends: python-pydot
|
Recommends: python-pydot
|
||||||
Recommends: python-pygraphviz
|
Recommends: python-pygraphviz
|
||||||
Recommends: python-PyYAML
|
Recommends: python-PyYAML
|
||||||
Recommends: python-pyparsing
|
Recommends: python-pyparsing
|
||||||
Recommends: python-numpy
|
Recommends: python-numpy
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315
|
|
||||||
Recommends: python-matplotlib
|
Recommends: python-matplotlib
|
||||||
Recommends: python-scipy
|
Recommends: python-scipy
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
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
|
BuildArch: noarch
|
||||||
%endif
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
NetworkX (NX) is a Python package for the creation, manipulation, and study of the structure, dynamics,
|
NetworkX (NX) is a Python package for the creation, manipulation, and study of the structure, dynamics,
|
||||||
@ -69,28 +60,44 @@ Features:
|
|||||||
* Exploits existing code from high-quality legacy software in C, C++, Fortran, etc.
|
* Exploits existing code from high-quality legacy software in C, C++, Fortran, etc.
|
||||||
* Open source (encourages community input)
|
* Open source (encourages community input)
|
||||||
* Unit-tested
|
* Unit-tested
|
||||||
|
|
||||||
|
%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}.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n networkx-%{version}
|
%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
|
%build
|
||||||
python setup.py build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root %{buildroot}
|
%python_install
|
||||||
rm -r %{buildroot}%{_docdir}/%{name}/INSTALL.txt # Makes no sense
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%fdupes -s %{buildroot}
|
|
||||||
|
|
||||||
%files
|
# 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
|
||||||
|
|
||||||
|
# Installation instructions shouldn't be packaged
|
||||||
|
rm %{buildroot}%{_docdir}/networkx-%{version}/INSTALL.txt
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_docdir}/%{name}
|
|
||||||
%doc README.rst LICENSE.txt
|
%doc README.rst LICENSE.txt
|
||||||
%{python_sitelib}/networkx/
|
%{python_sitelib}/networkx/
|
||||||
%{python_sitelib}/networkx-%{version}-py*.egg-info
|
%{python_sitelib}/networkx-%{version}-py*.egg-info
|
||||||
|
|
||||||
|
%files -n %{name}-doc
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc LICENSE.txt
|
||||||
|
%{_docdir}/networkx-%{version}/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user