]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/python-libconfig/0001-Determine-boost_python-name-depending-on-current-Pyt.patch
lrzsz: install symlinks for XMODEM and YMODEM
[coffee/buildroot.git] / package / python-libconfig / 0001-Determine-boost_python-name-depending-on-current-Pyt.patch
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
7 Python2 requires boost_python and Python3 requires boost_python3.
8
9 Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
10 ---
11  setup.py | 6 +++++-
12  1 file changed, 5 insertions(+), 1 deletion(-)
13
14 diff --git a/setup.py b/setup.py
15 index fdf5c27..4b38569 100644
16 --- a/setup.py
17 +++ b/setup.py
18 @@ -3,6 +3,10 @@
19  from setuptools import setup, find_packages, Extension
20  import sys, os
21  
22 +boostlib = "boost_python3"
23 +if sys.version_info < (3, 0):
24 +    boostlib = "boost_python"
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
40