Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

workaround for bug in distutils that prevents one from compiling both…

… C and C++ shared objects in the same setup file normally
  • Loading branch information...
commit a151e5c61948ec1a64d183225185235887b42f20 1 parent cabdb84
grouse authored
Showing with 15 additions and 2 deletions.
  1. +15 −2 setup.py
View
17 setup.py
@@ -154,6 +154,19 @@ def run(self):
)
build_ext.run(self)
+ def build_extensions(self):
+ self._original_compiler_so = self.compiler.compiler_so
+
+ build_ext.build_extensions(self)
+
+ def build_extension(self, ext):
+ if ext.language == "c++":
+ self.compiler.compiler_so = self.compiler.compiler_cxx
+ else:
+ self.compiler.compiler_so = self._original_compiler_so
+
+ build_ext.build_extension(self, ext)
+
class test_biopython(Command):
"""Run all of the tests for the package.
@@ -373,8 +386,8 @@ def is_reportlab_installed():
libraries=["fl"]
),
Extension('Bio.KDTree._CKDTree',
- ["Bio/KDTree/KDTree.C",
- "Bio/KDTree/KDTree.swig.C"],
+ ["Bio/KDTree/KDTree.cxx",
+ "Bio/KDTree/KDTree.swig.cxx"],
libraries=["stdc++"],
language="c++"
),
Please sign in to comment.
Something went wrong with that request. Please try again.