We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Toil fails on python 3.7 due to dependency
Toil has an indirect dependency on  http_parser package which is no longer maintained on pypi (last update 2013).  This package does not compile with python 3.7.  It is required by pymesos

However, it does not appear that pymesos has released a version that corrects this.

┆Issue is synchronized with this [Jira Task](https://ucsc-cgl.atlassian.net/browse/TOIL-489)
┆Issue Number: TOIL-489


--- 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 # Copyright (C) 2015-2016 Regents of the University of California
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 from setuptools import find_packages, setup
16 import sys
17 
18 def runSetup():
19     """
20     Calls setup(). This function exists so the setup() invocation preceded more internal
21     functionality. The `version` module is imported dynamically by importVersion() below.
22     """
23     boto = 'boto==2.48.0'
24     boto3 = 'boto3>=1.7.50, <2.0'
25     futures = 'futures==3.1.1'
26     pycryptodome = 'pycryptodome==3.5.1'
27     pymesos = 'pymesos==0.3.7'
28     psutil = 'psutil >= 3.0.1, <6'
29     pynacl = 'pynacl==1.1.2'
30     gcs = 'google-cloud-storage==1.6.0'
31     gcs_oauth2_boto_plugin = 'gcs_oauth2_boto_plugin==1.14'
32     apacheLibcloud = 'apache-libcloud==2.2.1'
33     cwltool = 'cwltool==1.0.20190906054215'
34     schemaSalad = 'schema-salad<5,>=4.5.20190815125611'
35     galaxyLib = 'galaxy-lib==18.9.2'
36     htcondor = 'htcondor>=8.6.0'
37     kubernetes = 'kubernetes>=10, <11'
38     pytx = 'pytz>=2012'
39     dill = 'dill==0.2.7.1'
40     six = 'six>=1.10.0'
41     future = 'future'
42     requests = 'requests>=2, <3'
43     docker = 'docker==2.5.1'
44     subprocess32 = 'subprocess32<=3.5.2'
45     dateutil = 'python-dateutil'
46     addict = 'addict<=2.2.0'
47     sphinx = 'sphinx==1.7.5'
48     pathlib2 = 'pathlib2==2.3.2'
49 
50     core_reqs = [
51         dill,
52         six,
53         future,
54         requests,
55         docker,
56         dateutil,
57         psutil,
58         subprocess32,
59         addict,
60         sphinx,
61         pathlib2]
62 
63     aws_reqs = [
64         boto,
65         boto3,
66         futures,
67         pycryptodome]
68     cwl_reqs = [
69         cwltool,
70         schemaSalad,
71         galaxyLib]
72     encryption_reqs = [
73         pynacl]
74     google_reqs = [
75         gcs_oauth2_boto_plugin,  # is this being used??
76         apacheLibcloud,
77         gcs]
78     htcondor_reqs = [
79         htcondor]
80     kubernetes_reqs = [
81         kubernetes]
82     mesos_reqs = [
83         pymesos,
84         psutil]
85     wdl_reqs = []
86     
87 
88     # htcondor is not supported by apple
89     # this is tricky to conditionally support in 'all' due
90     # to how wheels work, so it is not included in all and
91     # must be explicitly installed as an extra
92     all_reqs = \
93         aws_reqs + \
94         cwl_reqs + \
95         encryption_reqs + \
96         google_reqs + \
97         kubernetes_reqs + \
98         mesos_reqs
99 
100     # remove the subprocess32 backport if not python2
101     if not sys.version_info[0] == 2:
102         core_reqs.remove(subprocess32)
103 
104     setup(
105         name='toil',
106         version=version.distVersion,
107         description='Pipeline management software for clusters.',
108         author='Benedict Paten',
109         author_email='benedict@soe.usc.edu',
110         url="https://github.com/BD2KGenomics/toil",
111         classifiers=[
112           'Development Status :: 5 - Production/Stable',
113           'Environment :: Console',
114           'Intended Audience :: Developers',
115           'Intended Audience :: Science/Research',
116           'Intended Audience :: Healthcare Industry',
117           'License :: OSI Approved :: Apache Software License',
118           'Natural Language :: English',
119           'Operating System :: MacOS :: MacOS X',
120           'Operating System :: POSIX',
121           'Operating System :: POSIX :: Linux',
122           'Programming Language :: Python :: 2.7',
123           'Programming Language :: Python :: 3.5',
124           'Programming Language :: Python :: 3.6',
125           'Topic :: Scientific/Engineering',
126           'Topic :: Scientific/Engineering :: Bio-Informatics',
127           'Topic :: Scientific/Engineering :: Astronomy',
128           'Topic :: Scientific/Engineering :: Atmospheric Science',
129           'Topic :: Scientific/Engineering :: Information Analysis',
130           'Topic :: Scientific/Engineering :: Medical Science Apps.',
131           'Topic :: System :: Distributed Computing',
132           'Topic :: Utilities'],
133         license="Apache License v2.0",
134         install_requires=core_reqs,
135         extras_require={
136             'aws': aws_reqs,
137             'cwl': cwl_reqs,
138             'encryption': encryption_reqs,
139             'google': google_reqs,
140             'htcondor:sys_platform!="darwin"': htcondor_reqs,
141             'kubernetes': kubernetes_reqs,
142             'mesos': mesos_reqs,
143             'wdl': wdl_reqs,
144             'all': all_reqs},
145         package_dir={'': 'src'},
146         packages=find_packages(where='src',
147                                # Note that we intentionally include the top-level `test` package for
148                                # functionality like the @experimental and @integrative decoratorss:
149                                exclude=['*.test.*']),
150         package_data = {
151             '': ['*.yml', 'cloud-config'],
152         },
153         # Unfortunately, the names of the entry points are hard-coded elsewhere in the code base so
154         # you can't just change them here. Luckily, most of them are pretty unique strings, and thus
155         # easy to search for.
156         entry_points={
157             'console_scripts': [
158                 'toil = toil.utils.toilMain:main',
159                 '_toil_worker = toil.worker:main',
160                 'cwltoil = toil.cwl.cwltoil:main [cwl]',
161                 'toil-cwl-runner = toil.cwl.cwltoil:main [cwl]',
162                 'toil-wdl-runner = toil.wdl.toilwdl:main',
163                 '_toil_mesos_executor = toil.batchSystems.mesos.executor:main [mesos]',
164                 '_toil_kubernetes_executor = toil.batchSystems.kubernetes:executor [kubernetes]']})
165 
166 
167 def importVersion():
168     """
169     Load and return the module object for src/toil/version.py, generating it from the template if
170     required.
171     """
172     import imp
173     try:
174         # Attempt to load the template first. It only exists in a working copy cloned via git.
175         import version_template
176     except ImportError:
177         # If loading the template fails we must be in a unpacked source distribution and
178         # src/toil/version.py will already exist.
179         pass
180     else:
181         # Use the template to generate src/toil/version.py
182         import os
183         import errno
184         from tempfile import NamedTemporaryFile
185 
186         new = version_template.expand_()
187         try:
188             with open('src/toil/version.py') as f:
189                 old = f.read()
190         except IOError as e:
191             if e.errno == errno.ENOENT:
192                 old = None
193             else:
194                 raise
195 
196         if old != new:
197             with NamedTemporaryFile(mode='w',dir='src/toil', prefix='version.py.', delete=False) as f:
198                 f.write(new)
199             os.rename(f.name, 'src/toil/version.py')
200     # Unfortunately, we can't use a straight import here because that would also load the stuff
201     # defined in src/toil/__init__.py which imports modules from external dependencies that may
202     # yet to be installed when setup.py is invoked.
203     return imp.load_source('toil.version', 'src/toil/version.py')
204 
205 
206 version = importVersion()
207 runSetup()
208
```
--- 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
@@ -25,6 +25,11 @@
     futures = 'futures==3.1.1'
     pycryptodome = 'pycryptodome==3.5.1'
     pymesos = 'pymesos==0.3.7'
+    # We need this specific http-parser that still claims to be version 0.8.3
+    # but which builds on Python 3.7+, to satisfy pymesos
+    http_parser = 'http-parser' + \
+                  '@https://github.com/adamnovak/http-parser/archive/190a17839ba229c635b59d960579451a81fe73f3.zip' + \
+                  '#sha256=3d30c84a426627e468657c44de199daee9d3210a48e392d4ad2e7497c5010949'
     psutil = 'psutil >= 3.0.1, <6'
     pynacl = 'pynacl==1.1.2'
     gcs = 'google-cloud-storage==1.6.0'
@@ -80,6 +85,7 @@
     kubernetes_reqs = [
         kubernetes]
     mesos_reqs = [
+        http_parser,
         pymesos,
         psutil]
     wdl_reqs = []

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -25,6 +25,11 @@\n     futures = 'futures==3.1.1'\n     pycryptodome = 'pycryptodome==3.5.1'\n     pymesos = 'pymesos==0.3.7'\n+    # We need this specific http-parser that still claims to be version 0.8.3\n+    # but which builds on Python 3.7+, to satisfy pymesos\n+    http_parser = 'http-parser' + \\\n+                  '@https://github.com/adamnovak/http-parser/archive/190a17839ba229c635b59d960579451a81fe73f3.zip' + \\\n+                  '#sha256=3d30c84a426627e468657c44de199daee9d3210a48e392d4ad2e7497c5010949'\n     psutil = 'psutil >= 3.0.1, <6'\n     pynacl = 'pynacl==1.1.2'\n     gcs = 'google-cloud-storage==1.6.0'\n@@ -80,6 +85,7 @@\n     kubernetes_reqs = [\n         kubernetes]\n     mesos_reqs = [\n+        http_parser,\n         pymesos,\n         psutil]\n     wdl_reqs = []\n", "issue": "Toil fails on python 3.7 due to dependency\nToil has an indirect dependency on  http_parser package which is no longer maintained on pypi (last update 2013).  This package does not compile with python 3.7.  It is required by pymesos\n\nHowever, it does not appear that pymesos has released a version that corrects this.\n\n\u2506Issue is synchronized with this [Jira Task](https://ucsc-cgl.atlassian.net/browse/TOIL-489)\n\u2506Issue Number: TOIL-489\n\n", "before_files": [{"content": "# Copyright (C) 2015-2016 Regents of the University of California\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.\n\nfrom setuptools import find_packages, setup\nimport sys\n\ndef runSetup():\n    \"\"\"\n    Calls setup(). This function exists so the setup() invocation preceded more internal\n    functionality. The `version` module is imported dynamically by importVersion() below.\n    \"\"\"\n    boto = 'boto==2.48.0'\n    boto3 = 'boto3>=1.7.50, <2.0'\n    futures = 'futures==3.1.1'\n    pycryptodome = 'pycryptodome==3.5.1'\n    pymesos = 'pymesos==0.3.7'\n    psutil = 'psutil >= 3.0.1, <6'\n    pynacl = 'pynacl==1.1.2'\n    gcs = 'google-cloud-storage==1.6.0'\n    gcs_oauth2_boto_plugin = 'gcs_oauth2_boto_plugin==1.14'\n    apacheLibcloud = 'apache-libcloud==2.2.1'\n    cwltool = 'cwltool==1.0.20190906054215'\n    schemaSalad = 'schema-salad<5,>=4.5.20190815125611'\n    galaxyLib = 'galaxy-lib==18.9.2'\n    htcondor = 'htcondor>=8.6.0'\n    kubernetes = 'kubernetes>=10, <11'\n    pytx = 'pytz>=2012'\n    dill = 'dill==0.2.7.1'\n    six = 'six>=1.10.0'\n    future = 'future'\n    requests = 'requests>=2, <3'\n    docker = 'docker==2.5.1'\n    subprocess32 = 'subprocess32<=3.5.2'\n    dateutil = 'python-dateutil'\n    addict = 'addict<=2.2.0'\n    sphinx = 'sphinx==1.7.5'\n    pathlib2 = 'pathlib2==2.3.2'\n\n    core_reqs = [\n        dill,\n        six,\n        future,\n        requests,\n        docker,\n        dateutil,\n        psutil,\n        subprocess32,\n        addict,\n        sphinx,\n        pathlib2]\n\n    aws_reqs = [\n        boto,\n        boto3,\n        futures,\n        pycryptodome]\n    cwl_reqs = [\n        cwltool,\n        schemaSalad,\n        galaxyLib]\n    encryption_reqs = [\n        pynacl]\n    google_reqs = [\n        gcs_oauth2_boto_plugin,  # is this being used??\n        apacheLibcloud,\n        gcs]\n    htcondor_reqs = [\n        htcondor]\n    kubernetes_reqs = [\n        kubernetes]\n    mesos_reqs = [\n        pymesos,\n        psutil]\n    wdl_reqs = []\n    \n\n    # htcondor is not supported by apple\n    # this is tricky to conditionally support in 'all' due\n    # to how wheels work, so it is not included in all and\n    # must be explicitly installed as an extra\n    all_reqs = \\\n        aws_reqs + \\\n        cwl_reqs + \\\n        encryption_reqs + \\\n        google_reqs + \\\n        kubernetes_reqs + \\\n        mesos_reqs\n\n    # remove the subprocess32 backport if not python2\n    if not sys.version_info[0] == 2:\n        core_reqs.remove(subprocess32)\n\n    setup(\n        name='toil',\n        version=version.distVersion,\n        description='Pipeline management software for clusters.',\n        author='Benedict Paten',\n        author_email='benedict@soe.usc.edu',\n        url=\"https://github.com/BD2KGenomics/toil\",\n        classifiers=[\n          'Development Status :: 5 - Production/Stable',\n          'Environment :: Console',\n          'Intended Audience :: Developers',\n          'Intended Audience :: Science/Research',\n          'Intended Audience :: Healthcare Industry',\n          'License :: OSI Approved :: Apache Software License',\n          'Natural Language :: English',\n          'Operating System :: MacOS :: MacOS X',\n          'Operating System :: POSIX',\n          'Operating System :: POSIX :: Linux',\n          'Programming Language :: Python :: 2.7',\n          'Programming Language :: Python :: 3.5',\n          'Programming Language :: Python :: 3.6',\n          'Topic :: Scientific/Engineering',\n          'Topic :: Scientific/Engineering :: Bio-Informatics',\n          'Topic :: Scientific/Engineering :: Astronomy',\n          'Topic :: Scientific/Engineering :: Atmospheric Science',\n          'Topic :: Scientific/Engineering :: Information Analysis',\n          'Topic :: Scientific/Engineering :: Medical Science Apps.',\n          'Topic :: System :: Distributed Computing',\n          'Topic :: Utilities'],\n        license=\"Apache License v2.0\",\n        install_requires=core_reqs,\n        extras_require={\n            'aws': aws_reqs,\n            'cwl': cwl_reqs,\n            'encryption': encryption_reqs,\n            'google': google_reqs,\n            'htcondor:sys_platform!=\"darwin\"': htcondor_reqs,\n            'kubernetes': kubernetes_reqs,\n            'mesos': mesos_reqs,\n            'wdl': wdl_reqs,\n            'all': all_reqs},\n        package_dir={'': 'src'},\n        packages=find_packages(where='src',\n                               # Note that we intentionally include the top-level `test` package for\n                               # functionality like the @experimental and @integrative decoratorss:\n                               exclude=['*.test.*']),\n        package_data = {\n            '': ['*.yml', 'cloud-config'],\n        },\n        # Unfortunately, the names of the entry points are hard-coded elsewhere in the code base so\n        # you can't just change them here. Luckily, most of them are pretty unique strings, and thus\n        # easy to search for.\n        entry_points={\n            'console_scripts': [\n                'toil = toil.utils.toilMain:main',\n                '_toil_worker = toil.worker:main',\n                'cwltoil = toil.cwl.cwltoil:main [cwl]',\n                'toil-cwl-runner = toil.cwl.cwltoil:main [cwl]',\n                'toil-wdl-runner = toil.wdl.toilwdl:main',\n                '_toil_mesos_executor = toil.batchSystems.mesos.executor:main [mesos]',\n                '_toil_kubernetes_executor = toil.batchSystems.kubernetes:executor [kubernetes]']})\n\n\ndef importVersion():\n    \"\"\"\n    Load and return the module object for src/toil/version.py, generating it from the template if\n    required.\n    \"\"\"\n    import imp\n    try:\n        # Attempt to load the template first. It only exists in a working copy cloned via git.\n        import version_template\n    except ImportError:\n        # If loading the template fails we must be in a unpacked source distribution and\n        # src/toil/version.py will already exist.\n        pass\n    else:\n        # Use the template to generate src/toil/version.py\n        import os\n        import errno\n        from tempfile import NamedTemporaryFile\n\n        new = version_template.expand_()\n        try:\n            with open('src/toil/version.py') as f:\n                old = f.read()\n        except IOError as e:\n            if e.errno == errno.ENOENT:\n                old = None\n            else:\n                raise\n\n        if old != new:\n            with NamedTemporaryFile(mode='w',dir='src/toil', prefix='version.py.', delete=False) as f:\n                f.write(new)\n            os.rename(f.name, 'src/toil/version.py')\n    # Unfortunately, we can't use a straight import here because that would also load the stuff\n    # defined in src/toil/__init__.py which imports modules from external dependencies that may\n    # yet to be installed when setup.py is invoked.\n    return imp.load_source('toil.version', 'src/toil/version.py')\n\n\nversion = importVersion()\nrunSetup()\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright (C) 2015-2016 Regents of the University of California\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.\n\nfrom setuptools import find_packages, setup\nimport sys\n\ndef runSetup():\n    \"\"\"\n    Calls setup(). This function exists so the setup() invocation preceded more internal\n    functionality. The `version` module is imported dynamically by importVersion() below.\n    \"\"\"\n    boto = 'boto==2.48.0'\n    boto3 = 'boto3>=1.7.50, <2.0'\n    futures = 'futures==3.1.1'\n    pycryptodome = 'pycryptodome==3.5.1'\n    pymesos = 'pymesos==0.3.7'\n    # We need this specific http-parser that still claims to be version 0.8.3\n    # but which builds on Python 3.7+, to satisfy pymesos\n    http_parser = 'http-parser' + \\\n                  '@https://github.com/adamnovak/http-parser/archive/190a17839ba229c635b59d960579451a81fe73f3.zip' + \\\n                  '#sha256=3d30c84a426627e468657c44de199daee9d3210a48e392d4ad2e7497c5010949'\n    psutil = 'psutil >= 3.0.1, <6'\n    pynacl = 'pynacl==1.1.2'\n    gcs = 'google-cloud-storage==1.6.0'\n    gcs_oauth2_boto_plugin = 'gcs_oauth2_boto_plugin==1.14'\n    apacheLibcloud = 'apache-libcloud==2.2.1'\n    cwltool = 'cwltool==1.0.20190906054215'\n    schemaSalad = 'schema-salad<5,>=4.5.20190815125611'\n    galaxyLib = 'galaxy-lib==18.9.2'\n    htcondor = 'htcondor>=8.6.0'\n    kubernetes = 'kubernetes>=10, <11'\n    pytx = 'pytz>=2012'\n    dill = 'dill==0.2.7.1'\n    six = 'six>=1.10.0'\n    future = 'future'\n    requests = 'requests>=2, <3'\n    docker = 'docker==2.5.1'\n    subprocess32 = 'subprocess32<=3.5.2'\n    dateutil = 'python-dateutil'\n    addict = 'addict<=2.2.0'\n    sphinx = 'sphinx==1.7.5'\n    pathlib2 = 'pathlib2==2.3.2'\n\n    core_reqs = [\n        dill,\n        six,\n        future,\n        requests,\n        docker,\n        dateutil,\n        psutil,\n        subprocess32,\n        addict,\n        sphinx,\n        pathlib2]\n\n    aws_reqs = [\n        boto,\n        boto3,\n        futures,\n        pycryptodome]\n    cwl_reqs = [\n        cwltool,\n        schemaSalad,\n        galaxyLib]\n    encryption_reqs = [\n        pynacl]\n    google_reqs = [\n        gcs_oauth2_boto_plugin,  # is this being used??\n        apacheLibcloud,\n        gcs]\n    htcondor_reqs = [\n        htcondor]\n    kubernetes_reqs = [\n        kubernetes]\n    mesos_reqs = [\n        http_parser,\n        pymesos,\n        psutil]\n    wdl_reqs = []\n    \n\n    # htcondor is not supported by apple\n    # this is tricky to conditionally support in 'all' due\n    # to how wheels work, so it is not included in all and\n    # must be explicitly installed as an extra\n    all_reqs = \\\n        aws_reqs + \\\n        cwl_reqs + \\\n        encryption_reqs + \\\n        google_reqs + \\\n        kubernetes_reqs + \\\n        mesos_reqs\n\n    # remove the subprocess32 backport if not python2\n    if not sys.version_info[0] == 2:\n        core_reqs.remove(subprocess32)\n\n    setup(\n        name='toil',\n        version=version.distVersion,\n        description='Pipeline management software for clusters.',\n        author='Benedict Paten',\n        author_email='benedict@soe.usc.edu',\n        url=\"https://github.com/BD2KGenomics/toil\",\n        classifiers=[\n          'Development Status :: 5 - Production/Stable',\n          'Environment :: Console',\n          'Intended Audience :: Developers',\n          'Intended Audience :: Science/Research',\n          'Intended Audience :: Healthcare Industry',\n          'License :: OSI Approved :: Apache Software License',\n          'Natural Language :: English',\n          'Operating System :: MacOS :: MacOS X',\n          'Operating System :: POSIX',\n          'Operating System :: POSIX :: Linux',\n          'Programming Language :: Python :: 2.7',\n          'Programming Language :: Python :: 3.5',\n          'Programming Language :: Python :: 3.6',\n          'Topic :: Scientific/Engineering',\n          'Topic :: Scientific/Engineering :: Bio-Informatics',\n          'Topic :: Scientific/Engineering :: Astronomy',\n          'Topic :: Scientific/Engineering :: Atmospheric Science',\n          'Topic :: Scientific/Engineering :: Information Analysis',\n          'Topic :: Scientific/Engineering :: Medical Science Apps.',\n          'Topic :: System :: Distributed Computing',\n          'Topic :: Utilities'],\n        license=\"Apache License v2.0\",\n        install_requires=core_reqs,\n        extras_require={\n            'aws': aws_reqs,\n            'cwl': cwl_reqs,\n            'encryption': encryption_reqs,\n            'google': google_reqs,\n            'htcondor:sys_platform!=\"darwin\"': htcondor_reqs,\n            'kubernetes': kubernetes_reqs,\n            'mesos': mesos_reqs,\n            'wdl': wdl_reqs,\n            'all': all_reqs},\n        package_dir={'': 'src'},\n        packages=find_packages(where='src',\n                               # Note that we intentionally include the top-level `test` package for\n                               # functionality like the @experimental and @integrative decoratorss:\n                               exclude=['*.test.*']),\n        package_data = {\n            '': ['*.yml', 'cloud-config'],\n        },\n        # Unfortunately, the names of the entry points are hard-coded elsewhere in the code base so\n        # you can't just change them here. Luckily, most of them are pretty unique strings, and thus\n        # easy to search for.\n        entry_points={\n            'console_scripts': [\n                'toil = toil.utils.toilMain:main',\n                '_toil_worker = toil.worker:main',\n                'cwltoil = toil.cwl.cwltoil:main [cwl]',\n                'toil-cwl-runner = toil.cwl.cwltoil:main [cwl]',\n                'toil-wdl-runner = toil.wdl.toilwdl:main',\n                '_toil_mesos_executor = toil.batchSystems.mesos.executor:main [mesos]',\n                '_toil_kubernetes_executor = toil.batchSystems.kubernetes:executor [kubernetes]']})\n\n\ndef importVersion():\n    \"\"\"\n    Load and return the module object for src/toil/version.py, generating it from the template if\n    required.\n    \"\"\"\n    import imp\n    try:\n        # Attempt to load the template first. It only exists in a working copy cloned via git.\n        import version_template\n    except ImportError:\n        # If loading the template fails we must be in a unpacked source distribution and\n        # src/toil/version.py will already exist.\n        pass\n    else:\n        # Use the template to generate src/toil/version.py\n        import os\n        import errno\n        from tempfile import NamedTemporaryFile\n\n        new = version_template.expand_()\n        try:\n            with open('src/toil/version.py') as f:\n                old = f.read()\n        except IOError as e:\n            if e.errno == errno.ENOENT:\n                old = None\n            else:\n                raise\n\n        if old != new:\n            with NamedTemporaryFile(mode='w',dir='src/toil', prefix='version.py.', delete=False) as f:\n                f.write(new)\n            os.rename(f.name, 'src/toil/version.py')\n    # Unfortunately, we can't use a straight import here because that would also load the stuff\n    # defined in src/toil/__init__.py which imports modules from external dependencies that may\n    # yet to be installed when setup.py is invoked.\n    return imp.load_source('toil.version', 'src/toil/version.py')\n\n\nversion = importVersion()\nrunSetup()\n", "path": "setup.py"}]}