2017-07-27 10:45:15 +02:00
|
|
|
From 3bc4b9c0d60a735b1d63e52f74492ace39f02824 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Yegor Yefremov <yegorslists@googlemail.com>
|
|
|
|
Date: Thu, 27 Jul 2017 09:46:07 +0200
|
|
|
|
Subject: [PATCH] Determine boost_python name depending on current Python
|
|
|
|
version
|
|
|
|
|
2018-06-26 20:39:45 +02:00
|
|
|
Python2 requires boost_python27 and Python3 requires boost_python36
|
|
|
|
(since boost 1.67).
|
2017-07-27 10:45:15 +02:00
|
|
|
|
|
|
|
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
|
2018-06-24 19:50:45 +02:00
|
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
2017-07-27 10:45:15 +02:00
|
|
|
---
|
|
|
|
setup.py | 6 +++++-
|
|
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/setup.py b/setup.py
|
|
|
|
index fdf5c27..4b38569 100644
|
|
|
|
--- a/setup.py
|
|
|
|
+++ b/setup.py
|
|
|
|
@@ -3,6 +3,10 @@
|
|
|
|
from setuptools import setup, find_packages, Extension
|
|
|
|
import sys, os
|
|
|
|
|
2018-06-24 19:50:45 +02:00
|
|
|
+boostlib = "boost_python36"
|
2017-07-27 10:45:15 +02:00
|
|
|
+if sys.version_info < (3, 0):
|
2018-06-26 20:39:45 +02:00
|
|
|
+ boostlib = "boost_python27"
|
2017-07-27 10:45:15 +02:00
|
|
|
+
|
|
|
|
setup(
|
|
|
|
name = 'pylibconfig',
|
|
|
|
description = "libconfig bindings for Python",
|
|
|
|
@@ -19,7 +23,7 @@ setup(
|
|
|
|
Extension(
|
|
|
|
"pylibconfig",
|
|
|
|
["src/pylibconfig.cc"],
|
|
|
|
- libraries=["boost_python", "config++"]
|
|
|
|
+ libraries=[boostlib, "config++"]
|
|
|
|
#include_dirs=includes,
|
|
|
|
#extra_link_args=lflags
|
|
|
|
)
|
|
|
|
--
|
|
|
|
2.11.0
|
|
|
|
|