[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Upload of python-networkx 1.9



Hi,

As per #750233, I have uploaded python-networkx 1.9 in the DELAYED/2
queue. Considering the currently opened RC bug (ie: #750233), I couldn't
wait for too long, otherwise risking AUTORM of some of my packages. The
changelog is as follow:

* Team upload.
* New upstream release (Closes: #750233).
* Ran wrap-and-sort.
* debian/copyright in parseable format 1.0.
* Added extend-diff-ignore = "^[^/]*[.]egg-info/" in d/source/options,
and removed the clean of the egg-info folder.
* Refreshed/rebased 10_doc_relocation, 20_example_dirs_remove and
30_use_local_objects.inv patches.
* Removed 50_force_ordering_in_dict_to_numpy_array_functions.patch
55_fixups_to_numpy_array_functions_patch.patch
60_fix_tests_failure_due_to_py3.3_hash_randomization.patch applied upstream.
* debian/control: removed python-support and added dh-python as build-dep.
* Added python-3.4.patch (comes from the Ubuntu package).
* Removed 40_no_setuptools_in_requires.txt (there's no setup_egg.py
anymore in upstream source code).
* Also cleans networkx/version.py, which is generated.
* Also cleans test.*, doc/source/templates/gallery.html and fontList.cache.
* Added do-not-use-sphinx_rtd_theme.patch.
* debian/rules: do not use setup_egg.py, it's gone from upstream source.
* Move all the doc generation stuff into the override_dh_sphinxdoc.
* Removed obsolete XS-Python-Version: >= 2.6 X-Python3-Version: >= 3.2.
* Adds using-local-mathjax.js.patch to avoid privacy breach in the doc.
* Added missing --with python2.
* Added debian/rules get-orig-src target to generate the orig.tar.xz file.
* Added missing build-depends: python-decorator and python-numpydoc
(needed for building docs).
* Fixed watch file to handle the +dfsg1 mangling.

I first tried to make the changes minimal, but it simply wasn't possible
in this case. There was just too many things to do to have a working
package. I tested building in a cowbuilder and it went fine. I also
tested rebuilding some of the reverse dependencies that I knew were unit
testing with networkx, and it went fine too.

Note that since the pypi tarball was huge for no reason (it contained
generated files from the documentation build process, leading to 35 MB
of stuff instead of less than 1), so I used the git tag from github
instead, to generate the orig.tar.xz. In the process I also cleaned some
non-free files (minimized javascript). The process is now documented in
debian/rules. [It would probably be best to have it done in a
debian/repack file, using the watch file though, but I have no time for
that yet.]

If anyone opposes to this upload, it can be reverted/dcut. The diff of
the debian folder is attached (missing the watch file fixes for the
+dfsg1 handling).

Cheers,

Thomas Goirand (zigo)
diff -u -N -r python-networkx-1.8.1/debian/changelog trunk/debian/changelog
--- python-networkx-1.8.1/debian/changelog	2014-01-18 11:26:50.000000000 +0000
+++ trunk/debian/changelog	2014-06-23 12:05:18.000000000 +0000
@@ -1,3 +1,35 @@
+python-networkx (1.9+dfsg1-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream release.
+  * Ran wrap-and-sort.
+  * debian/copyright in parseable format 1.0.
+  * Added extend-diff-ignore = "^[^/]*[.]egg-info/" in d/source/options, and
+    removed the clean of the egg-info folder.
+  * Refreshed/rebased 10_doc_relocation, 20_example_dirs_remove and
+    30_use_local_objects.inv patches.
+  * Removed 50_force_ordering_in_dict_to_numpy_array_functions.patch
+    55_fixups_to_numpy_array_functions_patch.patch
+    60_fix_tests_failure_due_to_py3.3_hash_randomization.patch applied
+    upstream.
+  * debian/control: removed python-support and added dh-python as build-dep.
+  * Added python-3.4.patch (comes from the Ubuntu package).
+  * Removed 40_no_setuptools_in_requires.txt (there's no setup_egg.py anymore
+    in upstream source code).
+  * Also cleans networkx/version.py, which is generated.
+  * Also cleans test.*, doc/source/templates/gallery.html and fontList.cache.
+  * Added do-not-use-sphinx_rtd_theme.patch.
+  * debian/rules: do not use setup_egg.py, it's gone from upstream source.
+  * Move all the doc generation stuff into the override_dh_sphinxdoc.
+  * Removed obsolete XS-Python-Version: >= 2.6 X-Python3-Version: >= 3.2.
+  * Adds using-local-mathjax.js.patch to avoid privacy breach in the doc.
+  * Added missing --with python2.
+  * Added debian/rules get-orig-src target to generate the orig.tar.xz file.
+  * Added missing build-depends: python-decorator and python-numpydoc (needed
+    for building docs).
+
+ -- Thomas Goirand <zigo@debian.org>  Sun, 22 Jun 2014 07:11:42 +0000
+
 python-networkx (1.8.1-1) unstable; urgency=low
 
   [ Jakub Wilk ]
diff -u -N -r python-networkx-1.8.1/debian/control trunk/debian/control
--- python-networkx-1.8.1/debian/control	2014-01-18 11:18:01.000000000 +0000
+++ trunk/debian/control	2014-06-23 11:53:41.000000000 +0000
@@ -4,10 +4,29 @@
 Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
 Uploaders: Sandro Tosi <morph@debian.org>
 Build-Depends: debhelper (>= 7.0.50~)
-Build-Depends-Indep: python-all (>= 2.3.5-11), python3-all, python-support (>= 1), python-setuptools (>= 0.6a9), python-nose (>= 0.10.1), python-sphinx (>= 1.0.7+dfsg), zip, texlive-latex-base, texlive-binaries, python-matplotlib, texlive-latex-recommended, texlive-latex-extra, texlive-fonts-recommended, python-pygraphviz, dvipng, python-numpy, python-scipy, python3-scipy, python3-setuptools, python3-nose
+Build-Depends-Indep: dh-python,
+                     dvipng,
+                     python-all (>= 2.3.5-11),
+                     python-decorator (>= 3.4.0),
+                     python-matplotlib,
+                     python-nose (>= 0.10.1),
+                     python-numpy,
+                     python-numpydoc,
+                     python-pygraphviz,
+                     python-scipy,
+                     python-setuptools (>= 0.6a9),
+                     python-sphinx (>= 1.0.7+dfsg),
+                     python3-all,
+                     python3-nose,
+                     python3-scipy,
+                     python3-setuptools,
+                     texlive-binaries,
+                     texlive-fonts-recommended,
+                     texlive-latex-base,
+                     texlive-latex-extra,
+                     texlive-latex-recommended,
+                     zip
 Standards-Version: 3.9.5
-XS-Python-Version: >= 2.6
-X-Python3-Version: >= 3.2
 Homepage: http://networkx.lanl.gov/
 Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-networkx/trunk/
 Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-networkx/trunk/
@@ -15,7 +34,12 @@
 Package: python-networkx
 Architecture: all
 Depends: ${misc:Depends}, ${python:Depends}
-Recommends: python-numpy, python-scipy, python-pygraphviz | python-pydot, python-pkg-resources, python-matplotlib, python-yaml
+Recommends: python-matplotlib,
+            python-numpy,
+            python-pkg-resources,
+            python-pygraphviz | python-pydot,
+            python-scipy,
+            python-yaml
 Description: tool to create, manipulate and study complex networks
  NetworkX is a Python-based package for the creation, manipulation, and
  study of the structure, dynamics, and functions of complex networks.
@@ -32,8 +56,7 @@
 Package: python3-networkx
 Architecture: all
 Depends: ${misc:Depends}, ${python3:Depends}
-Recommends: python3-numpy, python3-scipy, python3-pkg-resources, python3-yaml
-#Recommends: python-pygraphviz | python-pydot, python-matplotlib
+Recommends: python3-numpy, python3-pkg-resources, python3-scipy, python3-yaml
 Description: tool to create, manipulate and study complex networks (Python3)
  NetworkX is a Python-based package for the creation, manipulation, and
  study of the structure, dynamics, and functions of complex networks.
@@ -52,7 +75,7 @@
 Package: python-networkx-doc
 Section: doc
 Architecture: all
-Depends: ${misc:Depends}, ${sphinxdoc:Depends}
+Depends: libjs-mathjax, ${misc:Depends}, ${sphinxdoc:Depends}
 Description: tool to create, manipulate and study complex networks - documentation
  NetworkX is a Python-based package for the creation, manipulation, and
  study of the structure, dynamics, and functions of complex networks.
diff -u -N -r python-networkx-1.8.1/debian/copyright trunk/debian/copyright
--- python-networkx-1.8.1/debian/copyright	2014-01-12 21:39:17.000000000 +0000
+++ trunk/debian/copyright	2014-06-23 11:47:48.000000000 +0000
@@ -1,17 +1,35 @@
-This package was debianized by Cyril Brulebois <cyril.brulebois@enst-bretagne.fr> on
-Wed, 25 Oct 2006 17:52:26 +0200.
-
-It was downloaded from https://networkx.lanl.gov/
-
-Upstream Authors and Copyright Holders:
-
-   Copyright (C) 2004-2013, NetworkX Developers
-   Aric Hagberg <hagberg@lanl.gov>
-   Dan Schult <dschult@colgate.edu>
-   Pieter Swart <swart@lanl.gov>
-
-Additional Authors having left their copyrights to the Upstream Authors and
-Copyright Holders listed just above:
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: networkx
+Upstream-Contact: Aric Hagberg <aric.hagberg@gmail.com>
+Source: git://github.com/networkx/networkx.git
+
+Files: debian/*
+Copyright: (c) 2006-2009, Cyril Brulebois <cyril.brulebois@enst-bretagne.fr>
+           (c) 2010-2014, Sandro Tosi <morph@debian.org>
+           (c) 2014, Thomas Goirand <zigo@debian.org>
+License: GPL-3
+
+Files: networkx/external/decorator*
+Copyright: (c) 2005-2011, Michele Simionato
+License: BSD-style
+
+Files: networkx/algorithms/approximation/clique.py
+ networkx/algorithms/matching.py
+ networkx/algorithms/approximation/dominating_set.py
+ networkx/algorithms/approximation/independent_set.py
+ networkx/algorithms/approximation/matching.py
+ networkx/algorithms/approximation/ramsey.py
+ networkx/algorithms/approximation/vertex_cover.py
+Copyright: (c) 2011-2012 Nicholas Mancuso <nick.mancuso@gmail.com>
+License: BSD-3-clause
+
+Files: *
+Copyright: (c) 2004-2013, NetworkX Developers
+           (c) Aric Hagberg <hagberg@lanl.gov>
+           (c) Dan Schult <dschult@colgate.edu>
+           (c) Pieter Swart <swart@lanl.gov>
+ With additional Authors having left their copyrights to the Upstream Authors
+ and Copyright Holders listed just above:
   A. L. Barabási and R. Albert
   A. Steger and N. Wormald
   Brendt Wohlberg
@@ -30,56 +48,66 @@
   Eben Kenah
   Sasha Gutfraind <ag362@cornell.edu>
   Drew Conway <drew.conway@nyu.edu>
+License: BSD-3-clause
 
-License:
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are
-   met:
-
-     * Redistributions of source code must retain the above copyright
-       notice, this list of conditions and the following disclaimer.
-
-     * Redistributions in binary form must reproduce the above
-       copyright notice, this list of conditions and the following
-       disclaimer in the documentation and/or other materials provided
-       with the distribution.
-
-     * Neither the name of the NetworkX Developers nor the names of its
-       contributors may be used to endorse or promote products derived
-       from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The Debian packaging is:
-  © 2006-2008 Cyril Brulebois <kibi@debian.org>
-  © 2010-2014 Sandro Tosi <morph@debian.org>
-
-It is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
-
-networkx/algorithms/approximation/clique.py
-networkx/algorithms/matching.py
-networkx/algorithms/approximation/dominating_set.py
-networkx/algorithms/approximation/independent_set.py
-networkx/algorithms/approximation/matching.py
-networkx/algorithms/approximation/ramsey.py
-networkx/algorithms/approximation/vertex_cover.py
-  #   Copyright (C) 2011-2012 by
-  #   Nicholas Mancuso <nick.mancuso@gmail.com>
-  #   All rights reserved.
-  #   BSD license.
-
-networkx/external/decorator/decorator2/_decorator2.py
-networkx/external/decorator/decorator3/_decorator3.py
-  Copyright (c) 2005-2011, Michele Simionato
-  BSD license.
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+  * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+ .
+  * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+ .
+  * Neither the name of the NetworkX Developers nor the names of its
+    contributors may be used to endorse or promote products derived from this
+    software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: BSD-style
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ .
+ Redistributions in bytecode form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+License: GPL-3
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3 of the License.
+ .
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along with
+ this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
+ St, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the complete text of the GNU General Public License v2
+ (GPL) can be found in /usr/share/common-licenses/GPL-3.
diff -u -N -r python-networkx-1.8.1/debian/patches/10_doc_relocation trunk/debian/patches/10_doc_relocation
--- python-networkx-1.8.1/debian/patches/10_doc_relocation	2013-08-04 12:06:48.000000000 +0000
+++ trunk/debian/patches/10_doc_relocation	2014-06-22 14:04:36.000000000 +0000
@@ -1,13 +1,16 @@
 Description: install doc in the right place for Debian
+Author: Thomas Goirand <zigo@debian.org>
+Forwarded: no
+Last-Update: 2014-06-22
 
---- a/setup.py
-+++ b/setup.py
-@@ -62,7 +62,7 @@ if sys.version >= '3':
- else:
-     packages.append('networkx.external.decorator.decorator2')
+--- a/setup.py	2014-06-22 07:52:32.000000000 +0000
++++ b/setup.py	2014-06-22 07:52:50.000000000 +0000
+@@ -58,7 +58,7 @@
+           "networkx.testing",
+           "networkx.utils"]
  
 -docdirbase  = 'share/doc/networkx-%s' % version
 +docdirbase  = 'share/doc/python-networkx'
- # add basic documentation 
+ # add basic documentation
  data = [(docdirbase, glob("*.txt"))]
  # add examples
diff -u -N -r python-networkx-1.8.1/debian/patches/20_example_dirs_remove trunk/debian/patches/20_example_dirs_remove
--- python-networkx-1.8.1/debian/patches/20_example_dirs_remove	2013-08-04 12:06:48.000000000 +0000
+++ trunk/debian/patches/20_example_dirs_remove	2014-06-22 14:04:36.000000000 +0000
@@ -1,14 +1,16 @@
 Description: Don't created dirs for examples no more present
 Author: Sandro Tosi <morph@debian.org>
+Forwarded: no
+Last-Update: 2014-06-22
 
---- a/setup.py
-+++ b/setup.py
-@@ -74,7 +74,7 @@ for d in ['advanced',
+--- a/setup.py	2014-06-22 07:54:45.000000000 +0000
++++ b/setup.py	2014-06-22 07:55:00.000000000 +0000
+@@ -70,7 +70,7 @@
            'graph',
            'multigraph',
            'pygraphviz',
 -          'readwrite']:
 +          'subclass']:
-     dd=os.path.join(docdirbase,'examples',d)
-     pp=os.path.join('examples',d)
-     data.append((dd,glob(os.path.join(pp,"*.py"))))
+     dd = os.path.join(docdirbase,'examples', d)
+     pp = os.path.join('examples', d)
+     data.append((dd, glob(os.path.join(pp ,"*.py"))))
diff -u -N -r python-networkx-1.8.1/debian/patches/30_use_local_objects.inv trunk/debian/patches/30_use_local_objects.inv
--- python-networkx-1.8.1/debian/patches/30_use_local_objects.inv	2013-08-04 12:06:48.000000000 +0000
+++ trunk/debian/patches/30_use_local_objects.inv	2014-06-22 14:04:36.000000000 +0000
@@ -1,8 +1,9 @@
 Description: Use a local copy of object.inv from doc.python.org and docs.scipy.org, instead of downloading them each time from the internet
+Last-Update: 2014-06-22
 
 --- a/doc/source/conf.py
 +++ b/doc/source/conf.py
-@@ -164,8 +164,8 @@ latex_documents = [('tutorial/index', 'n
+@@ -167,8 +167,8 @@ latex_documents = [('tutorial/index', 'n
  #latex_appendices = ['credits']
  
  # Intersphinx mapping
@@ -11,5 +12,5 @@
 +intersphinx_mapping = {'http://docs.python.org/': '../../debian/python.org_objects.inv',
 +                       'http://docs.scipy.org/doc/numpy/': '../../debian/scipy.org_numpy_objects.inv',
                        }
-                       
+ 
  # For trac custom roles
diff -u -N -r python-networkx-1.8.1/debian/patches/40_no_setuptools_in_requires.txt trunk/debian/patches/40_no_setuptools_in_requires.txt
--- python-networkx-1.8.1/debian/patches/40_no_setuptools_in_requires.txt	2013-08-04 12:06:48.000000000 +0000
+++ trunk/debian/patches/40_no_setuptools_in_requires.txt	1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
-Description: Remove useless setuptools from requires.txt
---- a/setup_egg.py
-+++ b/setup_egg.py
-@@ -48,7 +48,6 @@ if __name__ == "__main__":
-         packages         = packages,
-         data_files       = data,
-         package_data     = package_data,
--        install_requires=['setuptools'],
-         test_suite       = 'nose.collector', 
-         tests_require    = ['nose >= 0.10.1'] ,
-         zip_safe = False
diff -u -N -r python-networkx-1.8.1/debian/patches/50_force_ordering_in_dict_to_numpy_array_functions.patch trunk/debian/patches/50_force_ordering_in_dict_to_numpy_array_functions.patch
--- python-networkx-1.8.1/debian/patches/50_force_ordering_in_dict_to_numpy_array_functions.patch	2014-01-18 11:16:52.000000000 +0000
+++ trunk/debian/patches/50_force_ordering_in_dict_to_numpy_array_functions.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,91 +0,0 @@
-From ee8df352ae88299f1e9c7bd74db954ff06d03770 Mon Sep 17 00:00:00 2001
-From: Aric Hagberg <aric.hagberg@gmail.com>
-Date: Sat, 9 Nov 2013 09:43:26 -0700
-Subject: [PATCH] Force ordering in dict_to_numpy_array functions
-
-Force ordering to be that of the provided mapping dictionary or else create a mapping using the input data dictionary ordering.
-
-Fix tests to determine ordering.
----
- networkx/utils/misc.py            | 22 +++++++++++++++-------
- networkx/utils/tests/test_misc.py | 20 +++++++++++++++-----
- 2 files changed, 30 insertions(+), 12 deletions(-)
-
---- a/networkx/utils/misc.py
-+++ b/networkx/utils/misc.py
-@@ -125,11 +125,19 @@ def dict_to_numpy_array2(d,mapping=None)
-         mapping=dict(zip(s,range(len(s))))
-     n=len(mapping)
-     a = numpy.zeros((n, n))
--    for k1, row in d.items():
--        for k2, value in row.items():
--            i=mapping[k1]
--            j=mapping[k2]
--            a[i,j] = value
-+    print(mapping)
-+    for k1, i in mapping.items():
-+#    for k1, row in d.items():
-+        for k2, j in mapping.items():
-+            try:
-+                a[i,j]=d[k1][k2]
-+            except KeyError:
-+                pass
-+#        for k2, value in row.items():
-+#            a[i,j] = d[k1][k2]
-+#            i=mapping[k1]
-+#            j=mapping[k2]
-+#            a[i,j] = value
-     return a
- 
- def dict_to_numpy_array1(d,mapping=None):
-@@ -145,7 +153,7 @@ def dict_to_numpy_array1(d,mapping=None)
-         mapping = dict(zip(s,range(len(s))))
-     n = len(mapping)
-     a = numpy.zeros(n)
--    for k1, value in d.items():
-+    for k1,i in mapping.items():
-         i = mapping[k1]
--        a[i] = value
-+        a[i] = d[k1]
-     return a
---- a/networkx/utils/tests/test_misc.py
-+++ b/networkx/utils/tests/test_misc.py
-@@ -49,7 +49,7 @@ class TestNumpyArray(object):
-     def test_dict_to_numpy_array1(self):
-         d = {'a':1,'b':2}
-         a = dict_to_numpy_array1(d)
--        assert_equal(a, numpy.array([1,2]))
-+        assert_equal(a, numpy.array(list(d.values())))
-         a = dict_to_numpy_array1(d, mapping = {'b':0,'a':1})
-         assert_equal(a, numpy.array([2,1]))
- 
-@@ -57,7 +57,12 @@ class TestNumpyArray(object):
-         d = {'a': {'a':1,'b':2},
-              'b': {'a':10,'b':20}}
-         a = dict_to_numpy_array(d)
--        assert_equal(a, numpy.array([[1,2],[10,20]]))
-+        if list(d.keys())[0] == 'a':
-+            assert_equal(a, numpy.array([[1,2],[10,20]]))
-+        elif list(d.keys())[0] == 'b':
-+            assert_equal(a, numpy.array([[20,10],[2,1]]))
-+        else:
-+            raise
-         a = dict_to_numpy_array2(d, mapping = {'b':0,'a':1})
-         assert_equal(a, numpy.array([[20,10],[2,1]]))
- 
-@@ -66,7 +71,12 @@ class TestNumpyArray(object):
-         d = {'a': {'a':1,'b':2},
-              'b': {'a':10,'b':20}}
-         a = dict_to_numpy_array(d)
--        assert_equal(a, numpy.array([[1,2],[10,20]]))
-+        if list(d.keys())[0] == 'a':
-+            assert_equal(a, numpy.array([[1,2],[10,20]]))
-+        elif list(d.keys())[0] == 'b':
-+            assert_equal(a, numpy.array([[20,10],[2,1]]))
-+        else:
-+            raise
-         d = {'a':1,'b':2}
--        a = dict_to_numpy_array1(d)
--        assert_equal(a, numpy.array([1,2]))
-+        a = dict_to_numpy_array(d)
-+        assert_equal(a, numpy.array(list(d.values())))
diff -u -N -r python-networkx-1.8.1/debian/patches/55_fixups_to_numpy_array_functions_patch.patch trunk/debian/patches/55_fixups_to_numpy_array_functions_patch.patch
--- python-networkx-1.8.1/debian/patches/55_fixups_to_numpy_array_functions_patch.patch	2014-01-18 11:16:52.000000000 +0000
+++ trunk/debian/patches/55_fixups_to_numpy_array_functions_patch.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,32 +0,0 @@
-From 25086b5bb00f0c879749de60bef610f37c6625a3 Mon Sep 17 00:00:00 2001
-From: Aric Hagberg <aric.hagberg@gmail.com>
-Date: Sat, 9 Nov 2013 10:56:03 -0700
-Subject: [PATCH] Clean up the mess I left in #1006
-
-Remove a print statement and some commented out code.
----
- networkx/utils/misc.py | 7 -------
- 1 file changed, 7 deletions(-)
-
---- a/networkx/utils/misc.py
-+++ b/networkx/utils/misc.py
-@@ -125,19 +125,12 @@ def dict_to_numpy_array2(d,mapping=None)
-         mapping=dict(zip(s,range(len(s))))
-     n=len(mapping)
-     a = numpy.zeros((n, n))
--    print(mapping)
-     for k1, i in mapping.items():
--#    for k1, row in d.items():
-         for k2, j in mapping.items():
-             try:
-                 a[i,j]=d[k1][k2]
-             except KeyError:
-                 pass
--#        for k2, value in row.items():
--#            a[i,j] = d[k1][k2]
--#            i=mapping[k1]
--#            j=mapping[k2]
--#            a[i,j] = value
-     return a
- 
- def dict_to_numpy_array1(d,mapping=None):
diff -u -N -r python-networkx-1.8.1/debian/patches/60_fix_tests_failure_due_to_py3.3_hash_randomization.patch trunk/debian/patches/60_fix_tests_failure_due_to_py3.3_hash_randomization.patch
--- python-networkx-1.8.1/debian/patches/60_fix_tests_failure_due_to_py3.3_hash_randomization.patch	2014-01-18 11:16:52.000000000 +0000
+++ trunk/debian/patches/60_fix_tests_failure_due_to_py3.3_hash_randomization.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,38 +0,0 @@
-From 8564c5e4aecfbbaa68965d5f684e705c6070e464 Mon Sep 17 00:00:00 2001
-From: Aric Hagberg <aric.hagberg@gmail.com>
-Date: Wed, 23 Oct 2013 20:45:59 -0600
-Subject: [PATCH] Fix tests that fail due to hash randomization
-
----
- networkx/algorithms/assortativity/correlation.py | 2 +-
- networkx/convert.py                              | 8 ++++++--
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
---- a/networkx/algorithms/assortativity/correlation.py
-+++ b/networkx/algorithms/assortativity/correlation.py
-@@ -115,7 +115,7 @@ def degree_pearson_correlation_coefficie
-     --------
-     >>> G=nx.path_graph(4)
-     >>> r=nx.degree_pearson_correlation_coefficient(G) 
--    >>> r 
-+    >>> print("%3.1f"%r)
-     -0.5
- 
-     Notes
---- a/networkx/convert.py
-+++ b/networkx/convert.py
-@@ -568,8 +568,12 @@ def from_numpy_matrix(A,create_using=Non
-     >>> dt=[('weight',float),('cost',int)]
-     >>> A=numpy.matrix([[(1.0,2)]],dtype=dt)
-     >>> G=nx.from_numpy_matrix(A)
--    >>> G.edges(data=True)
--    [(0, 0, {'cost': 2, 'weight': 1.0})]
-+    >>> G.edges()
-+    [(0, 0)]
-+    >>> G[0][0]['cost']
-+    2
-+    >>> G[0][0]['weight']
-+    1.0
-     """
-     kind_to_python_type={'f':float,
-                          'i':int,
diff -u -N -r python-networkx-1.8.1/debian/patches/do-not-use-sphinx_rtd_theme.patch trunk/debian/patches/do-not-use-sphinx_rtd_theme.patch
--- python-networkx-1.8.1/debian/patches/do-not-use-sphinx_rtd_theme.patch	1970-01-01 00:00:00.000000000 +0000
+++ trunk/debian/patches/do-not-use-sphinx_rtd_theme.patch	2014-06-23 07:54:02.000000000 +0000
@@ -0,0 +1,21 @@
+Description: Do not use sphinx_rtd_theme theme
+ Do not use sphinx_rtd_theme theme
+Author: Thomas Goirand <zigo@debian.org>
+Forwarded: no
+Last-Update: 2014-06-24
+
+--- python-networkx-1.9.orig/doc/source/conf.py
++++ python-networkx-1.9/doc/source/conf.py
+@@ -95,9 +95,9 @@ doctest_global_setup="import networkx as
+ 
+ # Options for HTML output
+ # -----------------------
+-import sphinx_rtd_theme
+-html_theme = "sphinx_rtd_theme"
+-html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
++##import sphinx_rtd_theme
++##html_theme = "sphinx_rtd_theme"
++##html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+ #html_theme_options = {
+ #    "rightsidebar": "true",
+ #    "relbarbgcolor: "black"
diff -u -N -r python-networkx-1.8.1/debian/patches/python-3.4.patch trunk/debian/patches/python-3.4.patch
--- python-networkx-1.8.1/debian/patches/python-3.4.patch	1970-01-01 00:00:00.000000000 +0000
+++ trunk/debian/patches/python-3.4.patch	2014-06-23 06:22:12.000000000 +0000
@@ -0,0 +1,24 @@
+Description: Backport python3 fixes.
+Author: Chuck Short <zulcss@ubuntu.com>
+Forwarded: Not needed
+diff -Naurp networkx-1.8.1.orig/networkx/readwrite/nx_shp.py networkx-1.8.1/networkx/readwrite/nx_shp.py
+--- networkx-1.8.1.orig/networkx/readwrite/nx_shp.py	2013-08-04 09:53:31.000000000 -0400
++++ networkx-1.8.1/networkx/readwrite/nx_shp.py	2014-01-27 10:57:47.015239061 -0500
+@@ -154,7 +154,7 @@ def write_shp(G, outdir):
+         feature.SetGeometry(g)
+         if attributes != None:
+             # Loop through attributes, assigning data to each field
+-            for field, data in attributes.iteritems():
++            for field, data in attributes.iter():
+                 feature.SetField(field, data)
+         lyr.CreateFeature(feature)
+         feature.Destroy()
+@@ -189,7 +189,7 @@ def write_shp(G, outdir):
+         data = G.get_edge_data(*e)
+         g = netgeometry(e, data)
+         # Loop through attribute data in edges
+-        for key, data in e[2].iteritems():
++        for key, data in e[2].iter():
+             # Reject spatial data not required for attribute table
+             if (key != 'Json' and key != 'Wkt' and key != 'Wkb'
+                 and key != 'ShpName'):
diff -u -N -r python-networkx-1.8.1/debian/patches/series trunk/debian/patches/series
--- python-networkx-1.8.1/debian/patches/series	2014-01-18 11:16:52.000000000 +0000
+++ trunk/debian/patches/series	2014-06-23 08:28:47.000000000 +0000
@@ -1,7 +1,6 @@
 10_doc_relocation
 20_example_dirs_remove
 30_use_local_objects.inv
-40_no_setuptools_in_requires.txt
-50_force_ordering_in_dict_to_numpy_array_functions.patch
-55_fixups_to_numpy_array_functions_patch.patch
-60_fix_tests_failure_due_to_py3.3_hash_randomization.patch
+python-3.4.patch
+do-not-use-sphinx_rtd_theme.patch
+using-local-mathjax.js.patch
diff -u -N -r python-networkx-1.8.1/debian/patches/using-local-mathjax.js.patch trunk/debian/patches/using-local-mathjax.js.patch
--- python-networkx-1.8.1/debian/patches/using-local-mathjax.js.patch	1970-01-01 00:00:00.000000000 +0000
+++ trunk/debian/patches/using-local-mathjax.js.patch	2014-06-23 08:59:28.000000000 +0000
@@ -0,0 +1,16 @@
+Description: Using local MathJax.js script
+ This avoids a privacy breach.
+Author: Thomas Goirand <zigo@debian.org>
+Forwarded: no
+Last-Update: 2014-06-23
+
+--- python-networkx-1.9.orig/doc/source/conf.py
++++ python-networkx-1.9/doc/source/conf.py
+@@ -175,6 +175,6 @@ intersphinx_mapping = {'http://docs.pyth
+ 
+ default_role = 'math'
+ trac_url = 'https://networkx.lanl.gov/trac/'
+-mathjax_path = 'https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML'
++mathjax_path = 'MathJax.js'
+ 
+ numpydoc_show_class_members = False
diff -u -N -r python-networkx-1.8.1/debian/python-networkx-doc.install trunk/debian/python-networkx-doc.install
--- python-networkx-1.8.1/debian/python-networkx-doc.install	2010-09-23 21:36:04.000000000 +0000
+++ trunk/debian/python-networkx-doc.install	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-doc/build/dist /usr/share/doc/python-networkx-doc/
diff -u -N -r python-networkx-1.8.1/debian/rules trunk/debian/rules
--- python-networkx-1.8.1/debian/rules	2012-08-28 16:03:47.000000000 +0000
+++ trunk/debian/rules	2014-06-23 09:44:28.000000000 +0000
@@ -7,13 +7,13 @@
 PYTHON3 := $(shell py3versions -r)
 
 %:
-	dh $@ --with sphinxdoc,python3
+	dh $@ --with sphinxdoc,python2,python3
 
 override_dh_auto_clean:
 	dh_auto_clean
 
 	# Add here commands to clean up after the build process.
-	rm -fr build
+	rm -fr build networkx/version.py test.* doc/source/templates/gallery.html fontList.cache
 	# Remove built doc too
 	$(MAKE) -C doc clean
 	rm -rf doc/source/*.pdf doc/source/*.zip examples/*/*.png doc/fontList.cache
@@ -21,35 +21,26 @@
 	# Make sure that there's no .pyc left
 	find . -name '*.pyc' -exec rm {} ';'
 
-	# This directory is generated during the build
-	rm -rf networkx.egg-info
-
-override_dh_auto_build:
-	dh_auto_build
-
-	# build doc, run in a separate shell, so we can export MPLCONFIGDIR
-	(export MPLCONFIGDIR=. ; make -C doc dist PYTHONPATH=../$(LIB2))
-
 override_dh_auto_test:
 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 	set -e ; \
 	# running tests
 	for py in $(PYTHON2) ; do\
-		PYTHONPATH=$(LIB2) $$py setup_egg.py nosetests ; \
+		PYTHONPATH=$(LIB2) $$py setup.py nosetests ; \
 	done
 	set -e ; \
 	# running tests Python 3
 	for py in $(PYTHON3) ; do\
-		PYTHONPATH=$(LIB3) $$py setup_egg.py nosetests ; \
+		PYTHONPATH=$(LIB3) $$py setup.py nosetests ; \
 	done
 endif
 
 override_dh_install:
 	# Install w/o compiling *.pyc files
 	# Install egg-info directories (--single-... option)
-	python setup_egg.py install --no-compile --root=$(CURDIR)/debian/python-networkx \
+	python setup.py install --no-compile --root=$(CURDIR)/debian/python-networkx \
 		--single-version-externally-managed --install-layout=deb
-	python3 setup_egg.py install --no-compile --root=$(CURDIR)/debian/python3-networkx \
+	python3 setup.py install --no-compile --root=$(CURDIR)/debian/python3-networkx \
 		--single-version-externally-managed --install-layout=deb
 
 	# Fix executable bits:
@@ -66,28 +57,58 @@
 	# don't ship python 2 code for _decorator because it can't be byte-compiled
 	rm -f debian/python3-networkx/usr/lib/python3/dist-packages/networkx/external/decorator/_decorator.py
 
+	dh_install
+
+
+override_dh_sphinxdoc:
+ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
+	(export MPLCONFIGDIR=. ; make -C doc dist PYTHONPATH=../$(LIB2))
 	# Do some cleanup: delete unneeded files:
 	rm $(DEBIANDOC_DIR)/INSTALL.txt $(DEBIANDOC_DIR)/LICENSE.txt
 
 	# Rename the README file.
 	mv $(DEBIANDOC_DIR)/README.txt $(DEBIANDOC_DIR)/README
 
-	dh_install
-
 	# install doc from dir 'dist', but rename it to 'html', better name
-	mv debian/python-networkx-doc/usr/share/doc/python-networkx-doc/dist \
-		debian/python-networkx-doc/usr/share/doc/python-networkx-doc/html
-
-	rm -rf debian/python-networkx-doc/usr/share/doc/python-networkx-doc/html/_static/jquery.js
-	dh_link -ppython-networkx-doc /usr/share/javascript/jquery/jquery.js /usr/share/doc/python-networkx-doc/html/_static/jquery.js
+	cp -auxf doc/build/dist debian/python-networkx-doc/usr/share/doc/python-networkx-doc/html
 
 	# link the pdf files also at the top level dir
 	dh_link -ppython-networkx-doc /usr/share/doc/python-networkx-doc/html/_downloads/networkx_reference.pdf /usr/share/doc/python-networkx-doc/networkx_reference.pdf
 	dh_link -ppython-networkx-doc /usr/share/doc/python-networkx-doc/html/_downloads/networkx_tutorial.pdf /usr/share/doc/python-networkx-doc/networkx_tutorial.pdf
 
+	rm -rf debian/python-networkx-doc/usr/share/doc/python-networkx-doc/html/_static/jquery.js
+	dh_link -ppython-networkx-doc /usr/share/javascript/jquery/jquery.js /usr/share/doc/python-networkx-doc/html/_static/jquery.js
+
+	dh_link -ppython-networkx-doc /usr/share/javascript/mathjax/MathJax.js /usr/share/doc/python-networkx-doc/html/_static/MathJax.js
+
 	# remove full doc zip file
 	rm -f debian/python-networkx-doc/usr/share/doc/python-networkx-doc/html/_downloads/networkx-documentation.zip
 
+	dh_sphinxdoc
+endif
+
+DEBVERS         ?= $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
+VERSION         ?= $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//')
+NODFSG_VERSION  ?= $(shell echo '$(VERSION)' | sed -e 's/\+dfsg[[:digit:]]*//')
+DEBFLAVOR       ?= $(shell dpkg-parsechangelog | grep -E ^Distribution: | cut -d" " -f2)
+DEBPKGNAME      ?= $(shell dpkg-parsechangelog | grep -E ^Source: | cut -d" " -f2)
+UPSTREAM_GIT    ?= git://github.com/networkx/networkx.git
+
+get-orig-src:
+	set -ex && \
+		mkdir debian-tmp && \
+		cd debian-tmp && \
+		git clone $(UPSTREAM_GIT) && \
+		cd networkx && \
+		git reset --hard networkx-$(NODFSG_VERSION) && \
+		git rm -rf examples/javascript/force/d3 doc/source/static/force/d3js .hgtags && \
+		git commit -a -m "Removed non-free files" && \
+		git tag $(VERSION) && \
+		git archive --prefix=$(DEBPKGNAME)-$(VERSION)/ $(VERSION) \
+			| xz >../../../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ; \
+		cd ../.. ; \
+		rm -rf debian-tmp
+
 update_intersphinx_mapping:
 	wget http://docs.python.org/dev/objects.inv -O debian/python.org_objects.inv
 	wget http://docs.scipy.org/doc/numpy/objects.inv -O debian/scipy.org_numpy_objects.inv
diff -u -N -r python-networkx-1.8.1/debian/source/options trunk/debian/source/options
--- python-networkx-1.8.1/debian/source/options	1970-01-01 00:00:00.000000000 +0000
+++ trunk/debian/source/options	2014-06-22 07:42:14.000000000 +0000
@@ -0,0 +1 @@
+extend-diff-ignore = "^[^/]*[.]egg-info/"

Reply to: