Blob Blame History Raw
From a43e5104a8b6df0610b2f1108a27d2bc2ef87f29 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 7 Mar 2016 14:26:54 -0500
Subject: [PATCH] Tell setup.py about the .so suffix too

After d2b857c3a4, python3 setup.py install would not install the
binary extension module because the filename is different.
---
 python/setup.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/python/setup.py b/python/setup.py
index 4088177fed..34b69f7132 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -31,6 +31,12 @@ __status__           = "Development"
 import os
 from distutils.core import setup
 
+try:
+    import importlib.machinery
+    suffix = importlib.machinery.EXTENSION_SUFFIXES[0]
+except Exception:
+    suffix = '.so'
+
 setup(
         name='moose',
         version='3.0.2',
@@ -47,5 +53,5 @@ setup(
             , 'rdesigneur' : 'rdesigneur'
             , 'genesis' : 'genesis'
             },
-        package_data = { 'moose' : ['_moose.so'] },
+        package_data = { 'moose' : ['_moose' + suffix] },
     )