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

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_python and Python3 requires boost_python36 (since
  7. boost 1.67).
  8. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. ---
  11. setup.py | 6 +++++-
  12. 1 file changed, 5 insertions(+), 1 deletion(-)
  13. diff --git a/setup.py b/setup.py
  14. index fdf5c27..4b38569 100644
  15. --- a/setup.py
  16. +++ b/setup.py
  17. @@ -3,6 +3,10 @@
  18. from setuptools import setup, find_packages, Extension
  19. import sys, os
  20. +boostlib = "boost_python36"
  21. +if sys.version_info < (3, 0):
  22. + boostlib = "boost_python"
  23. +
  24. setup(
  25. name = 'pylibconfig',
  26. description = "libconfig bindings for Python",
  27. @@ -19,7 +23,7 @@ setup(
  28. Extension(
  29. "pylibconfig",
  30. ["src/pylibconfig.cc"],
  31. - libraries=["boost_python", "config++"]
  32. + libraries=[boostlib, "config++"]
  33. #include_dirs=includes,
  34. #extra_link_args=lflags
  35. )
  36. --
  37. 2.11.0