prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Make ta-lib optional
  `ta-lib` is causing us many installation problems. We should thus make it optional.
  
  
  --- 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 #
  3 # Copyright 2013 Quantopian, Inc.
  4 #
  5 # Licensed under the Apache License, Version 2.0 (the "License");
  6 # you may not use this file except in compliance with the License.
  7 # You may obtain a copy of the License at
  8 #
  9 #     http://www.apache.org/licenses/LICENSE-2.0
  10 #
  11 # Unless required by applicable law or agreed to in writing, software
  12 # distributed under the License is distributed on an "AS IS" BASIS,
  13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14 # See the License for the specific language governing permissions and
  15 # limitations under the License.
  16 import sys
  17 
  18 from setuptools import setup, find_packages
  19 
  20 LONG_DESCRIPTION = None
  21 README_MARKDOWN = None
  22 
  23 with open('README.md') as markdown_source:
  24     README_MARKDOWN = markdown_source.read()
  25 
  26 if 'upload' in sys.argv:
  27     # Converts the README.md file to ReST, since PyPI uses ReST for formatting,
  28     # This allows to have one canonical README file, being the README.md
  29     # The conversion only needs to be done on upload.
  30     # Otherwise, the pandoc import and errors that are thrown when
  31     # pandoc are both overhead and a source of confusion for general
  32     # usage/installation.
  33     import pandoc
  34     pandoc.core.PANDOC_PATH = 'pandoc'
  35     doc = pandoc.Document()
  36     doc.markdown = README_MARKDOWN
  37     LONG_DESCRIPTION = doc.rst
  38 else:
  39     # If pandoc isn't installed, e.g. when downloading from pip,
  40     # just use the regular README.
  41     LONG_DESCRIPTION = README_MARKDOWN
  42 
  43 setup(
  44     name='zipline',
  45     version='0.7.0',
  46     description='A backtester for financial algorithms.',
  47     author='Quantopian Inc.',
  48     author_email='opensource@quantopian.com',
  49     packages=find_packages(),
  50     scripts=['scripts/run_algo.py'],
  51     long_description=LONG_DESCRIPTION,
  52     license='Apache 2.0',
  53     classifiers=[
  54         'Development Status :: 4 - Beta',
  55         'License :: OSI Approved :: Apache Software License',
  56         'Natural Language :: English',
  57         'Programming Language :: Python',
  58         'Programming Language :: Python :: 2.7',
  59         'Programming Language :: Python :: 3.3',
  60         'Operating System :: OS Independent',
  61         'Intended Audience :: Science/Research',
  62         'Topic :: Office/Business :: Financial',
  63         'Topic :: Scientific/Engineering :: Information Analysis',
  64         'Topic :: System :: Distributed Computing',
  65     ],
  66     install_requires=[
  67         'Logbook',
  68         'pytz',
  69         'requests',
  70         'numpy',
  71         'pandas',
  72         'six'
  73     ],
  74     url="https://github.com/quantopian/zipline"
  75 )
  76
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -1,6 +1,6 @@
   #!/usr/bin/env python
   #
  -# Copyright 2013 Quantopian, Inc.
  +# Copyright 2014 Quantopian, Inc.
   #
   # Licensed under the Apache License, Version 2.0 (the "License");
   # you may not use this file except in compliance with the License.
  @@ -71,5 +71,8 @@
           'pandas',
           'six'
       ],
  +    extras_require = {
  +        'talib':  ["talib"],
  +    },
       url="https://github.com/quantopian/zipline"
   )
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,6 +1,6 @@\n #!/usr/bin/env python\n #\n-# Copyright 2013 Quantopian, Inc.\n+# Copyright 2014 Quantopian, Inc.\n #\n # Licensed under the Apache License, Version 2.0 (the \"License\");\n # you may not use this file except in compliance with the License.\n@@ -71,5 +71,8 @@\n         'pandas',\n         'six'\n     ],\n+    extras_require = {\n+        'talib':  [\"talib\"],\n+    },\n     url=\"https://github.com/quantopian/zipline\"\n )\n", "issue": "Make ta-lib optional\n`ta-lib` is causing us many installation problems. We should thus make it optional.\n\n", "before_files": [{"content": "#!/usr/bin/env python\n#\n# Copyright 2013 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport sys\n\nfrom setuptools import setup, find_packages\n\nLONG_DESCRIPTION = None\nREADME_MARKDOWN = None\n\nwith open('README.md') as markdown_source:\n    README_MARKDOWN = markdown_source.read()\n\nif 'upload' in sys.argv:\n    # Converts the README.md file to ReST, since PyPI uses ReST for formatting,\n    # This allows to have one canonical README file, being the README.md\n    # The conversion only needs to be done on upload.\n    # Otherwise, the pandoc import and errors that are thrown when\n    # pandoc are both overhead and a source of confusion for general\n    # usage/installation.\n    import pandoc\n    pandoc.core.PANDOC_PATH = 'pandoc'\n    doc = pandoc.Document()\n    doc.markdown = README_MARKDOWN\n    LONG_DESCRIPTION = doc.rst\nelse:\n    # If pandoc isn't installed, e.g. when downloading from pip,\n    # just use the regular README.\n    LONG_DESCRIPTION = README_MARKDOWN\n\nsetup(\n    name='zipline',\n    version='0.7.0',\n    description='A backtester for financial algorithms.',\n    author='Quantopian Inc.',\n    author_email='opensource@quantopian.com',\n    packages=find_packages(),\n    scripts=['scripts/run_algo.py'],\n    long_description=LONG_DESCRIPTION,\n    license='Apache 2.0',\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'License :: OSI Approved :: Apache Software License',\n        'Natural Language :: English',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3.3',\n        'Operating System :: OS Independent',\n        'Intended Audience :: Science/Research',\n        'Topic :: Office/Business :: Financial',\n        'Topic :: Scientific/Engineering :: Information Analysis',\n        'Topic :: System :: Distributed Computing',\n    ],\n    install_requires=[\n        'Logbook',\n        'pytz',\n        'requests',\n        'numpy',\n        'pandas',\n        'six'\n    ],\n    url=\"https://github.com/quantopian/zipline\"\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n#\n# Copyright 2014 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport sys\n\nfrom setuptools import setup, find_packages\n\nLONG_DESCRIPTION = None\nREADME_MARKDOWN = None\n\nwith open('README.md') as markdown_source:\n    README_MARKDOWN = markdown_source.read()\n\nif 'upload' in sys.argv:\n    # Converts the README.md file to ReST, since PyPI uses ReST for formatting,\n    # This allows to have one canonical README file, being the README.md\n    # The conversion only needs to be done on upload.\n    # Otherwise, the pandoc import and errors that are thrown when\n    # pandoc are both overhead and a source of confusion for general\n    # usage/installation.\n    import pandoc\n    pandoc.core.PANDOC_PATH = 'pandoc'\n    doc = pandoc.Document()\n    doc.markdown = README_MARKDOWN\n    LONG_DESCRIPTION = doc.rst\nelse:\n    # If pandoc isn't installed, e.g. when downloading from pip,\n    # just use the regular README.\n    LONG_DESCRIPTION = README_MARKDOWN\n\nsetup(\n    name='zipline',\n    version='0.7.0',\n    description='A backtester for financial algorithms.',\n    author='Quantopian Inc.',\n    author_email='opensource@quantopian.com',\n    packages=find_packages(),\n    scripts=['scripts/run_algo.py'],\n    long_description=LONG_DESCRIPTION,\n    license='Apache 2.0',\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'License :: OSI Approved :: Apache Software License',\n        'Natural Language :: English',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3.3',\n        'Operating System :: OS Independent',\n        'Intended Audience :: Science/Research',\n        'Topic :: Office/Business :: Financial',\n        'Topic :: Scientific/Engineering :: Information Analysis',\n        'Topic :: System :: Distributed Computing',\n    ],\n    install_requires=[\n        'Logbook',\n        'pytz',\n        'requests',\n        'numpy',\n        'pandas',\n        'six'\n    ],\n    extras_require = {\n        'talib':  [\"talib\"],\n    },\n    url=\"https://github.com/quantopian/zipline\"\n)\n", "path": "setup.py"}]}