Hello community, here is the log from the commit of package python-networkx for openSUSE:Factory checked in at 2017-05-16 14:43:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-networkx (Old) and /work/SRC/openSUSE:Factory/.python-networkx.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-networkx" Tue May 16 14:43:40 2017 rev:11 rq:494504 version:1.11 Changes: -------- --- /work/SRC/openSUSE:Factory/python-networkx/python-networkx.changes 2016-08-18 09:18:01.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-networkx.new/python-networkx.changes 2017-05-16 14:44:45.910417533 +0200 @@ -1,0 +2,6 @@ +Thu May 11 03:12:50 UTC 2017 - [email protected] + +- Implement single-spec version. +- Fix source URL. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-networkx.spec ++++++ --- /var/tmp/diff_new_pack.aBuaZ5/_old 2017-05-16 14:44:46.534329868 +0200 +++ /var/tmp/diff_new_pack.aBuaZ5/_new 2017-05-16 14:44:46.534329868 +0200 @@ -1,7 +1,7 @@ # # 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 # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-networkx Version: 1.11 Release: 0 @@ -23,39 +24,29 @@ 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 +Source: https://files.pythonhosted.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 +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module decorator >= 3.4.0} +BuildRequires: %{python_module numpy-devel} +BuildRequires: %{python_module pydot} +BuildRequires: %{python_module pyparsing} +BuildRequires: %{python_module matplotlib} +BuildRequires: %{python_module scipy} 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 +%python_subpackages %description NetworkX (NX) is a Python package for the creation, manipulation, and study of the structure, dynamics, @@ -70,27 +61,43 @@ * Open source (encourages community input) * 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 %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 +%python_build %install -python setup.py install --prefix=%{_prefix} --root %{buildroot} -rm -r %{buildroot}%{_docdir}/%{name}/INSTALL.txt # Makes no sense -%fdupes -s %{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +# 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 -%files +# Installation instructions shouldn't be packaged +rm %{buildroot}%{_docdir}/networkx-%{version}/INSTALL.txt + +%files %{python_files} %defattr(-,root,root) -%{_docdir}/%{name} %doc README.rst LICENSE.txt %{python_sitelib}/networkx/ %{python_sitelib}/networkx-%{version}-py*.egg-info +%files -n %{name}-doc +%defattr(-,root,root) +%doc LICENSE.txt +%{_docdir}/networkx-%{version}/ + %changelog
