Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
81bc9535
Commit
81bc9535
authored
Jan 25, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Merge heads
parents
a5601ddd
32c18c98
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
13 deletions
+19
-13
Lib/distutils/sysconfig.py
Lib/distutils/sysconfig.py
+8
-5
Misc/NEWS
Misc/NEWS
+3
-0
configure
configure
+4
-4
configure.ac
configure.ac
+4
-4
No files found.
Lib/distutils/sysconfig.py
View file @
81bc9535
...
...
@@ -24,7 +24,11 @@ BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
# Path to the base directory of the project. On Windows the binary may
# live in project/PCBuild9. If we're dealing with an x64 Windows build,
# it'll live in project/PCbuild/amd64.
project_base
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
sys
.
executable
))
# set for cross builds
if
"_PYTHON_PROJECT_BASE"
in
os
.
environ
:
project_base
=
os
.
path
.
abspath
(
os
.
environ
[
"_PYTHON_PROJECT_BASE"
])
else
:
project_base
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
sys
.
executable
))
if
os
.
name
==
"nt"
and
"pcbuild"
in
project_base
[
-
8
:].
lower
():
project_base
=
os
.
path
.
abspath
(
os
.
path
.
join
(
project_base
,
os
.
path
.
pardir
))
# PC/VS7.1
...
...
@@ -98,7 +102,7 @@ def get_python_inc(plat_specific=0, prefix=None):
# the build directory may not be the source directory, we
# must use "srcdir" from the makefile to find the "Include"
# directory.
base
=
_sys_home
or
os
.
path
.
dirname
(
os
.
path
.
abspath
(
sys
.
executable
))
base
=
_sys_home
or
project_base
if
plat_specific
:
return
base
if
_sys_home
:
...
...
@@ -251,8 +255,7 @@ def get_config_h_filename():
def
get_makefile_filename
():
"""Return full pathname of installed Makefile from the Python build."""
if
python_build
:
return
os
.
path
.
join
(
_sys_home
or
os
.
path
.
dirname
(
sys
.
executable
),
"Makefile"
)
return
os
.
path
.
join
(
_sys_home
or
project_base
,
"Makefile"
)
lib_dir
=
get_python_lib
(
plat_specific
=
0
,
standard_lib
=
1
)
config_file
=
'config-{}{}'
.
format
(
get_python_version
(),
build_flags
)
return
os
.
path
.
join
(
lib_dir
,
config_file
,
'Makefile'
)
...
...
@@ -555,7 +558,7 @@ def get_config_vars(*args):
# testing, for example, we might be running a non-installed python
# from a different directory.
if python_build and os.name == "
posix
":
base =
os.path.dirname(os.path.abspath(sys.executable))
base =
project_base
if (not os.path.isabs(_config_vars['srcdir']) and
base != os.getcwd()):
# srcdir is relative and we are not in the same directory
...
...
Misc/NEWS
View file @
81bc9535
...
...
@@ -536,6 +536,9 @@ Tests
Build
-----
- Issue #15484: Fix _PYTHON_PROJECT_BASE for srcdir != builddir builds;
use _PYTHON_PROJECT_BASE in distutils/sysconfig.py.
- Issue #17029: Let h2py search the multiarch system include directory.
- Issue #16953: Fix socket module compilation on platforms with
...
...
configure
View file @
81bc9535
...
...
@@ -2942,7 +2942,7 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$interp
"
>
&5
$as_echo
"
$interp
"
>
&6
;
}
PYTHON_FOR_BUILD
=
"_PYTHON_PROJECT_BASE=
$srcdir
"
' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=
$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '
$interp
PYTHON_FOR_BUILD
=
'_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)
$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '
$interp
fi
elif
test
"
$cross_compiling
"
=
maybe
;
then
as_fn_error
$?
"Cross compiling required --host=HOST-TUPLE and --build=ARCH"
"
$LINENO
"
5
...
...
@@ -3249,9 +3249,9 @@ if test -z "$MACHDEP"
then
# avoid using uname for cross builds
if
test
"
$cross_compiling
"
=
yes
;
then
# ac_sys_system and ac_sys_release are
only
used for setting
#
`define_xopen_source' in the case statement below. For the
#
current supported cross builds, this macro is not adjusted
.
# ac_sys_system and ac_sys_release are used for setting
#
a lot of different things including 'define_xopen_source'
#
in the case statement below
.
case
"
$host
"
in
*
-
*
-linux
*
)
ac_sys_system
=
Linux
...
...
configure.ac
View file @
81bc9535
...
...
@@ -65,7 +65,7 @@ if test "$cross_compiling" = yes; then
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
fi
AC_MSG_RESULT($interp)
PYTHON_FOR_BUILD=
"_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=
$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
PYTHON_FOR_BUILD=
'_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)
$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
fi
elif test "$cross_compiling" = maybe; then
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
...
...
@@ -352,9 +352,9 @@ if test -z "$MACHDEP"
then
# avoid using uname for cross builds
if test "$cross_compiling" = yes; then
# ac_sys_system and ac_sys_release are
only
used for setting
#
`define_xopen_source' in the case statement below. For the
#
current supported cross builds, this macro is not adjusted
.
# ac_sys_system and ac_sys_release are used for setting
#
a lot of different things including 'define_xopen_source'
#
in the case statement below
.
case "$host" in
*-*-linux*)
ac_sys_system=Linux
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment