Created
February 27, 2013 12:52
-
-
Save NichtJens/5047698 to your computer and use it in GitHub Desktop.
Adds compilation via distutils to "https://github.com/kiij/CoilSnake/blob/master/modules/eb/EbModule.py".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/modules/eb/EbModule.py b/modules/eb/EbModule.py | |
index fd99ecb..8759639 100644 | |
--- a/modules/eb/EbModule.py | |
+++ b/modules/eb/EbModule.py | |
@@ -7,7 +7,21 @@ try: | |
from modules.eb import NativeComp | |
hasNativeComp = True | |
except ImportError: | |
- hasNativeComp = False | |
+ try: | |
+ import os | |
+ old_dir = os.getcwd() | |
+ os.chdir("modules/eb") | |
+ | |
+ from distutils.core import run_setup | |
+ options = "build_ext --inplace clean" | |
+ run_setup('build_NativeComp.py', options.split()) | |
+ | |
+ os.chdir(old_dir) | |
+ | |
+ from modules.eb import NativeComp | |
+ hasNativeComp = True | |
+ except: | |
+ hasNativeComp = False | |
if not hasNativeComp: | |
print "WARNING: Could not load native EarthBound compression library" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment