Package: soya / 0.15~rc1-10

pyrex-compilation-fix Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Recent version of pyrex get module name from directory
name. Unfortunately, soya is compiled outside of any directory and
therefore the name of the directory is soya-VERSION. This patch
reverts previous behaviour of Pyrex. Thanks to Jakub Wilk.

Index: soya-0.15~rc1-1/setup.py
===================================================================
--- soya-0.15~rc1-1.orig/setup.py	2010-01-19 22:56:07.000000000 +0100
+++ soya-0.15~rc1-1/setup.py	2010-01-19 22:56:15.000000000 +0100
@@ -82,6 +82,13 @@
 
 MACOSX_DEPLOYMENT_TARGET  = os.getenv('MACOSX_DEPLOYMENT_TARGET')
 try:
+	from Pyrex.Compiler.Main import Context
+	def extract_module_name(self, path):
+		dir, filename = os.path.split(path)
+		module_name, _ = os.path.splitext(filename)
+		return module_name
+	Context.extract_module_name = extract_module_name
+	del Context
 	from Pyrex.Distutils import build_ext
 	USE_PYREX = 1
 except ImportError: