Skip to content

Commit

Permalink
[python3] adjust sysconfig include dir to match vcpkg layout (#34888)
Browse files Browse the repository at this point in the history
* [python3] modify sysconfig include dir for vcpkg layout

* v db
  • Loading branch information
Neumann-A committed Nov 6, 2023
1 parent 472c17c commit 1802d39
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 1 deletion.
27 changes: 27 additions & 0 deletions ports/python3/0018-fix-sysconfig-include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index ebe371182..e351df7da 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -30,9 +30,9 @@
'purelib': '{base}/lib/python{py_version_short}/site-packages',
'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages',
'include':
- '{installed_base}/include/python{py_version_short}{abiflags}',
+ '{installed_base}/../../include/python{py_version_short}{abiflags}',
'platinclude':
- '{installed_platbase}/include/python{py_version_short}{abiflags}',
+ '{installed_platbase}/../../include/python{py_version_short}{abiflags}',
'scripts': '{base}/bin',
'data': '{base}',
},
@@ -51,8 +51,8 @@
'platstdlib': '{base}/Lib',
'purelib': '{base}/Lib/site-packages',
'platlib': '{base}/Lib/site-packages',
- 'include': '{installed_base}/Include',
- 'platinclude': '{installed_base}/Include',
+ 'include': '{installed_base}/../../include/python{py_version_short}{abiflags}',
+ 'platinclude': '{installed_base}/../../include/python{py_version_short}{abiflags}',
'scripts': '{base}/Scripts',
'data': '{base}',
},
1 change: 1 addition & 0 deletions ports/python3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ set(PATCHES
0012-force-disable-curses.patch
0014-fix-get-python-inc-output.patch
0015-dont-use-WINDOWS-def.patch
0018-fix-sysconfig-include.patch
)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
Expand Down
1 change: 1 addition & 0 deletions ports/python3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "python3",
"version": "3.11.5",
"port-version": 1,
"description": "The Python programming language",
"homepage": "https://github.com/python/cpython",
"license": "Python-2.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6806,7 +6806,7 @@
},
"python3": {
"baseline": "3.11.5",
"port-version": 0
"port-version": 1
},
"qca": {
"baseline": "2.3.7",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/python3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a428056a4e0e86adce9344f051e4678e50e6cb35",
"version": "3.11.5",
"port-version": 1
},
{
"git-tree": "52f5c3a91d997108f5acebea1748176156dbefc9",
"version": "3.11.5",
Expand Down

0 comments on commit 1802d39

Please sign in to comment.