Skip to content

Commit

Permalink
boost: Fix build multiple python modules. Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexpux committed Sep 6, 2017
1 parent 75abafe commit c2bf6a0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
4 changes: 1 addition & 3 deletions mingw-w64-boost/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,7 @@ package() {
-sZLIB_BINARY=z \
-sZLIB_INCLUDE=${MINGW_PREFIX}/include \
-sZLIB_LIBPATH=${MINGW_PREFIX}/lib \
address-model=${_model} \
--layout=tagged install \
--without-mpi
install

mkdir -p ${pkgdir}${MINGW_PREFIX}/bin
mv ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin
Expand Down
38 changes: 38 additions & 0 deletions mingw-w64-boost/boost-1.64-default-python.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 78ffbe094400d277627b2c19ceb182d637b8baca Mon Sep 17 00:00:00 2001
From: Rene Rivera <[email protected]>
Date: Sat, 16 Jul 2016 15:53:30 -0500
Subject: [PATCH] Fix not having a default python interpreter version on
targets.

This change adds a toolset requirement that sets the python version
feature of the first configured python for a given target OS (usually
the host OS). This allows to correctly configure different python
interpreters for different target OSes.
---
a/tools/build/src/tools/python.jam | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/tools/build/src/tools/python.jam b/tools/build/src/tools/python.jam
index 6404d8ad37..6ee32167fc 100644
--- a/tools/build/src/tools/python.jam
+++ b/tools/build/src/tools/python.jam
@@ -900,6 +900,19 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
toolset.add-requirements
$(target-requirements:J=,):<python.interpreter>$(interpreter-cmd) ;

+ # We also set a default requirement that assigns the first python configured
+ # for a particular target OS as the default. This makes it so that we can
+ # select a python interpreter with only knowledge of the target OS. And hence
+ # can configure different Pythons based on the target OS only.
+ local toolset-requirements = [ toolset.requirements ] ;
+ local toolset-target-os-requirements
+ = [ property.evaluate-conditionals-in-context
+ [ $(toolset-requirements).raw ] : <target-os>$(target-os) ] ;
+ if ! <python> in $(toolset-target-os-requirements:G)
+ {
+ toolset.add-requirements <target-os>$(target-os):<python>$(version:E=default) ;
+ }
+
# Register the right suffix for extensions.
register-extension-suffix $(extension-suffix) : $(target-requirements) ;

0 comments on commit c2bf6a0

Please sign in to comment.