2
1

0001-Determine-boost_python-name-depending-on-current-Pyt.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From 3bc4b9c0d60a735b1d63e52f74492ace39f02824 Mon Sep 17 00:00:00 2001
  2. From: Yegor Yefremov <yegorslists@googlemail.com>
  3. Date: Thu, 27 Jul 2017 09:46:07 +0200
  4. Subject: [PATCH] Determine boost_python name depending on current Python
  5. version
  6. Python2 requires boost_python27 and Python3 requires boost_python37
  7. (since boost 1.67).
  8. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. [Bernd: adapted for python-3.7]
  11. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  12. ---
  13. setup.py | 6 +++++-
  14. 1 file changed, 5 insertions(+), 1 deletion(-)
  15. diff --git a/setup.py b/setup.py
  16. index fdf5c27..4b38569 100644
  17. --- a/setup.py
  18. +++ b/setup.py
  19. @@ -3,6 +3,10 @@
  20. from setuptools import setup, find_packages, Extension
  21. import sys, os
  22. +boostlib = "boost_python37"
  23. +if sys.version_info < (3, 0):
  24. + boostlib = "boost_python27"
  25. +
  26. setup(
  27. name = 'pylibconfig',
  28. description = "libconfig bindings for Python",
  29. @@ -19,7 +23,7 @@ setup(
  30. Extension(
  31. "pylibconfig",
  32. ["src/pylibconfig.cc"],
  33. - libraries=["boost_python", "config++"]
  34. + libraries=[boostlib, "config++"]
  35. #include_dirs=includes,
  36. #extra_link_args=lflags
  37. )
  38. --
  39. 2.11.0