This patch is necessary for building Ceph as 64bit using Python 2.7.
Ceph has to use /usr/bin/$(MACH64)/python2.7 because it's tied to
OpenStack which hasn't moved to 3.x yet.
This patch will be submitted upstream.
--- Cython-0.25.1.orig/Cython/Compiler/Code.py 2016-10-26 22:20:58.000000000 +0000
+++ Cython-0.25.1/Cython/Compiler/Code.py 2016-11-09 07:34:56.781447399 +0000
@@ -81,7 +81,14 @@ is_self_assignment = re.compile(r" *(\w+
def get_utility_dir():
# make this a function and not global variables:
# http://trac.cython.org/cython_trac/ticket/475
- Cython_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+
+ # When building 64-bit in Solaris, we need to back up two directories
+ # instead of one as the 64-bit shared object is being placed in a
+ # subdirectory named '64'.
+ parent_dir = os.path.dirname(os.path.abspath(__file__))
+ if os.path.basename(parent_dir) == '64':
+ parent_dir = os.path.dirname(parent_dir)
+ Cython_dir = os.path.dirname(parent_dir)
return os.path.join(Cython_dir, "Utility")