149 lines
5.6 KiB
Diff
149 lines
5.6 KiB
Diff
--- boost_1_77_0/tools/build/src/tools/python.jam.orig 2021-09-09 17:58:15.722392400 +0300
|
|
+++ boost_1_77_0/tools/build/src/tools/python.jam 2021-09-10 10:22:53.310231600 +0300
|
|
@@ -514,50 +514,9 @@ local rule compute-default-paths ( targe
|
|
{
|
|
exec-prefix ?= $(prefix) ;
|
|
|
|
- if $(target-os) = windows
|
|
- {
|
|
- # The exec_prefix is where you're supposed to look for machine-specific
|
|
- # libraries.
|
|
- local default-library-path = $(exec-prefix)\\libs ;
|
|
- local default-include-path = $(:E=Include:R=$(prefix)) ;
|
|
-
|
|
- # If the interpreter was found in a directory called "PCBuild" or
|
|
- # "PCBuild8," assume we're looking at a Python built from the source
|
|
- # distro, and go up one additional level to the default root. Otherwise,
|
|
- # the default root is the directory where the interpreter was found.
|
|
-
|
|
- # We ask Python itself what the executable path is in case of
|
|
- # intermediate symlinks or shell scripts.
|
|
- local executable-dir = $(sys.executable:D) ;
|
|
-
|
|
- if [ MATCH ^(PCBuild) : $(executable-dir:D=) ]
|
|
- {
|
|
- debug-message "This Python appears to reside in a source distribution;" ;
|
|
- debug-message "prepending \""$(executable-dir)"\" to default library search path" ;
|
|
-
|
|
- default-library-path = $(executable-dir) $(default-library-path) ;
|
|
-
|
|
- default-include-path = $(:E=PC:R=$(executable-dir:D)) $(default-include-path) ;
|
|
-
|
|
- debug-message "and \""$(default-include-path[1])"\" to default #include path" ;
|
|
- }
|
|
-
|
|
- libraries ?= $(default-library-path) ;
|
|
- includes ?= $(default-include-path) ;
|
|
- }
|
|
- else
|
|
- {
|
|
- local default-include-path = $(prefix)/include/python$(version) ;
|
|
- if ! [ path.exists $(default-include-path) ] && [ path.exists $(default-include-path)m ]
|
|
- {
|
|
- default-include-path = $(default-include-path)m ;
|
|
- }
|
|
-
|
|
- includes ?= $(default-include-path) ;
|
|
-
|
|
- local lib = $(exec-prefix)/lib ;
|
|
- libraries ?= $(lib)/python$(version)/config $(lib) ;
|
|
- }
|
|
+ libraries ?= $(lib)/python$(version)/config $(lib) ;
|
|
+ includes ?= $(prefix)/include/python$(version) ;
|
|
+ local lib = $(exec-prefix)/lib ;
|
|
}
|
|
|
|
# The version of the python interpreter to use.
|
|
@@ -579,32 +538,15 @@ variant debug-python : debug : <python-d
|
|
local rule candidate-interpreters ( version ? : prefix ? : target-os )
|
|
{
|
|
local bin-path = bin ;
|
|
- if $(target-os) = windows
|
|
- {
|
|
- # On Windows, look in the root directory itself and, to work with the
|
|
- # result of a build-from-source, the PCBuild directory.
|
|
- bin-path = PCBuild8 PCBuild "" ;
|
|
- }
|
|
|
|
bin-path = $(bin-path:R=$(prefix)) ;
|
|
|
|
- if $(target-os) in windows darwin
|
|
- {
|
|
- return # Search:
|
|
- $(:E=python:R=$(bin-path)) # Relative to the prefix, if any
|
|
- python # In the PATH
|
|
- [ $(target-os)-installed-pythons $(version) ] # Standard install locations
|
|
- ;
|
|
- }
|
|
- else
|
|
- {
|
|
- # Search relative to the prefix, or if none supplied, in PATH.
|
|
- local unversioned = $(:E=python:R=$(bin-path:E=)) ;
|
|
+ # Search relative to the prefix, or if none supplied, in PATH.
|
|
+ local unversioned = $(:E=python:R=$(bin-path:E=)) ;
|
|
|
|
- # If a version was specified, look for a python with that specific
|
|
- # version appended before looking for one called, simply, "python"
|
|
- return $(unversioned)$(version) $(unversioned) ;
|
|
- }
|
|
+ # If a version was specified, look for a python with that specific
|
|
+ # version appended before looking for one called, simply, "python"
|
|
+ return $(unversioned)$(version) $(unversioned) ;
|
|
}
|
|
|
|
|
|
@@ -682,15 +624,6 @@ local rule declare-libpython-target ( ve
|
|
# Compute the representation of Python version in the name of Python's
|
|
# library file.
|
|
local lib-version = $(version) ;
|
|
- if <target-os>windows in $(requirements)
|
|
- {
|
|
- local major-minor = [ split-version $(version) ] ;
|
|
- lib-version = $(major-minor:J="") ;
|
|
- if <python-debugging>on in $(requirements)
|
|
- {
|
|
- lib-version = $(lib-version)_d ;
|
|
- }
|
|
- }
|
|
|
|
if ! $(lib-version)
|
|
{
|
|
@@ -718,10 +651,6 @@ local rule configure ( version ? : cmd-o
|
|
target-os ?= [ feature.defaults target-os ] ;
|
|
target-os = $(target-os:G=) ;
|
|
|
|
- if $(target-os) = windows && <python-debugging>on in $(condition)
|
|
- {
|
|
- extension-suffix ?= _d ;
|
|
- }
|
|
extension-suffix ?= "" ;
|
|
abi-letters ?= "" ;
|
|
|
|
@@ -738,13 +667,7 @@ local rule configure ( version ? : cmd-o
|
|
# Work with the command the user gave us.
|
|
cmds-to-try = $(cmd-or-prefix) ;
|
|
|
|
- # On Windows, do not nail down the interpreter command just yet in case
|
|
- # the user specified something that turns out to be a cygwin symlink,
|
|
- # which could bring down bjam if we invoke it.
|
|
- if $(target-os) != windows
|
|
- {
|
|
- interpreter-cmd = $(cmd-or-prefix) ;
|
|
- }
|
|
+ interpreter-cmd = $(cmd-or-prefix) ;
|
|
}
|
|
|
|
# Values to use in case we can not really find anything in the system.
|
|
@@ -994,11 +917,6 @@ local rule configure ( version ? : cmd-o
|
|
# environment variable set up, and the user may want to use it for
|
|
# something else (e.g. launch the debugger).
|
|
local set-PYTHONPATH ;
|
|
- if $(target-os) = windows
|
|
- {
|
|
- set-PYTHONPATH = [ common.prepend-path-variable-command PYTHONPATH :
|
|
- $(libraries:D)/Lib ] ;
|
|
- }
|
|
|
|
alias python
|
|
:
|