mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 11:22:48 +08:00
[python3] Fix distutils path (#30822)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
70992f6491
commit
0a3bc3d255
@ -1,5 +1,14 @@
|
|||||||
|
From 08599a02debaa2ea015d1221dd2c8ca0481640a3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Billy Robert O'Neal III <bion@microsoft.com>
|
||||||
|
Date: Wed, 26 Apr 2023 05:17:09 +0000
|
||||||
|
Subject: [PATCH 12/14] force disable curses
|
||||||
|
|
||||||
|
---
|
||||||
|
Modules/Setup | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
diff --git a/Modules/Setup b/Modules/Setup
|
diff --git a/Modules/Setup b/Modules/Setup
|
||||||
index 87c6a15..7ad53f5 100644
|
index 87c6a152f8..7ad53f5b4f 100644
|
||||||
--- a/Modules/Setup
|
--- a/Modules/Setup
|
||||||
+++ b/Modules/Setup
|
+++ b/Modules/Setup
|
||||||
@@ -375,3 +375,7 @@ xxsubtype xxsubtype.c
|
@@ -375,3 +375,7 @@ xxsubtype xxsubtype.c
|
||||||
@ -10,3 +19,6 @@ index 87c6a15..7ad53f5 100644
|
|||||||
+*disabled*
|
+*disabled*
|
||||||
+_curses
|
+_curses
|
||||||
+_curses_panel
|
+_curses_panel
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
|
From f2c5695f17ec59f4badd374daabccf362bbd5f24 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Billy Robert O'Neal III <bion@microsoft.com>
|
||||||
|
Date: Wed, 26 Apr 2023 05:17:22 +0000
|
||||||
|
Subject: [PATCH 13/14] configure no libcrypt
|
||||||
|
|
||||||
|
---
|
||||||
|
configure | 3 +++
|
||||||
|
configure.ac | 3 +++
|
||||||
|
2 files changed, 6 insertions(+)
|
||||||
|
|
||||||
diff --git a/configure b/configure
|
diff --git a/configure b/configure
|
||||||
index 15c7c54b0953..70f28b0c7064 100755
|
index bad619963a..c443360280 100755
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -13227,6 +13227,8 @@ done
|
@@ -13239,6 +13239,8 @@ done
|
||||||
|
|
||||||
# We search for both crypt and crypt_r as one or the other may be defined
|
# We search for both crypt and crypt_r as one or the other may be defined
|
||||||
# This gets us our -lcrypt in LIBS when required on the target platform.
|
# This gets us our -lcrypt in LIBS when required on the target platform.
|
||||||
@ -11,7 +21,7 @@ index 15c7c54b0953..70f28b0c7064 100755
|
|||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
|
||||||
$as_echo_n "checking for library containing crypt... " >&6; }
|
$as_echo_n "checking for library containing crypt... " >&6; }
|
||||||
if ${ac_cv_search_crypt+:} false; then :
|
if ${ac_cv_search_crypt+:} false; then :
|
||||||
@@ -13368,6 +13370,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
@@ -13380,6 +13382,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -20,10 +30,10 @@ index 15c7c54b0953..70f28b0c7064 100755
|
|||||||
for ac_func in clock_gettime
|
for ac_func in clock_gettime
|
||||||
do :
|
do :
|
||||||
diff --git a/configure.ac b/configure.ac
|
diff --git a/configure.ac b/configure.ac
|
||||||
index 6c65b2914bf6..afdc68363cea 100644
|
index cc69015b10..a6c72c1014 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -4085,6 +4085,8 @@ AC_CHECK_FUNCS(setpgrp,
|
@@ -4056,6 +4056,8 @@ AC_CHECK_FUNCS(setpgrp,
|
||||||
|
|
||||||
# We search for both crypt and crypt_r as one or the other may be defined
|
# We search for both crypt and crypt_r as one or the other may be defined
|
||||||
# This gets us our -lcrypt in LIBS when required on the target platform.
|
# This gets us our -lcrypt in LIBS when required on the target platform.
|
||||||
@ -32,7 +42,7 @@ index 6c65b2914bf6..afdc68363cea 100644
|
|||||||
AC_SEARCH_LIBS(crypt, crypt)
|
AC_SEARCH_LIBS(crypt, crypt)
|
||||||
AC_SEARCH_LIBS(crypt_r, crypt)
|
AC_SEARCH_LIBS(crypt_r, crypt)
|
||||||
|
|
||||||
@@ -4099,6 +4101,7 @@ char *r = crypt_r("", "", &d);
|
@@ -4070,6 +4072,7 @@ char *r = crypt_r("", "", &d);
|
||||||
[AC_DEFINE(HAVE_CRYPT_R, 1, [Define if you have the crypt_r() function.])],
|
[AC_DEFINE(HAVE_CRYPT_R, 1, [Define if you have the crypt_r() function.])],
|
||||||
[])
|
[])
|
||||||
)
|
)
|
||||||
@ -40,3 +50,6 @@ index 6c65b2914bf6..afdc68363cea 100644
|
|||||||
|
|
||||||
AC_CHECK_FUNCS(clock_gettime, [], [
|
AC_CHECK_FUNCS(clock_gettime, [], [
|
||||||
AC_CHECK_LIB(rt, clock_gettime, [
|
AC_CHECK_LIB(rt, clock_gettime, [
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
|
44
ports/python3/0014-fix-get-python-inc-output.patch
Normal file
44
ports/python3/0014-fix-get-python-inc-output.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From b6ffa6e7a0f7a013fb111e618a7f7e2c58e9d548 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Billy Robert O'Neal III <bion@microsoft.com>
|
||||||
|
Date: Wed, 26 Apr 2023 05:17:44 +0000
|
||||||
|
Subject: [PATCH 14/14] fix get python inc output
|
||||||
|
|
||||||
|
---
|
||||||
|
Lib/distutils/sysconfig.py | 7 +++++--
|
||||||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
||||||
|
index 3414a761e7..e6ae456ee9 100644
|
||||||
|
--- a/Lib/distutils/sysconfig.py
|
||||||
|
+++ b/Lib/distutils/sysconfig.py
|
||||||
|
@@ -45,7 +45,7 @@
|
||||||
|
get_makefile_filename,
|
||||||
|
get_python_version,
|
||||||
|
)
|
||||||
|
-
|
||||||
|
+from os.path import dirname
|
||||||
|
# This is better than
|
||||||
|
# from sysconfig import _CONFIG_VARS as _config_vars
|
||||||
|
# because it makes sure that the global dictionary is initialized
|
||||||
|
@@ -292,6 +292,7 @@ def get_python_inc(plat_specific=0, prefix=None):
|
||||||
|
incdir = os.path.join(get_config_var('srcdir'), 'Include')
|
||||||
|
return os.path.normpath(incdir)
|
||||||
|
python_dir = 'python' + get_python_version() + build_flags
|
||||||
|
+ prefix = dirname(dirname(BASE_PREFIX))
|
||||||
|
return os.path.join(prefix, "include", python_dir)
|
||||||
|
elif os.name == "nt":
|
||||||
|
if python_build:
|
||||||
|
@@ -299,7 +300,9 @@ def get_python_inc(plat_specific=0, prefix=None):
|
||||||
|
# pyconfig.h
|
||||||
|
return (os.path.join(prefix, "include") + os.path.pathsep +
|
||||||
|
os.path.join(prefix, "PC"))
|
||||||
|
- return os.path.join(prefix, "include")
|
||||||
|
+ python_dir = 'python' + get_python_version() + build_flags
|
||||||
|
+ prefix = dirname(dirname(BASE_PREFIX))
|
||||||
|
+ return os.path.join(prefix, "include", python_dir)
|
||||||
|
else:
|
||||||
|
raise DistutilsPlatformError(
|
||||||
|
"I don't know where Python installs its C header files "
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -18,6 +18,7 @@ set(PATCHES
|
|||||||
0010-dont-skip-rpath.patch
|
0010-dont-skip-rpath.patch
|
||||||
0012-force-disable-curses.patch
|
0012-force-disable-curses.patch
|
||||||
0013-configure-no-libcrypt.patch # https://github.com/python/cpython/pull/28881
|
0013-configure-no-libcrypt.patch # https://github.com/python/cpython/pull/28881
|
||||||
|
0014-fix-get-python-inc-output.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "python3",
|
"name": "python3",
|
||||||
"version": "3.10.7",
|
"version": "3.10.7",
|
||||||
"port-version": 5,
|
"port-version": 6,
|
||||||
"description": "The Python programming language",
|
"description": "The Python programming language",
|
||||||
"homepage": "https://github.com/python/cpython",
|
"homepage": "https://github.com/python/cpython",
|
||||||
"license": "Python-2.0",
|
"license": "Python-2.0",
|
||||||
|
@ -6382,7 +6382,7 @@
|
|||||||
},
|
},
|
||||||
"python3": {
|
"python3": {
|
||||||
"baseline": "3.10.7",
|
"baseline": "3.10.7",
|
||||||
"port-version": 5
|
"port-version": 6
|
||||||
},
|
},
|
||||||
"qca": {
|
"qca": {
|
||||||
"baseline": "2.3.5",
|
"baseline": "2.3.5",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "d3a8a2c668d77aaf0fa1862c6b3eff5018519e19",
|
||||||
|
"version": "3.10.7",
|
||||||
|
"port-version": 6
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "43e3e2453968d19d674b96aea99718541c96d852",
|
"git-tree": "43e3e2453968d19d674b96aea99718541c96d852",
|
||||||
"version": "3.10.7",
|
"version": "3.10.7",
|
||||||
|
Loading…
Reference in New Issue
Block a user