[SCM] Packaging for pytango branch, master, updated. ce571221d6744bc557714a4a0ebd5dae057459c1

Frédéric-Emmanuel PICCA picca at synchrotron-soleil.fr
Mon Aug 9 09:21:55 UTC 2010


The following commit has been merged in the master branch:
commit ce571221d6744bc557714a4a0ebd5dae057459c1
Author: Frédéric-Emmanuel PICCA <picca at synchrotron-soleil.fr>
Date:   Mon Aug 9 10:51:27 2010 +0200

    * fiw to build with python2.5 and 2.6

diff --git a/setup.py b/setup.py
index e3e6bdf..e4b0bb8 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-import os, sys
+import os, sys, platform
 
 from distutils.core import setup, Extension
 from distutils.dist import Distribution
@@ -159,7 +159,6 @@ else:
     
     include_dirs += [ os.path.join(BOOST_ROOT, 'include') ]
     libraries += [
-        'boost_python',
         'pthread',
         'rt',
         'dl',
@@ -168,6 +167,15 @@ else:
         'omnithread',
         'COS4',
     ]
+    # when building with multiple version of python on debian we need
+    # to link against boost_python-py25/-py26 etc...
+    if platform.dist()[0] in ['debian']:
+        if distutils.sysconfig.get_python_version() == '2.5':
+            libraries += ['boost_python-py25']
+        elif distutils.sysconfig.get_python_version() == '2.6':
+            libraries += ['boost_python-py26']
+    else:
+        libraries += ['boost_python']
 
     # Note for PyTango developers:
     # Compilation time can be greatly reduced by compiling the file

-- 
Packaging for pytango



More information about the debian-science-commits mailing list