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

[python3][python2] Use MKDIR_P to create directories to avoid race conditions #22902

Merged
merged 3 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions ports/python2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ vcpkg_extract_source_archive_ex(
PATCHES ${_PYTHON_PATCHES}
)

vcpkg_replace_string("${SOURCE_PATH}/Makefile.pre.in" "$(INSTALL) -d -m $(DIRMODE)" "$(MKDIR_P)")

if (VCPKG_TARGET_IS_WINDOWS)
if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
set(BUILD_ARCH "Win32")
Expand Down
5 changes: 3 additions & 2 deletions ports/python2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "python2",
"version": "2.7.18",
"port-version": 1,
"port-version": 2,
"description": "The Python programming language as an embeddable library",
"homepage": "https://www.python.org"
"homepage": "https://www.python.org",
"license": "Python-2.0"
}
15 changes: 0 additions & 15 deletions ports/python3/0008-fix-parallel-install.patch

This file was deleted.

3 changes: 2 additions & 1 deletion ports/python3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set(PATCHES
0003-devendor-external-dependencies.patch
0004-dont-copy-vcruntime.patch
0005-only-build-required-projects.patch
0008-fix-parallel-install.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
list(PREPEND PATCHES 0001-static-library.patch)
Expand Down Expand Up @@ -46,6 +45,8 @@ vcpkg_from_github(
PATCHES ${PATCHES}
)

vcpkg_replace_string("${SOURCE_PATH}/Makefile.pre.in" "$(INSTALL) -d -m $(DIRMODE)" "$(MKDIR_P)")

if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
# Due to the way Python handles C extension modules on Windows, a static python core cannot
# load extension modules.
Expand Down
3 changes: 2 additions & 1 deletion ports/python3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "python3",
"version-semver": "3.10.1",
"port-version": 4,
"port-version": 5,
"description": "The Python programming language",
"homepage": "https://github.com/python/cpython",
"license": "Python-2.0",
"supports": "!uwp",
"dependencies": [
{
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5530,11 +5530,11 @@
},
"python2": {
"baseline": "2.7.18",
"port-version": 1
"port-version": 2
},
"python3": {
"baseline": "3.10.1",
"port-version": 4
"port-version": 5
},
"qca": {
"baseline": "2.3.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/python2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "fc1f7aaa8a2312a56ce7dc1324c2eaf608a7a331",
"version": "2.7.18",
"port-version": 2
},
{
"git-tree": "052ef22af59535134ca2944cfd8e7e7d3ea24d67",
"version": "2.7.18",
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": "c9b705608afc0485c03effb5aaa439f027b20af4",
"version-semver": "3.10.1",
"port-version": 5
},
{
"git-tree": "75172bc36c45d15ee298de1803625af1770cb805",
"version-semver": "3.10.1",
Expand Down