forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathusing-mingw-w64-python.patch
142 lines (127 loc) · 5.16 KB
/
using-mingw-w64-python.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
--- boost_1_56_0/tools/build/src/tools/python.jam.orig 2014-01-29 22:13:34.032800000 +0400
+++ boost_1_56_0/tools/build/src/tools/python.jam 2014-01-29 22:24:39.674600000 +0400
@@ -506,44 +506,11 @@
{
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" ;
- }
+ includes ?= $(prefix)/include/python$(version) ;
- libraries ?= $(default-library-path) ;
- includes ?= $(default-include-path) ;
- }
- else
- {
- includes ?= $(prefix)/include/python$(version) ;
+ local lib = $(exec-prefix)/lib ;
+ libraries ?= $(lib)/python$(version)/config $(lib) ;
- local lib = $(exec-prefix)/lib ;
- libraries ?= $(lib)/python$(version)/config $(lib) ;
- }
}
# The version of the python interpreter to use.
@@ -565,32 +532,15 @@
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) ;
}
@@ -658,15 +608,6 @@
# 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)
{
@@ -694,10 +635,6 @@
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 ?= "" ;
# Normalize and dissect any version number.
@@ -721,13 +658,7 @@
# 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.
@@ -936,11 +867,6 @@
# 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
: