openbsd-ports/biology/py-biopython/patches/patch-setup_py
2008-01-12 02:00:24 +00:00

31 lines
1.2 KiB
Plaintext

$OpenBSD: patch-setup_py,v 1.5 2008/01/12 02:00:24 okan Exp $
--- setup.py.orig Sat Oct 27 02:11:01 2007
+++ setup.py Fri Dec 21 16:56:57 2007
@@ -65,6 +65,14 @@ def check_dependencies_once():
return _CHECKED
def check_dependencies():
+ NUMPY_PACKAGES.append("Bio.KDTree")
+ NUMPY_EXTENSIONS.append(
+ CplusplusExtension('Bio.KDTree._CKDTree',
+ ["Bio/KDTree/KDTree.cpp",
+ "Bio/KDTree/KDTree.swig.cpp"],
+ libraries=["stdc++"],
+ language="c++"))
+ return 1
"""Return whether the installation should continue."""
# There should be some way for the user to tell specify not to
# check dependencies. For example, it probably should not if
@@ -285,7 +293,10 @@ def is_Martel_installed():
bundled_martel_version = m.__version__
else:
bundled_martel_version = None
- del sys.modules["Martel"] # Delete the old version of Martel.
+ try:
+ del sys.modules["Martel"] # Delete the old version of Martel.
+ except:
+ pass
# Now try and import a Martel that's not bundled with Biopython.
# To do that, I need to delete all the references to the current