We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
networkx 2.1 error building doc with sphinx 1.7.2
Hello,
when building the doc with sphinx 1.7.2 i got this error:

```
sphinx-build -b html -d build/doctrees   . build/html
Running Sphinx v1.6.6
making output directory...
/usr/lib/python2.7/dist-packages/IPython/nbconvert.py:13: ShimWarning: The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.
  "You should import from nbconvert instead.", ShimWarning)
Change of translator for the pyfile builder.
Change of translator for the ipynb builder.
loading pickled environment... not yet created
[autosummary] generating autosummary for: bibliography.rst, citing.rst, credits.rst, developer/contribute.rst, developer/gitwash/configure_git.rst, developer/gitwash/development_workflow.rst, developer/gitwash/following_latest.rst, developer/gitwash/forking_hell.rst, developer/gitwash/git_development.rst, developer/gitwash/git_install.rst, ..., release/api_1.7.rst, release/api_1.8.rst, release/api_1.9.rst, release/index.rst, release/migration_guide_from_1.x_to_2.0.rst, release/release_2.0.rst, release/release_2.1.rst, release/release_dev.rst, release/release_template.rst, tutorial.rst
[autosummary] generating autosummary for: /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.clique.clique_removal.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.clique.large_clique_size.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.clique.max_clique.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.clustering_coefficient.average_clustering.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.connectivity.all_pairs_node_connectivity.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.connectivity.local_node_connectivity.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.connectivity.node_connectivity.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.dominating_set.min_edge_dominating_set.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.dominating_set.min_weighted_dominating_set.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.independent_set.maximum_independent_set.rst, ..., /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.nx_shp.write_shp.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.nx_yaml.read_yaml.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.nx_yaml.write_yaml.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.pajek.parse_pajek.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.pajek.read_pajek.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.pajek.write_pajek.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.sparse6.from_sparse6_bytes.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.sparse6.read_sparse6.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.sparse6.to_sparse6_bytes.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.sparse6.write_sparse6.rst
loading intersphinx inventory from ../../debian/python.org_objects.inv...
WARNING: intersphinx inventory '../../debian/python.org_objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: u'/home/morph/deb/build-area/python-networkx-2.1/doc/../../debian/python.org_objects.inv'
loading intersphinx inventory from ../../debian/scipy.org_numpy_objects.inv...
WARNING: intersphinx inventory '../../debian/scipy.org_numpy_objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: u'/home/morph/deb/build-area/python-networkx-2.1/doc/../../debian/scipy.org_numpy_objects.inv'
generating gallery...

Exception occurred:
  File "/usr/lib/python2.7/dist-packages/sphinx_gallery/gen_gallery.py", line 222, in generate_gallery_rst
    .format(examples_dir))
IOError: Main example directory /home/morph/deb/build-area/python-networkx-2.1/doc/../examples does not have a README.txt file. Please write one to introduce your gallery.
The full traceback has been saved in /tmp/sphinx-err-SnsvwK.log, if you want to report the issue to the developers.
```

content of `/tmp/sphinx-err-SnsvwK.log` is:

```
# Sphinx version: 1.6.6
# Python version: 2.7.14+ (CPython)
# Docutils version: 0.14 
# Jinja2 version: 2.10
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/sphinx/cmdline.py", line 305, in main
    opts.warningiserror, opts.tags, opts.verbosity, opts.jobs)
  File "/usr/lib/python2.7/dist-packages/sphinx/application.py", line 234, in __init__
    self._init_builder()
  File "/usr/lib/python2.7/dist-packages/sphinx/application.py", line 312, in _init_builder
    self.emit('builder-inited')
  File "/usr/lib/python2.7/dist-packages/sphinx/application.py", line 489, in emit
    return self.events.emit(event, self, *args)
  File "/usr/lib/python2.7/dist-packages/sphinx/events.py", line 79, in emit
    results.append(callback(*args))
  File "/usr/lib/python2.7/dist-packages/sphinx_gallery/gen_gallery.py", line 222, in generate_gallery_rst
    .format(examples_dir))
IOError: Main example directory /home/morph/deb/build-area/python-networkx-2.1/doc/../examples does not have a README.txt file. Please write one to introduce your gallery.
```

