Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove setuptools code (see mailing list)

The idea of using setuptools was to handle dependencies
automatically, particularly numpy. However, pip didn't
finish installing NumPy before Biopython. Using setuptools
had downsides too so we (Peter, Michiel and Brad) agreed
to remove it - see:

http://lists.open-bio.org/pipermail/biopython-dev/2013-July/010726.html
http://lists.open-bio.org/pipermail/biopython-dev/2013-July/010729.html
http://lists.open-bio.org/pipermail/biopython-dev/2013-July/010731.html
http://lists.open-bio.org/pipermail/biopython-dev/2013-July/010734.html
http://lists.open-bio.org/pipermail/biopython-dev/2013-July/010733.html
  • Loading branch information...
commit f8e51906709d0c85be9f2b921eb3f68eed5524f9 1 parent db87627
@peterjc peterjc authored
Showing with 11 additions and 40 deletions.
  1. +11 −40 setup.py
View
51 setup.py
@@ -25,6 +25,15 @@
import os
import shutil
+from distutils.core import setup
+from distutils.core import Command
+from distutils.command.install import install
+from distutils.command.build_py import build_py
+from distutils.command.build_ext import build_ext
+from distutils.extension import Extension
+
+_CHECKED = None
+
def is_pypy():
import platform
@@ -63,6 +72,7 @@ def get_yes_or_no(question, default):
print ("Please answer y or n.")
return response[0] == 'y'
+
# Make sure we have the right Python version.
if sys.version_info[:2] < (2, 5):
print("Biopython requires Python 2.5 or better (but not Python 3 "
@@ -104,25 +114,6 @@ def get_yes_or_no(question, default):
if sys.argv[idx + 1] == 'pip-egg-info':
sys.argv[idx + 1] = os.path.join(local_path, 'pip-egg-info')
-# use setuptools, falling back on core modules if not found
-try:
- from setuptools import setup, Command
- from setuptools.command.install import install
- from setuptools.command.build_py import build_py
- from setuptools.command.build_ext import build_ext
- from setuptools.extension import Extension
- _SETUPTOOLS = True
-except ImportError:
- from distutils.core import setup
- from distutils.core import Command
- from distutils.command.install import install
- from distutils.command.build_py import build_py
- from distutils.command.build_ext import build_ext
- from distutils.extension import Extension
- _SETUPTOOLS = False
-
-_CHECKED = None
-
def check_dependencies_once():
# Call check_dependencies, but cache the result for subsequent
@@ -132,6 +123,7 @@ def check_dependencies_once():
_CHECKED = check_dependencies()
return _CHECKED
+
def is_automated():
"""Check for installation with easy_install or pip.
"""
@@ -156,24 +148,6 @@ def is_automated():
is_automated = True
return is_automated
-def get_install_requires():
- install_requires = []
- # skip this with distutils (otherwise get a warning)
- if not _SETUPTOOLS:
- return []
- # skip this with jython and pypy and ironpython
- if os.name == "java" or is_pypy() or is_ironpython():
- return []
- # check for easy_install and pip
- if is_automated():
- global _CHECKED
- if _CHECKED is None:
- _CHECKED = True
- # pip dependency resolution does not fully install numpy
- # before compiling Biopython so Biopython setup fails.
- # Instead, we expect user to explicitly require numpy if needed.
- #install_requires.append("numpy >= 1.5.1")
- return install_requires
def check_dependencies():
"""Return whether the installation should continue."""
@@ -485,9 +459,6 @@ def is_Numpy_installed():
},
}
-if _SETUPTOOLS:
- setup_args["install_requires"] = get_install_requires()
-
try:
setup(**setup_args)
finally:
Please sign in to comment.
Something went wrong with that request. Please try again.