Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python scripts are in tools/python3 #14

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions ports/py-wheel/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,4 @@ vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}" OPTIONS -x)

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")

if(NOT VCPKG_TARGET_IS_WINDOWS)
vcpkg_copy_tools(TOOL_NAMES wheel DESTINATION "${CURRENT_PACKAGES_DIR}/tools/python3" AUTO_CLEAN)
endif()

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
1 change: 1 addition & 0 deletions ports/py-wheel/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "py-wheel",
"version": "0.41.3",
"port-version": 1,
"description": "The official binary distribution format for Python",
"homepage": "https://github.com/pypa/wheel",
"license": "MIT",
Expand Down
14 changes: 14 additions & 0 deletions ports/python3/0016-undup-ffi-symbols.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/Modules/_ctypes/malloc_closure.c b/Modules/_ctypes/malloc_closure.c
index 788bae6a9..3938f79db 100644
--- a/Modules/_ctypes/malloc_closure.c
+++ b/Modules/_ctypes/malloc_closure.c
@@ -11,6 +11,9 @@
#endif
#include "ctypes.h"

+#undef Py_ffi_closure_alloc
+#undef Py_ffi_closure_free
+
/* BLOCKSIZE can be adjusted. Larger blocksize will take a larger memory
overhead, but allocate less blocks from the system. It may be that some
systems have a limit of how many mmap'd blocks can be open.
23 changes: 13 additions & 10 deletions ports/python3/0018-fix-sysconfig-include.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index ebe371182..e351df7da 100644
index ebe3711..b127603 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -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',
@@ -30,10 +30,10 @@
'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}',
- 'scripts': '{base}/bin',
+ '{installed_platbase}/../../include/python{py_version_short}{abiflags}',
+ 'scripts': '{base}/tools/python3',
'data': '{base}',
},
'posix_home': {
10 changes: 9 additions & 1 deletion ports/python3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ set(PATCHES
0012-force-disable-modules.patch
0014-fix-get-python-inc-output.patch
0015-dont-use-WINDOWS-def.patch
0016-undup-ffi-symbols.patch # Required for lld-link.
0018-fix-sysconfig-include.patch
)

Expand Down Expand Up @@ -376,4 +377,11 @@ if (NOT VCPKG_TARGET_IS_WINDOWS)
endif()
endif()

configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" "${CURRENT_PACKAGES_DIR}/share/python3/vcpkg-port-config.cmake" @ONLY)
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/python3/Lib/distutils/command/build_ext.py" "'libs'" "'../../lib'")
else()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/python3.${PYTHON_VERSION_MINOR}/distutils/command/build_ext.py" "'libs'" "'../../lib'")
file(COPY_FILE "${CURRENT_PACKAGES_DIR}/tools/python3/python3.${PYTHON_VERSION_MINOR}" "${CURRENT_PACKAGES_DIR}/tools/python3/python3")
endif()

configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" "${CURRENT_PACKAGES_DIR}/share/python3/vcpkg-port-config.cmake" @ONLY)
2 changes: 1 addition & 1 deletion ports/python3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "python3",
"version": "3.11.5",
"port-version": 3,
"port-version": 5,
m-kuhn marked this conversation as resolved.
Show resolved Hide resolved
"description": "The Python programming language",
"homepage": "https://github.com/python/cpython",
"license": "Python-2.0",
Expand Down
Loading