can you have a look?

thanks!

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 """
4 Setup script for networkx
5 
6 You can install networkx with
7 
8 python setup.py install
9 """
10 from glob import glob
11 import os
12 import sys
13 if os.path.exists('MANIFEST'):
14     os.remove('MANIFEST')
15 
16 from setuptools import setup
17 
18 if sys.argv[-1] == 'setup.py':
19     print("To install, run 'python setup.py install'")
20     print()
21 
22 if sys.version_info[:2] < (2, 7):
23     print("NetworkX requires Python 2.7 or later (%d.%d detected)." %
24           sys.version_info[:2])
25     sys.exit(-1)
26 
27 # Write the version information.
28 sys.path.insert(0, 'networkx')
29 import release
30 version = release.write_versionfile()
31 sys.path.pop(0)
32 
33 packages = ["networkx",
34             "networkx.algorithms",
35             "networkx.algorithms.assortativity",
36             "networkx.algorithms.bipartite",
37             "networkx.algorithms.node_classification",
38             "networkx.algorithms.centrality",
39             "networkx.algorithms.community",
40             "networkx.algorithms.components",
41             "networkx.algorithms.connectivity",
42             "networkx.algorithms.coloring",
43             "networkx.algorithms.flow",
44             "networkx.algorithms.traversal",
45             "networkx.algorithms.isomorphism",
46             "networkx.algorithms.shortest_paths",
47             "networkx.algorithms.link_analysis",
48             "networkx.algorithms.operators",
49             "networkx.algorithms.approximation",
50             "networkx.algorithms.tree",
51             "networkx.classes",
52             "networkx.generators",
53             "networkx.drawing",
54             "networkx.linalg",
55             "networkx.readwrite",
56             "networkx.readwrite.json_graph",
57             "networkx.tests",
58             "networkx.testing",
59             "networkx.utils"]
60 
61 docdirbase = 'share/doc/networkx-%s' % version
62 # add basic documentation
63 data = [(docdirbase, glob("*.txt"))]
64 # add examples
65 for d in ['advanced',
66           'algorithms',
67           'basic',
68           '3d_drawing',
69           'drawing',
70           'graph',
71           'javascript',
72           'jit',
73           'pygraphviz',
74           'subclass']:
75     dd = os.path.join(docdirbase, 'examples', d)
76     pp = os.path.join('examples', d)
77     data.append((dd, glob(os.path.join(pp, "*.py"))))
78     data.append((dd, glob(os.path.join(pp, "*.bz2"))))
79     data.append((dd, glob(os.path.join(pp, "*.gz"))))
80     data.append((dd, glob(os.path.join(pp, "*.mbox"))))
81     data.append((dd, glob(os.path.join(pp, "*.edgelist"))))
82 
83 # add the tests
84 package_data = {
85     'networkx': ['tests/*.py'],
86     'networkx.algorithms': ['tests/*.py'],
87     'networkx.algorithms.assortativity': ['tests/*.py'],
88     'networkx.algorithms.bipartite': ['tests/*.py'],
89     'networkx.algorithms.node_classification': ['tests/*.py'],
90     'networkx.algorithms.centrality': ['tests/*.py'],
91     'networkx.algorithms.community': ['tests/*.py'],
92     'networkx.algorithms.components': ['tests/*.py'],
93     'networkx.algorithms.connectivity': ['tests/*.py'],
94     'networkx.algorithms.coloring': ['tests/*.py'],
95     'networkx.algorithms.flow': ['tests/*.py', 'tests/*.bz2'],
96     'networkx.algorithms.isomorphism': ['tests/*.py', 'tests/*.*99'],
97     'networkx.algorithms.link_analysis': ['tests/*.py'],
98     'networkx.algorithms.approximation': ['tests/*.py'],
99     'networkx.algorithms.operators': ['tests/*.py'],
100     'networkx.algorithms.shortest_paths': ['tests/*.py'],
101     'networkx.algorithms.traversal': ['tests/*.py'],
102     'networkx.algorithms.tree': ['tests/*.py'],
103     'networkx.classes': ['tests/*.py'],
104     'networkx.generators': ['tests/*.py', 'atlas.dat.gz'],
105     'networkx.drawing': ['tests/*.py'],
106     'networkx.linalg': ['tests/*.py'],
107     'networkx.readwrite': ['tests/*.py'],
108     'networkx.readwrite.json_graph': ['tests/*.py'],
109     'networkx.testing': ['tests/*.py'],
110     'networkx.utils': ['tests/*.py']
111 }
112 
113 install_requires = ['decorator>=4.1.0']
114 extras_require = {'all': ['numpy', 'scipy', 'pandas', 'matplotlib',
115                           'pygraphviz', 'pydot', 'pyyaml', 'gdal', 'lxml']}
116 
117 if __name__ == "__main__":
118 
119     setup(
120         name=release.name.lower(),
121         version=version,
122         maintainer=release.maintainer,
123         maintainer_email=release.maintainer_email,
124         author=release.authors['Hagberg'][0],
125         author_email=release.authors['Hagberg'][1],
126         description=release.description,
127         keywords=release.keywords,
128         long_description=release.long_description,
129         license=release.license,
130         platforms=release.platforms,
131         url=release.url,
132         download_url=release.download_url,
133         classifiers=release.classifiers,
134         packages=packages,
135         data_files=data,
136         package_data=package_data,
137         install_requires=install_requires,
138         extras_require=extras_require,
139         test_suite='nose.collector',
140         tests_require=['nose>=0.10.1'],
141         zip_safe=False
142     )
143
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -62,7 +62,8 @@
 # add basic documentation
 data = [(docdirbase, glob("*.txt"))]
 # add examples
