We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Installing on old pythons.
### Setup

I am reporting a problem with Biopython source, and Python 3.5. This stems from the pypi packages not declaring for which versions of python they are compatible (not specifying `python_requires="....",` in the call to `setup()` in `setup.py`.

### Expected behaviour

Trying to install biopython with pip should install a version of biopython that is compatible with python 3.5.

### Actual behaviour

Without a version specified pip will download the latest and then when `setup.py` is invoked the python version is caught and the install exits.

### Steps to reproduce

```pip install biopython

Collecting biopython
  Downloading biopython-1.77.tar.gz (16.8 MB)
     |████████████████████████████████| 16.8 MB 9.5 MB/s
    ERROR: Command errored out with exit status 1:
     command: /home/OXFORDNANOLABS/cwright/git/medaka/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fal177xf/biopython/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fal177xf/biopython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-c1oi4si4
         cwd: /tmp/pip-install-fal177xf/biopython/
    Complete output (1 lines):
    Biopython requires Python 3.6 or later. Python 3.5 detected.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
```


--- 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 """setuptools based setup script for Biopython.
2 
3 This uses setuptools which is now the standard python mechanism for
4 installing packages. If you have downloaded and uncompressed the
5 Biopython source code, or fetched it from git, for the simplest
6 installation just type the command::
7 
8     python setup.py install
9 
10 However, you would normally install the latest Biopython release from
11 the PyPI archive with::
12 
13     pip install biopython
14 
15 For more in-depth instructions, see the installation section of the
16 Biopython manual, linked to from:
17 
18 http://biopython.org/wiki/Documentation
19 
20 Or, if all else fails, feel free to write to the sign up to the Biopython
21 mailing list and ask for help.  See:
22 
23 http://biopython.org/wiki/Mailing_lists
24 """
25 
26 import sys
27 import os
28 
29 try:
30     from setuptools import setup
31     from setuptools import Command
32     from setuptools import Extension
33 except ImportError:
34     sys.exit(
35         "We need the Python library setuptools to be installed. "
36         "Try runnning: python -m ensurepip"
37     )
38 
39 if "bdist_wheel" in sys.argv:
40     try:
41         import wheel  # noqa: F401
42     except ImportError:
43         sys.exit(
44             "We need both setuptools AND wheel packages installed "
45             "for bdist_wheel to work. Try running: pip install wheel"
46         )
47 
48 
49 # Make sure we have the right Python version.
50 if sys.version_info[:2] < (3, 6):
51     sys.stderr.write(
52         "Biopython requires Python 3.6 or later. "
53         "Python %d.%d detected.\n" % sys.version_info[:2]
54     )
55     sys.exit(1)
56 
57 
58 class test_biopython(Command):
59     """Run all of the tests for the package.
60 
61     This is a automatic test run class to make distutils kind of act like
62     perl. With this you can do:
63 
64     python setup.py build
65     python setup.py install
66     python setup.py test
67 
68     """
69 
70     description = "Automatically run the test suite for Biopython."
71     user_options = [("offline", None, "Don't run online tests")]
72 
73     def initialize_options(self):
74         """No-op, initialise options."""
75         self.offline = None
76 
77     def finalize_options(self):
78         """No-op, finalise options."""
79         pass
80 
81     def run(self):
82         """Run the tests."""
83         this_dir = os.getcwd()
84 
85         # change to the test dir and run the tests
86         os.chdir("Tests")
87         sys.path.insert(0, "")
88         import run_tests
89 
90         if self.offline:
91             run_tests.main(["--offline"])
92         else:
93             run_tests.main([])
94 
95         # change back to the current directory
96         os.chdir(this_dir)
97 
98 
99 def can_import(module_name):
100     """Check we can import the requested module."""
101     try:
102         return __import__(module_name)
103     except ImportError:
104         return None
105 
106 
107 # Using requirements.txt is preferred for an application
108 # (and likely will pin specific version numbers), using
109 # setup.py's install_requires is preferred for a library
110 # (and should try not to be overly narrow with versions).
111 REQUIRES = ["numpy"]
112 
113 # --- set up the packages we are going to install
114 # standard biopython packages
115 PACKAGES = [
116     "Bio",
117     "Bio.Affy",
118     "Bio.Align",
119     "Bio.Align.Applications",
120     "Bio.Align.substitution_matrices",
121     "Bio.AlignIO",
122     "Bio.Alphabet",
123     "Bio.Application",
124     "Bio.Blast",
125     "Bio.CAPS",
126     "Bio.Cluster",
127     "Bio.codonalign",
128     "Bio.Compass",
129     "Bio.Crystal",
130     "Bio.Data",
131     "Bio.Emboss",
132     "Bio.Entrez",
133     "Bio.ExPASy",
134     "Bio.FSSP",
135     "Bio.GenBank",
136     "Bio.Geo",
137     "Bio.Graphics",
138     "Bio.Graphics.GenomeDiagram",
139     "Bio.HMM",
140     "Bio.KEGG",
141     "Bio.KEGG.Compound",
142     "Bio.KEGG.Enzyme",
143     "Bio.KEGG.Gene",
144     "Bio.KEGG.Map",
145     "Bio.PDB.mmtf",
146     "Bio.KEGG.KGML",
147     "Bio.Medline",
148     "Bio.motifs",
149     "Bio.motifs.applications",
150     "Bio.motifs.jaspar",
151     "Bio.Nexus",
152     "Bio.NMR",
153     "Bio.Pathway",
154     "Bio.Pathway.Rep",
155     "Bio.PDB",
156     "Bio.phenotype",
157     "Bio.PopGen",
158     "Bio.PopGen.GenePop",
159     "Bio.Restriction",
160     "Bio.SCOP",
161     "Bio.SearchIO",
162     "Bio.SearchIO._legacy",
163     "Bio.SearchIO._model",
164     "Bio.SearchIO.BlastIO",
165     "Bio.SearchIO.HHsuiteIO",
166     "Bio.SearchIO.HmmerIO",
167     "Bio.SearchIO.ExonerateIO",
168     "Bio.SearchIO.InterproscanIO",
169     "Bio.SeqIO",
170     "Bio.SeqUtils",
171     "Bio.Sequencing",
172     "Bio.Sequencing.Applications",
173     "Bio.Statistics",
174     "Bio.SubsMat",
175     "Bio.SVDSuperimposer",
176     "Bio.PDB.QCPSuperimposer",
177     "Bio.SwissProt",
178     "Bio.TogoWS",
179     "Bio.Phylo",
180     "Bio.Phylo.Applications",
181     "Bio.Phylo.PAML",
182     "Bio.UniGene",
183     "Bio.UniProt",
184     "Bio.Wise",
185     # Other top level packages,
186     "BioSQL",
187 ]
188 
189 EXTENSIONS = [
190     Extension("Bio.Align._aligners", ["Bio/Align/_aligners.c"]),
191     Extension("Bio.cpairwise2", ["Bio/cpairwise2module.c"]),
192     Extension("Bio.Nexus.cnexus", ["Bio/Nexus/cnexus.c"]),
193     Extension(
194         "Bio.PDB.QCPSuperimposer.qcprotmodule",
195         ["Bio/PDB/QCPSuperimposer/qcprotmodule.c"],
196     ),
197     Extension("Bio.motifs._pwm", ["Bio/motifs/_pwm.c"]),
198     Extension(
199         "Bio.Cluster._cluster", ["Bio/Cluster/cluster.c", "Bio/Cluster/clustermodule.c"]
200     ),
201     Extension("Bio.PDB.kdtrees", ["Bio/PDB/kdtrees.c"]),
202 ]
203 
204 # We now define the Biopython version number in Bio/__init__.py
205 # Here we can't use "import Bio" then "Bio.__version__" as that would
206 # tell us the version of Biopython already installed (if any).
207 __version__ = "Undefined"
208 for line in open("Bio/__init__.py"):
209     if line.startswith("__version__"):
210         exec(line.strip())
211 
212 # We now load in our reStructuredText README.rst file to pass explicitly in the
213 # metadata, since at time of writing PyPI did not do this for us.
214 #
215 # Must make encoding explicit to avoid any conflict with the local default.
216 # Currently keeping README as ASCII (might switch to UTF8 later if needed).
217 # If any invalid character does appear in README, this will fail and alert us.
218 with open("README.rst", encoding="ascii") as handle:
219     readme_rst = handle.read()
220 
221 setup(
222     name="biopython",
223     version=__version__,
224     author="The Biopython Contributors",
225     author_email="biopython@biopython.org",
226     url="https://biopython.org/",
227     description="Freely available tools for computational molecular biology.",
228     long_description=readme_rst,
229     project_urls={
230         "Documentation": "https://biopython.org/wiki/Documentation",
231         "Source": "https://github.com/biopython/biopython/",
232         "Tracker": "https://github.com/biopython/biopython/issues",
233     },
234     classifiers=[
235         "Development Status :: 5 - Production/Stable",
236         "Intended Audience :: Developers",
237         "Intended Audience :: Science/Research",
238         "License :: Freely Distributable",
239         # Technically the "Biopython License Agreement" is not OSI approved,
240         # but is almost https://opensource.org/licenses/HPND so might put:
241         # 'License :: OSI Approved',
242         # To resolve this we are moving to dual-licensing with 3-clause BSD:
243         # 'License :: OSI Approved :: BSD License',
244         "Operating System :: OS Independent",
245         "Programming Language :: Python",
246         "Programming Language :: Python :: 3",
247         "Programming Language :: Python :: 3.6",
248         "Programming Language :: Python :: 3.7",
249         "Programming Language :: Python :: 3.8",
250         "Topic :: Scientific/Engineering",
251         "Topic :: Scientific/Engineering :: Bio-Informatics",
252         "Topic :: Software Development :: Libraries :: Python Modules",
253     ],
254     cmdclass={"test": test_biopython},
255     packages=PACKAGES,
256     ext_modules=EXTENSIONS,
257     include_package_data=True,  # done via MANIFEST.in under setuptools
258     install_requires=REQUIRES,
259 )
260
```
--- 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
@@ -47,10 +47,11 @@
 
 
 # Make sure we have the right Python version.
-if sys.version_info[:2] < (3, 6):
+MIN_PY_VER = (3, 6)
+if sys.version_info[:2] < MIN_PY_VER:
     sys.stderr.write(
-        "Biopython requires Python 3.6 or later. "
-        "Python %d.%d detected.\n" % sys.version_info[:2]
+        ("Biopython requires Python %i.%i or later. " % MIN_PY_VER)
+        + ("Python %d.%d detected.\n" % sys.version_info[:2])
     )
     sys.exit(1)
 
@@ -256,4 +257,5 @@
     ext_modules=EXTENSIONS,
     include_package_data=True,  # done via MANIFEST.in under setuptools
     install_requires=REQUIRES,
+    python_requires=">=%i.%i" % MIN_PY_VER,
 )

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -47,10 +47,11 @@\n \n \n # Make sure we have the right Python version.\n-if sys.version_info[:2] < (3, 6):\n+MIN_PY_VER = (3, 6)\n+if sys.version_info[:2] < MIN_PY_VER:\n     sys.stderr.write(\n-        \"Biopython requires Python 3.6 or later. \"\n-        \"Python %d.%d detected.\\n\" % sys.version_info[:2]\n+        (\"Biopython requires Python %i.%i or later. \" % MIN_PY_VER)\n+        + (\"Python %d.%d detected.\\n\" % sys.version_info[:2])\n     )\n     sys.exit(1)\n \n@@ -256,4 +257,5 @@\n     ext_modules=EXTENSIONS,\n     include_package_data=True,  # done via MANIFEST.in under setuptools\n     install_requires=REQUIRES,\n+    python_requires=\">=%i.%i\" % MIN_PY_VER,\n )\n", "issue": "Installing on old pythons.\n### Setup\r\n\r\nI am reporting a problem with Biopython source, and Python 3.5. This stems from the pypi packages not declaring for which versions of python they are compatible (not specifying `python_requires=\"....\",` in the call to `setup()` in `setup.py`.\r\n\r\n### Expected behaviour\r\n\r\nTrying to install biopython with pip should install a version of biopython that is compatible with python 3.5.\r\n\r\n### Actual behaviour\r\n\r\nWithout a version specified pip will download the latest and then when `setup.py` is invoked the python version is caught and the install exits.\r\n\r\n### Steps to reproduce\r\n\r\n```pip install biopython\r\n\r\nCollecting biopython\r\n  Downloading biopython-1.77.tar.gz (16.8 MB)\r\n     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 16.8 MB 9.5 MB/s\r\n    ERROR: Command errored out with exit status 1:\r\n     command: /home/OXFORDNANOLABS/cwright/git/medaka/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/tmp/pip-install-fal177xf/biopython/setup.py'\"'\"'; __file__='\"'\"'/tmp/pip-install-fal177xf/biopython/setup.py'\"'\"';f=getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__);code=f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' egg_info --egg-base /tmp/pip-pip-egg-info-c1oi4si4\r\n         cwd: /tmp/pip-install-fal177xf/biopython/\r\n    Complete output (1 lines):\r\n    Biopython requires Python 3.6 or later. Python 3.5 detected.\r\n    ----------------------------------------\r\nERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.\r\n```\r\n\n", "before_files": [{"content": "\"\"\"setuptools based setup script for Biopython.\n\nThis uses setuptools which is now the standard python mechanism for\ninstalling packages. If you have downloaded and uncompressed the\nBiopython source code, or fetched it from git, for the simplest\ninstallation just type the command::\n\n    python setup.py install\n\nHowever, you would normally install the latest Biopython release from\nthe PyPI archive with::\n\n    pip install biopython\n\nFor more in-depth instructions, see the installation section of the\nBiopython manual, linked to from:\n\nhttp://biopython.org/wiki/Documentation\n\nOr, if all else fails, feel free to write to the sign up to the Biopython\nmailing list and ask for help.  See:\n\nhttp://biopython.org/wiki/Mailing_lists\n\"\"\"\n\nimport sys\nimport os\n\ntry:\n    from setuptools import setup\n    from setuptools import Command\n    from setuptools import Extension\nexcept ImportError:\n    sys.exit(\n        \"We need the Python library setuptools to be installed. \"\n        \"Try runnning: python -m ensurepip\"\n    )\n\nif \"bdist_wheel\" in sys.argv:\n    try:\n        import wheel  # noqa: F401\n    except ImportError:\n        sys.exit(\n            \"We need both setuptools AND wheel packages installed \"\n            \"for bdist_wheel to work. Try running: pip install wheel\"\n        )\n\n\n# Make sure we have the right Python version.\nif sys.version_info[:2] < (3, 6):\n    sys.stderr.write(\n        \"Biopython requires Python 3.6 or later. \"\n        \"Python %d.%d detected.\\n\" % sys.version_info[:2]\n    )\n    sys.exit(1)\n\n\nclass test_biopython(Command):\n    \"\"\"Run all of the tests for the package.\n\n    This is a automatic test run class to make distutils kind of act like\n    perl. With this you can do:\n\n    python setup.py build\n    python setup.py install\n    python setup.py test\n\n    \"\"\"\n\n    description = \"Automatically run the test suite for Biopython.\"\n    user_options = [(\"offline\", None, \"Don't run online tests\")]\n\n    def initialize_options(self):\n        \"\"\"No-op, initialise options.\"\"\"\n        self.offline = None\n\n    def finalize_options(self):\n        \"\"\"No-op, finalise options.\"\"\"\n        pass\n\n    def run(self):\n        \"\"\"Run the tests.\"\"\"\n        this_dir = os.getcwd()\n\n        # change to the test dir and run the tests\n        os.chdir(\"Tests\")\n        sys.path.insert(0, \"\")\n        import run_tests\n\n        if self.offline:\n            run_tests.main([\"--offline\"])\n        else:\n            run_tests.main([])\n\n        # change back to the current directory\n        os.chdir(this_dir)\n\n\ndef can_import(module_name):\n    \"\"\"Check we can import the requested module.\"\"\"\n    try:\n        return __import__(module_name)\n    except ImportError:\n        return None\n\n\n# Using requirements.txt is preferred for an application\n# (and likely will pin specific version numbers), using\n# setup.py's install_requires is preferred for a library\n# (and should try not to be overly narrow with versions).\nREQUIRES = [\"numpy\"]\n\n# --- set up the packages we are going to install\n# standard biopython packages\nPACKAGES = [\n    \"Bio\",\n    \"Bio.Affy\",\n    \"Bio.Align\",\n    \"Bio.Align.Applications\",\n    \"Bio.Align.substitution_matrices\",\n    \"Bio.AlignIO\",\n    \"Bio.Alphabet\",\n    \"Bio.Application\",\n    \"Bio.Blast\",\n    \"Bio.CAPS\",\n    \"Bio.Cluster\",\n    \"Bio.codonalign\",\n    \"Bio.Compass\",\n    \"Bio.Crystal\",\n    \"Bio.Data\",\n    \"Bio.Emboss\",\n    \"Bio.Entrez\",\n    \"Bio.ExPASy\",\n    \"Bio.FSSP\",\n    \"Bio.GenBank\",\n    \"Bio.Geo\",\n    \"Bio.Graphics\",\n    \"Bio.Graphics.GenomeDiagram\",\n    \"Bio.HMM\",\n    \"Bio.KEGG\",\n    \"Bio.KEGG.Compound\",\n    \"Bio.KEGG.Enzyme\",\n    \"Bio.KEGG.Gene\",\n    \"Bio.KEGG.Map\",\n    \"Bio.PDB.mmtf\",\n    \"Bio.KEGG.KGML\",\n    \"Bio.Medline\",\n    \"Bio.motifs\",\n    \"Bio.motifs.applications\",\n    \"Bio.motifs.jaspar\",\n    \"Bio.Nexus\",\n    \"Bio.NMR\",\n    \"Bio.Pathway\",\n    \"Bio.Pathway.Rep\",\n    \"Bio.PDB\",\n    \"Bio.phenotype\",\n    \"Bio.PopGen\",\n    \"Bio.PopGen.GenePop\",\n    \"Bio.Restriction\",\n    \"Bio.SCOP\",\n    \"Bio.SearchIO\",\n    \"Bio.SearchIO._legacy\",\n    \"Bio.SearchIO._model\",\n    \"Bio.SearchIO.BlastIO\",\n    \"Bio.SearchIO.HHsuiteIO\",\n    \"Bio.SearchIO.HmmerIO\",\n    \"Bio.SearchIO.ExonerateIO\",\n    \"Bio.SearchIO.InterproscanIO\",\n    \"Bio.SeqIO\",\n    \"Bio.SeqUtils\",\n    \"Bio.Sequencing\",\n    \"Bio.Sequencing.Applications\",\n    \"Bio.Statistics\",\n    \"Bio.SubsMat\",\n    \"Bio.SVDSuperimposer\",\n    \"Bio.PDB.QCPSuperimposer\",\n    \"Bio.SwissProt\",\n    \"Bio.TogoWS\",\n    \"Bio.Phylo\",\n    \"Bio.Phylo.Applications\",\n    \"Bio.Phylo.PAML\",\n    \"Bio.UniGene\",\n    \"Bio.UniProt\",\n    \"Bio.Wise\",\n    # Other top level packages,\n    \"BioSQL\",\n]\n\nEXTENSIONS = [\n    Extension(\"Bio.Align._aligners\", [\"Bio/Align/_aligners.c\"]),\n    Extension(\"Bio.cpairwise2\", [\"Bio/cpairwise2module.c\"]),\n    Extension(\"Bio.Nexus.cnexus\", [\"Bio/Nexus/cnexus.c\"]),\n    Extension(\n        \"Bio.PDB.QCPSuperimposer.qcprotmodule\",\n        [\"Bio/PDB/QCPSuperimposer/qcprotmodule.c\"],\n    ),\n    Extension(\"Bio.motifs._pwm\", [\"Bio/motifs/_pwm.c\"]),\n    Extension(\n        \"Bio.Cluster._cluster\", [\"Bio/Cluster/cluster.c\", \"Bio/Cluster/clustermodule.c\"]\n    ),\n    Extension(\"Bio.PDB.kdtrees\", [\"Bio/PDB/kdtrees.c\"]),\n]\n\n# We now define the Biopython version number in Bio/__init__.py\n# Here we can't use \"import Bio\" then \"Bio.__version__\" as that would\n# tell us the version of Biopython already installed (if any).\n__version__ = \"Undefined\"\nfor line in open(\"Bio/__init__.py\"):\n    if line.startswith(\"__version__\"):\n        exec(line.strip())\n\n# We now load in our reStructuredText README.rst file to pass explicitly in the\n# metadata, since at time of writing PyPI did not do this for us.\n#\n# Must make encoding explicit to avoid any conflict with the local default.\n# Currently keeping README as ASCII (might switch to UTF8 later if needed).\n# If any invalid character does appear in README, this will fail and alert us.\nwith open(\"README.rst\", encoding=\"ascii\") as handle:\n    readme_rst = handle.read()\n\nsetup(\n    name=\"biopython\",\n    version=__version__,\n    author=\"The Biopython Contributors\",\n    author_email=\"biopython@biopython.org\",\n    url=\"https://biopython.org/\",\n    description=\"Freely available tools for computational molecular biology.\",\n    long_description=readme_rst,\n    project_urls={\n        \"Documentation\": \"https://biopython.org/wiki/Documentation\",\n        \"Source\": \"https://github.com/biopython/biopython/\",\n        \"Tracker\": \"https://github.com/biopython/biopython/issues\",\n    },\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Science/Research\",\n        \"License :: Freely Distributable\",\n        # Technically the \"Biopython License Agreement\" is not OSI approved,\n        # but is almost https://opensource.org/licenses/HPND so might put:\n        # 'License :: OSI Approved',\n        # To resolve this we are moving to dual-licensing with 3-clause BSD:\n        # 'License :: OSI Approved :: BSD License',\n        \"Operating System :: OS Independent\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Topic :: Scientific/Engineering\",\n        \"Topic :: Scientific/Engineering :: Bio-Informatics\",\n        \"Topic :: Software Development :: Libraries :: Python Modules\",\n    ],\n    cmdclass={\"test\": test_biopython},\n    packages=PACKAGES,\n    ext_modules=EXTENSIONS,\n    include_package_data=True,  # done via MANIFEST.in under setuptools\n    install_requires=REQUIRES,\n)\n", "path": "setup.py"}], "after_files": [{"content": "\"\"\"setuptools based setup script for Biopython.\n\nThis uses setuptools which is now the standard python mechanism for\ninstalling packages. If you have downloaded and uncompressed the\nBiopython source code, or fetched it from git, for the simplest\ninstallation just type the command::\n\n    python setup.py install\n\nHowever, you would normally install the latest Biopython release from\nthe PyPI archive with::\n\n    pip install biopython\n\nFor more in-depth instructions, see the installation section of the\nBiopython manual, linked to from:\n\nhttp://biopython.org/wiki/Documentation\n\nOr, if all else fails, feel free to write to the sign up to the Biopython\nmailing list and ask for help.  See:\n\nhttp://biopython.org/wiki/Mailing_lists\n\"\"\"\n\nimport sys\nimport os\n\ntry:\n    from setuptools import setup\n    from setuptools import Command\n    from setuptools import Extension\nexcept ImportError:\n    sys.exit(\n        \"We need the Python library setuptools to be installed. \"\n        \"Try runnning: python -m ensurepip\"\n    )\n\nif \"bdist_wheel\" in sys.argv:\n    try:\n        import wheel  # noqa: F401\n    except ImportError:\n        sys.exit(\n            \"We need both setuptools AND wheel packages installed \"\n            \"for bdist_wheel to work. Try running: pip install wheel\"\n        )\n\n\n# Make sure we have the right Python version.\nMIN_PY_VER = (3, 6)\nif sys.version_info[:2] < MIN_PY_VER:\n    sys.stderr.write(\n        (\"Biopython requires Python %i.%i or later. \" % MIN_PY_VER)\n        + (\"Python %d.%d detected.\\n\" % sys.version_info[:2])\n    )\n    sys.exit(1)\n\n\nclass test_biopython(Command):\n    \"\"\"Run all of the tests for the package.\n\n    This is a automatic test run class to make distutils kind of act like\n    perl. With this you can do:\n\n    python setup.py build\n    python setup.py install\n    python setup.py test\n\n    \"\"\"\n\n    description = \"Automatically run the test suite for Biopython.\"\n    user_options = [(\"offline\", None, \"Don't run online tests\")]\n\n    def initialize_options(self):\n        \"\"\"No-op, initialise options.\"\"\"\n        self.offline = None\n\n    def finalize_options(self):\n        \"\"\"No-op, finalise options.\"\"\"\n        pass\n\n    def run(self):\n        \"\"\"Run the tests.\"\"\"\n        this_dir = os.getcwd()\n\n        # change to the test dir and run the tests\n        os.chdir(\"Tests\")\n        sys.path.insert(0, \"\")\n        import run_tests\n\n        if self.offline:\n            run_tests.main([\"--offline\"])\n        else:\n            run_tests.main([])\n\n        # change back to the current directory\n        os.chdir(this_dir)\n\n\ndef can_import(module_name):\n    \"\"\"Check we can import the requested module.\"\"\"\n    try:\n        return __import__(module_name)\n    except ImportError:\n        return None\n\n\n# Using requirements.txt is preferred for an application\n# (and likely will pin specific version numbers), using\n# setup.py's install_requires is preferred for a library\n# (and should try not to be overly narrow with versions).\nREQUIRES = [\"numpy\"]\n\n# --- set up the packages we are going to install\n# standard biopython packages\nPACKAGES = [\n    \"Bio\",\n    \"Bio.Affy\",\n    \"Bio.Align\",\n    \"Bio.Align.Applications\",\n    \"Bio.Align.substitution_matrices\",\n    \"Bio.AlignIO\",\n    \"Bio.Alphabet\",\n    \"Bio.Application\",\n    \"Bio.Blast\",\n    \"Bio.CAPS\",\n    \"Bio.Cluster\",\n    \"Bio.codonalign\",\n    \"Bio.Compass\",\n    \"Bio.Crystal\",\n    \"Bio.Data\",\n    \"Bio.Emboss\",\n    \"Bio.Entrez\",\n    \"Bio.ExPASy\",\n    \"Bio.FSSP\",\n    \"Bio.GenBank\",\n    \"Bio.Geo\",\n    \"Bio.Graphics\",\n    \"Bio.Graphics.GenomeDiagram\",\n    \"Bio.HMM\",\n    \"Bio.KEGG\",\n    \"Bio.KEGG.Compound\",\n    \"Bio.KEGG.Enzyme\",\n    \"Bio.KEGG.Gene\",\n    \"Bio.KEGG.Map\",\n    \"Bio.PDB.mmtf\",\n    \"Bio.KEGG.KGML\",\n    \"Bio.Medline\",\n    \"Bio.motifs\",\n    \"Bio.motifs.applications\",\n    \"Bio.motifs.jaspar\",\n    \"Bio.Nexus\",\n    \"Bio.NMR\",\n    \"Bio.Pathway\",\n    \"Bio.Pathway.Rep\",\n    \"Bio.PDB\",\n    \"Bio.phenotype\",\n    \"Bio.PopGen\",\n    \"Bio.PopGen.GenePop\",\n    \"Bio.Restriction\",\n    \"Bio.SCOP\",\n    \"Bio.SearchIO\",\n    \"Bio.SearchIO._legacy\",\n    \"Bio.SearchIO._model\",\n    \"Bio.SearchIO.BlastIO\",\n    \"Bio.SearchIO.HHsuiteIO\",\n    \"Bio.SearchIO.HmmerIO\",\n    \"Bio.SearchIO.ExonerateIO\",\n    \"Bio.SearchIO.InterproscanIO\",\n    \"Bio.SeqIO\",\n    \"Bio.SeqUtils\",\n    \"Bio.Sequencing\",\n    \"Bio.Sequencing.Applications\",\n    \"Bio.Statistics\",\n    \"Bio.SubsMat\",\n    \"Bio.SVDSuperimposer\",\n    \"Bio.PDB.QCPSuperimposer\",\n    \"Bio.SwissProt\",\n    \"Bio.TogoWS\",\n    \"Bio.Phylo\",\n    \"Bio.Phylo.Applications\",\n    \"Bio.Phylo.PAML\",\n    \"Bio.UniGene\",\n    \"Bio.UniProt\",\n    \"Bio.Wise\",\n    # Other top level packages,\n    \"BioSQL\",\n]\n\nEXTENSIONS = [\n    Extension(\"Bio.Align._aligners\", [\"Bio/Align/_aligners.c\"]),\n    Extension(\"Bio.cpairwise2\", [\"Bio/cpairwise2module.c\"]),\n    Extension(\"Bio.Nexus.cnexus\", [\"Bio/Nexus/cnexus.c\"]),\n    Extension(\n        \"Bio.PDB.QCPSuperimposer.qcprotmodule\",\n        [\"Bio/PDB/QCPSuperimposer/qcprotmodule.c\"],\n    ),\n    Extension(\"Bio.motifs._pwm\", [\"Bio/motifs/_pwm.c\"]),\n    Extension(\n        \"Bio.Cluster._cluster\", [\"Bio/Cluster/cluster.c\", \"Bio/Cluster/clustermodule.c\"]\n    ),\n    Extension(\"Bio.PDB.kdtrees\", [\"Bio/PDB/kdtrees.c\"]),\n]\n\n# We now define the Biopython version number in Bio/__init__.py\n# Here we can't use \"import Bio\" then \"Bio.__version__\" as that would\n# tell us the version of Biopython already installed (if any).\n__version__ = \"Undefined\"\nfor line in open(\"Bio/__init__.py\"):\n    if line.startswith(\"__version__\"):\n        exec(line.strip())\n\n# We now load in our reStructuredText README.rst file to pass explicitly in the\n# metadata, since at time of writing PyPI did not do this for us.\n#\n# Must make encoding explicit to avoid any conflict with the local default.\n# Currently keeping README as ASCII (might switch to UTF8 later if needed).\n# If any invalid character does appear in README, this will fail and alert us.\nwith open(\"README.rst\", encoding=\"ascii\") as handle:\n    readme_rst = handle.read()\n\nsetup(\n    name=\"biopython\",\n    version=__version__,\n    author=\"The Biopython Contributors\",\n    author_email=\"biopython@biopython.org\",\n    url=\"https://biopython.org/\",\n    description=\"Freely available tools for computational molecular biology.\",\n    long_description=readme_rst,\n    project_urls={\n        \"Documentation\": \"https://biopython.org/wiki/Documentation\",\n        \"Source\": \"https://github.com/biopython/biopython/\",\n        \"Tracker\": \"https://github.com/biopython/biopython/issues\",\n    },\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Science/Research\",\n        \"License :: Freely Distributable\",\n        # Technically the \"Biopython License Agreement\" is not OSI approved,\n        # but is almost https://opensource.org/licenses/HPND so might put:\n        # 'License :: OSI Approved',\n        # To resolve this we are moving to dual-licensing with 3-clause BSD:\n        # 'License :: OSI Approved :: BSD License',\n        \"Operating System :: OS Independent\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Topic :: Scientific/Engineering\",\n        \"Topic :: Scientific/Engineering :: Bio-Informatics\",\n        \"Topic :: Software Development :: Libraries :: Python Modules\",\n    ],\n    cmdclass={\"test\": test_biopython},\n    packages=PACKAGES,\n    ext_modules=EXTENSIONS,\n    include_package_data=True,  # done via MANIFEST.in under setuptools\n    install_requires=REQUIRES,\n    python_requires=\">=%i.%i\" % MIN_PY_VER,\n)\n", "path": "setup.py"}]}