-for d in ['advanced',
+for d in ['.',
+          'advanced',
           'algorithms',
           'basic',
           '3d_drawing',
@@ -74,6 +75,7 @@
           'subclass']:
     dd = os.path.join(docdirbase, 'examples', d)
     pp = os.path.join('examples', d)
+    data.append((dd, glob(os.path.join(pp, "*.txt"))))
     data.append((dd, glob(os.path.join(pp, "*.py"))))
     data.append((dd, glob(os.path.join(pp, "*.bz2"))))
     data.append((dd, glob(os.path.join(pp, "*.gz"))))

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -62,7 +62,8 @@\n # add basic documentation\n data = [(docdirbase, glob(\"*.txt\"))]\n # add examples\n-for d in ['advanced',\n+for d in ['.',\n+          'advanced',\n           'algorithms',\n           'basic',\n           '3d_drawing',\n@@ -74,6 +75,7 @@\n           'subclass']:\n     dd = os.path.join(docdirbase, 'examples', d)\n     pp = os.path.join('examples', d)\n+    data.append((dd, glob(os.path.join(pp, \"*.txt\"))))\n     data.append((dd, glob(os.path.join(pp, \"*.py\"))))\n     data.append((dd, glob(os.path.join(pp, \"*.bz2\"))))\n     data.append((dd, glob(os.path.join(pp, \"*.gz\"))))\n", "issue": "networkx 2.1 error building doc with sphinx 1.7.2\nHello,\r\nwhen building the doc with sphinx 1.7.2 i got this error:\r\n\r\n```\r\nsphinx-build -b html -d build/doctrees   . build/html\r\nRunning Sphinx v1.6.6\r\nmaking output directory...\r\n/usr/lib/python2.7/dist-packages/IPython/nbconvert.py:13: ShimWarning: The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.\r\n  \"You should import from nbconvert instead.\", ShimWarning)\r\nChange of translator for the pyfile builder.\r\nChange of translator for the ipynb builder.\r\nloading pickled environment... not yet created\r\n[autosummary] generating autosummary for: bibliography.rst, citing.rst, credits.rst, developer/contribute.rst, developer/gitwash/configure_git.rst, developer/gitwash/development_workflow.rst, developer/gitwash/following_latest.rst, developer/gitwash/forking_hell.rst, developer/gitwash/git_development.rst, developer/gitwash/git_install.rst, ..., release/api_1.7.rst, release/api_1.8.rst, release/api_1.9.rst, release/index.rst, release/migration_guide_from_1.x_to_2.0.rst, release/release_2.0.rst, release/release_2.1.rst, release/release_dev.rst, release/release_template.rst, tutorial.rst\r\n[autosummary] generating autosummary for: /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.clique.clique_removal.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.clique.large_clique_size.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.clique.max_clique.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.clustering_coefficient.average_clustering.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.connectivity.all_pairs_node_connectivity.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.connectivity.local_node_connectivity.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.connectivity.node_connectivity.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.dominating_set.min_edge_dominating_set.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.dominating_set.min_weighted_dominating_set.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/algorithms/generated/networkx.algorithms.approximation.independent_set.maximum_independent_set.rst, ..., /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.nx_shp.write_shp.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.nx_yaml.read_yaml.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.nx_yaml.write_yaml.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.pajek.parse_pajek.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.pajek.read_pajek.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.pajek.write_pajek.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.sparse6.from_sparse6_bytes.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.sparse6.read_sparse6.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.sparse6.to_sparse6_bytes.rst, /home/morph/deb/build-area/python-networkx-2.1/doc/reference/readwrite/generated/networkx.readwrite.sparse6.write_sparse6.rst\r\nloading intersphinx inventory from ../../debian/python.org_objects.inv...\r\nWARNING: intersphinx inventory '../../debian/python.org_objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: u'/home/morph/deb/build-area/python-networkx-2.1/doc/../../debian/python.org_objects.inv'\r\nloading intersphinx inventory from ../../debian/scipy.org_numpy_objects.inv...\r\nWARNING: intersphinx inventory '../../debian/scipy.org_numpy_objects.inv' not fetchable due to <type 'exceptions.IOError'>: [Errno 2] No such file or directory: u'/home/morph/deb/build-area/python-networkx-2.1/doc/../../debian/scipy.org_numpy_objects.inv'\r\ngenerating gallery...\r\n\r\nException occurred:\r\n  File \"/usr/lib/python2.7/dist-packages/sphinx_gallery/gen_gallery.py\", line 222, in generate_gallery_rst\r\n    .format(examples_dir))\r\nIOError: Main example directory /home/morph/deb/build-area/python-networkx-2.1/doc/../examples does not have a README.txt file. Please write one to introduce your gallery.\r\nThe full traceback has been saved in /tmp/sphinx-err-SnsvwK.log, if you want to report the issue to the developers.\r\n```\r\n\r\ncontent of `/tmp/sphinx-err-SnsvwK.log` is:\r\n\r\n```\r\n# Sphinx version: 1.6.6\r\n# Python version: 2.7.14+ (CPython)\r\n# Docutils version: 0.14 \r\n# Jinja2 version: 2.10\r\n# Last messages:\r\n\r\n# Loaded extensions:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/dist-packages/sphinx/cmdline.py\", line 305, in main\r\n    opts.warningiserror, opts.tags, opts.verbosity, opts.jobs)\r\n  File \"/usr/lib/python2.7/dist-packages/sphinx/application.py\", line 234, in __init__\r\n    self._init_builder()\r\n  File \"/usr/lib/python2.7/dist-packages/sphinx/application.py\", line 312, in _init_builder\r\n    self.emit('builder-inited')\r\n  File \"/usr/lib/python2.7/dist-packages/sphinx/application.py\", line 489, in emit\r\n    return self.events.emit(event, self, *args)\r\n  File \"/usr/lib/python2.7/dist-packages/sphinx/events.py\", line 79, in emit\r\n    results.append(callback(*args))\r\n  File \"/usr/lib/python2.7/dist-packages/sphinx_gallery/gen_gallery.py\", line 222, in generate_gallery_rst\r\n    .format(examples_dir))\r\nIOError: Main example directory /home/morph/deb/build-area/python-networkx-2.1/doc/../examples does not have a README.txt file. Please write one to introduce your gallery.\r\n```\r\n\r\ncan you have a look?\r\n\r\nthanks!\n", "before_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nSetup script for networkx\n\nYou can install networkx with\n\npython setup.py install\n\"\"\"\nfrom glob import glob\nimport os\nimport sys\nif os.path.exists('MANIFEST'):\n    os.remove('MANIFEST')\n\nfrom setuptools import setup\n\nif sys.argv[-1] == 'setup.py':\n    print(\"To install, run 'python setup.py install'\")\n    print()\n\nif sys.version_info[:2] < (2, 7):\n    print(\"NetworkX requires Python 2.7 or later (%d.%d detected).\" %\n          sys.version_info[:2])\n    sys.exit(-1)\n\n# Write the version information.\nsys.path.insert(0, 'networkx')\nimport release\nversion = release.write_versionfile()\nsys.path.pop(0)\n\npackages = [\"networkx\",\n            \"networkx.algorithms\",\n            \"networkx.algorithms.assortativity\",\n            \"networkx.algorithms.bipartite\",\n            \"networkx.algorithms.node_classification\",\n            \"networkx.algorithms.centrality\",\n            \"networkx.algorithms.community\",\n            \"networkx.algorithms.components\",\n            \"networkx.algorithms.connectivity\",\n            \"networkx.algorithms.coloring\",\n            \"networkx.algorithms.flow\",\n            \"networkx.algorithms.traversal\",\n            \"networkx.algorithms.isomorphism\",\n            \"networkx.algorithms.shortest_paths\",\n            \"networkx.algorithms.link_analysis\",\n            \"networkx.algorithms.operators\",\n            \"networkx.algorithms.approximation\",\n            \"networkx.algorithms.tree\",\n            \"networkx.classes\",\n            \"networkx.generators\",\n            \"networkx.drawing\",\n            \"networkx.linalg\",\n            \"networkx.readwrite\",\n            \"networkx.readwrite.json_graph\",\n            \"networkx.tests\",\n            \"networkx.testing\",\n            \"networkx.utils\"]\n\ndocdirbase = 'share/doc/networkx-%s' % version\n# add basic documentation\ndata = [(docdirbase, glob(\"*.txt\"))]\n# add examples\nfor d in ['advanced',\n          'algorithms',\n          'basic',\n          '3d_drawing',\n          'drawing',\n          'graph',\n          'javascript',\n          'jit',\n          'pygraphviz',\n          'subclass']:\n    dd = os.path.join(docdirbase, 'examples', d)\n    pp = os.path.join('examples', d)\n    data.append((dd, glob(os.path.join(pp, \"*.py\"))))\n    data.append((dd, glob(os.path.join(pp, \"*.bz2\"))))\n    data.append((dd, glob(os.path.join(pp, \"*.gz\"))))\n    data.append((dd, glob(os.path.join(pp, \"*.mbox\"))))\n    data.append((dd, glob(os.path.join(pp, \"*.edgelist\"))))\n\n# add the tests\npackage_data = {\n    'networkx': ['tests/*.py'],\n    'networkx.algorithms': ['tests/*.py'],\n    'networkx.algorithms.assortativity': ['tests/*.py'],\n    'networkx.algorithms.bipartite': ['tests/*.py'],\n    'networkx.algorithms.node_classification': ['tests/*.py'],\n    'networkx.algorithms.centrality': ['tests/*.py'],\n    'networkx.algorithms.community': ['tests/*.py'],\n    'networkx.algorithms.components': ['tests/*.py'],\n    'networkx.algorithms.connectivity': ['tests/*.py'],\n    'networkx.algorithms.coloring': ['tests/*.py'],\n    'networkx.algorithms.flow': ['tests/*.py', 'tests/*.bz2'],\n    'networkx.algorithms.isomorphism': ['tests/*.py', 'tests/*.*99'],\n    'networkx.algorithms.link_analysis': ['tests/*.py'],\n    'networkx.algorithms.approximation': ['tests/*.py'],\n    'networkx.algorithms.operators': ['tests/*.py'],\n    'networkx.algorithms.shortest_paths': ['tests/*.py'],\n    'networkx.algorithms.traversal': ['tests/*.py'],\n    'networkx.algorithms.tree': ['tests/*.py'],\n    'networkx.classes': ['tests/*.py'],\n    'networkx.generators': ['tests/*.py', 'atlas.dat.gz'],\n    'networkx.drawing': ['tests/*.py'],\n    'networkx.linalg': ['tests/*.py'],\n    'networkx.readwrite': ['tests/*.py'],\n    'networkx.readwrite.json_graph': ['tests/*.py'],\n    'networkx.testing': ['tests/*.py'],\n    'networkx.utils': ['tests/*.py']\n}\n\ninstall_requires = ['decorator>=4.1.0']\nextras_require = {'all': ['numpy', 'scipy', 'pandas', 'matplotlib',\n                          'pygraphviz', 'pydot', 'pyyaml', 'gdal', 'lxml']}\n\nif __name__ == \"__main__\":\n\n    setup(\n        name=release.name.lower(),\n        version=version,\n        maintainer=release.maintainer,\n        maintainer_email=release.maintainer_email,\n        author=release.authors['Hagberg'][0],\n        author_email=release.authors['Hagberg'][1],\n        description=release.description,\n        keywords=release.keywords,\n        long_description=release.long_description,\n        license=release.license,\n        platforms=release.platforms,\n        url=release.url,\n        download_url=release.download_url,\n        classifiers=release.classifiers,\n        packages=packages,\n        data_files=data,\n        package_data=package_data,\n        install_requires=install_requires,\n        extras_require=extras_require,\n        test_suite='nose.collector',\n        tests_require=['nose>=0.10.1'],\n        zip_safe=False\n    )\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nSetup script for networkx\n\nYou can install networkx with\n\npython setup.py install\n\"\"\"\nfrom glob import glob\nimport os\nimport sys\nif os.path.exists('MANIFEST'):\n    os.remove('MANIFEST')\n\nfrom setuptools import setup\n\nif sys.argv[-1] == 'setup.py':\n    print(\"To install, run 'python setup.py install'\")\n    print()\n\nif sys.version_info[:2] < (2, 7):\n    print(\"NetworkX requires Python 2.7 or later (%d.%d detected).\" %\n          sys.version_info[:2])\n    sys.exit(-1)\n\n# Write the version information.\nsys.path.insert(0, 'networkx')\nimport release\nversion = release.write_versionfile()\nsys.path.pop(0)\n\npackages = [\"networkx\",\n            \"networkx.algorithms\",\n            \"networkx.algorithms.assortativity\",\n            \"networkx.algorithms.bipartite\",\n            \"networkx.algorithms.node_classification\",\n            \"networkx.algorithms.centrality\",\n            \"networkx.algorithms.community\",\n            \"networkx.algorithms.components\",\n            \"networkx.algorithms.connectivity\",\n            \"networkx.algorithms.coloring\",\n            \"networkx.algorithms.flow\",\n            \"networkx.algorithms.traversal\",\n            \"networkx.algorithms.isomorphism\",\n            \"networkx.algorithms.shortest_paths\",\n            \"networkx.algorithms.link_analysis\",\n            \"networkx.algorithms.operators\",\n            \"networkx.algorithms.approximation\",\n            \"networkx.algorithms.tree\",\n            \"networkx.classes\",\n            \"networkx.generators\",\n            \"networkx.drawing\",\n            \"networkx.linalg\",\n            \"networkx.readwrite\",\n            \"networkx.readwrite.json_graph\",\n            \"networkx.tests\",\n            \"networkx.testing\",\n            \"networkx.utils\"]\n\ndocdirbase = 'share/doc/networkx-%s' % version\n# add basic documentation\ndata = [(docdirbase, glob(\"*.txt\"))]\n# add examples\nfor d in ['.',\n          'advanced',\n          'algorithms',\n          'basic',\n          '3d_drawing',\n          'drawing',\n          'graph',\n          'javascript',\n          'jit',\n          'pygraphviz',\n          'subclass']:\n    dd = os.path.join(docdirbase, 'examples', d)\n    pp = os.path.join('examples', d)\n    data.append((dd, glob(os.path.join(pp, \"*.txt\"))))\n    data.append((dd, glob(os.path.join(pp, \"*.py\"))))\n    data.append((dd, glob(os.path.join(pp, \"*.bz2\"))))\n    data.append((dd, glob(os.path.join(pp, \"*.gz\"))))\n    data.append((dd, glob(os.path.join(pp, \"*.mbox\"))))\n    data.append((dd, glob(os.path.join(pp, \"*.edgelist\"))))\n\n# add the tests\npackage_data = {\n    'networkx': ['tests/*.py'],\n    'networkx.algorithms': ['tests/*.py'],\n    'networkx.algorithms.assortativity': ['tests/*.py'],\n    'networkx.algorithms.bipartite': ['tests/*.py'],\n    'networkx.algorithms.node_classification': ['tests/*.py'],\n    'networkx.algorithms.centrality': ['tests/*.py'],\n    'networkx.algorithms.community': ['tests/*.py'],\n    'networkx.algorithms.components': ['tests/*.py'],\n    'networkx.algorithms.connectivity': ['tests/*.py'],\n    'networkx.algorithms.coloring': ['tests/*.py'],\n    'networkx.algorithms.flow': ['tests/*.py', 'tests/*.bz2'],\n    'networkx.algorithms.isomorphism': ['tests/*.py', 'tests/*.*99'],\n    'networkx.algorithms.link_analysis': ['tests/*.py'],\n    'networkx.algorithms.approximation': ['tests/*.py'],\n    'networkx.algorithms.operators': ['tests/*.py'],\n    'networkx.algorithms.shortest_paths': ['tests/*.py'],\n    'networkx.algorithms.traversal': ['tests/*.py'],\n    'networkx.algorithms.tree': ['tests/*.py'],\n    'networkx.classes': ['tests/*.py'],\n    'networkx.generators': ['tests/*.py', 'atlas.dat.gz'],\n    'networkx.drawing': ['tests/*.py'],\n    'networkx.linalg': ['tests/*.py'],\n    'networkx.readwrite': ['tests/*.py'],\n    'networkx.readwrite.json_graph': ['tests/*.py'],\n    'networkx.testing': ['tests/*.py'],\n    'networkx.utils': ['tests/*.py']\n}\n\ninstall_requires = ['decorator>=4.1.0']\nextras_require = {'all': ['numpy', 'scipy', 'pandas', 'matplotlib',\n                          'pygraphviz', 'pydot', 'pyyaml', 'gdal', 'lxml']}\n\nif __name__ == \"__main__\":\n\n    setup(\n        name=release.name.lower(),\n        version=version,\n        maintainer=release.maintainer,\n        maintainer_email=release.maintainer_email,\n        author=release.authors['Hagberg'][0],\n        author_email=release.authors['Hagberg'][1],\n        description=release.description,\n        keywords=release.keywords,\n        long_description=release.long_description,\n        license=release.license,\n        platforms=release.platforms,\n        url=release.url,\n        download_url=release.download_url,\n        classifiers=release.classifiers,\n        packages=packages,\n        data_files=data,\n        package_data=package_data,\n        install_requires=install_requires,\n        extras_require=extras_require,\n        test_suite='nose.collector',\n        tests_require=['nose>=0.10.1'],\n        zip_safe=False\n    )\n", "path": "setup.py"}]}