Skip to content

Commit 5c90880

Browse files
committed
Migrate the Apple folder to the Platforms directory.
1 parent ca6dfa0 commit 5c90880

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+40
-40
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ jobs:
369369
sudo xcode-select --switch /Applications/Xcode_15.4.app
370370
371371
- name: Build and test
372-
run: python3 Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation),OS=17.5'
372+
run: python3 Platforms/Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation),OS=17.5'
373373

374374
build-emscripten:
375375
name: 'Emscripten'

Makefile.pre.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,7 +2358,7 @@ testios:
23582358
fi
23592359

23602360
# Clone the testbed project into the XCFOLDER
2361-
$(PYTHON_FOR_BUILD) $(srcdir)/Apple/testbed clone --framework $(PYTHONFRAMEWORKPREFIX) "$(XCFOLDER)"
2361+
$(PYTHON_FOR_BUILD) $(srcdir)/Platforms/Apple/testbed clone --framework $(PYTHONFRAMEWORKPREFIX) "$(XCFOLDER)"
23622362

23632363
# Run the testbed project
23642364
$(PYTHON_FOR_BUILD) "$(XCFOLDER)" run --verbose -- test -uall --single-process --rerun -W
@@ -3286,10 +3286,10 @@ clean-retain-profile: pycremoval
32863286
-find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
32873287
-rm -f Include/pydtrace_probes.h
32883288
-rm -f profile-gen-stamp
3289-
-rm -rf Apple/iOS/testbed/Python.xcframework/ios-*/bin
3290-
-rm -rf Apple/iOS/testbed/Python.xcframework/ios-*/lib
3291-
-rm -rf Apple/iOS/testbed/Python.xcframework/ios-*/include
3292-
-rm -rf Apple/iOS/testbed/Python.xcframework/ios-*/Python.framework
3289+
-rm -rf Platforms/Apple/iOS/testbed/Python.xcframework/ios-*/bin
3290+
-rm -rf Platforms/Apple/iOS/testbed/Python.xcframework/ios-*/lib
3291+
-rm -rf Platforms/Apple/iOS/testbed/Python.xcframework/ios-*/include
3292+
-rm -rf Platforms/Apple/iOS/testbed/Python.xcframework/ios-*/Python.framework
32933293

32943294
.PHONY: profile-removal
32953295
profile-removal:
@@ -3323,7 +3323,7 @@ clobber: clean
33233323
config.cache config.log pyconfig.h Modules/config.c
33243324
-rm -rf build platform
33253325
-rm -rf $(PYTHONFRAMEWORKDIR)
3326-
-rm -rf Apple/iOS/Frameworks
3326+
-rm -rf Platforms/Apple/iOS/Frameworks
33273327
-rm -rf iOSTestbed.*
33283328
-rm -f python-config.py python-config
33293329
-rm -rf cross-build
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extend = "../.ruff.toml" # Inherit the project-wide settings
1+
extend = "../../.ruff.toml" # Inherit the project-wide settings
22

33
[format]
44
preview = true
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# The simplest entry point is:
1212
#
13-
# $ python Apple ci iOS
13+
# $ python Platforms/Apple ci iOS
1414
#
1515
# which will:
1616
# * Clean any pre-existing build artefacts
@@ -57,7 +57,7 @@
5757
ArgsT = Sequence[str | Path]
5858

5959
SCRIPT_NAME = Path(__file__).name
60-
PYTHON_DIR = Path(__file__).resolve().parent.parent
60+
PYTHON_DIR = Path(__file__).resolve().parent.parent.parent
6161

6262
CROSS_BUILD_DIR = PYTHON_DIR / "cross-build"
6363

@@ -140,7 +140,7 @@ def apple_env(host: str) -> EnvironmentT:
140140
"""Construct an Apple development environment for the given host."""
141141
env = {
142142
"PATH": ":".join([
143-
str(PYTHON_DIR / "Apple/iOS/Resources/bin"),
143+
str(PYTHON_DIR / "Platforms/Apple/iOS/Resources/bin"),
144144
str(subdir(host) / "prefix"),
145145
"/usr/bin",
146146
"/bin",
@@ -440,7 +440,7 @@ def framework_path(host_triple: str, multiarch: str) -> Path:
440440
:param host_triple: The host triple (e.g., arm64-apple-ios-simulator)
441441
:param multiarch: The multiarch identifier (e.g., arm64-simulator)
442442
"""
443-
return CROSS_BUILD_DIR / f"{host_triple}/Apple/iOS/Frameworks/{multiarch}"
443+
return CROSS_BUILD_DIR / f"{host_triple}/Platforms/Apple/iOS/Frameworks/{multiarch}"
444444

445445

446446
def package_version(prefix_path: Path) -> str:
@@ -624,7 +624,7 @@ def create_xcframework(platform: str) -> str:
624624

625625
# Copy in the cross-architecture pyconfig.h
626626
shutil.copy(
627-
PYTHON_DIR / f"Apple/{platform}/Resources/pyconfig.h",
627+
PYTHON_DIR / f"Platforms/Apple/{platform}/Resources/pyconfig.h",
628628
slice_framework / "Headers/pyconfig.h",
629629
)
630630

@@ -661,7 +661,7 @@ def create_xcframework(platform: str) -> str:
661661
host_path = (
662662
CROSS_BUILD_DIR
663663
/ host_triple
664-
/ "Apple/iOS/Frameworks"
664+
/ "Platforms/Apple/iOS/Frameworks"
665665
/ multiarch
666666
)
667667
host_framework = host_path / "Python.framework"
@@ -691,7 +691,7 @@ def create_xcframework(platform: str) -> str:
691691

692692
print(" - build tools")
693693
shutil.copytree(
694-
PYTHON_DIR / "Apple/testbed/Python.xcframework/build",
694+
PYTHON_DIR / "Platforms/Apple/testbed/Python.xcframework/build",
695695
package_path / "Python.xcframework/build",
696696
)
697697

@@ -711,7 +711,7 @@ def package(context: argparse.Namespace) -> None:
711711
print()
712712
run([
713713
sys.executable,
714-
"Apple/testbed",
714+
"Platforms/Apple/testbed",
715715
"clone",
716716
"--platform",
717717
context.platform,
@@ -806,13 +806,13 @@ def test(context: argparse.Namespace, host: str | None = None) -> None: # noqa:
806806
framework_path = (
807807
CROSS_BUILD_DIR
808808
/ host
809-
/ f"Apple/{context.platform}"
809+
/ f"Platforms/Apple/{context.platform}"
810810
/ f"Frameworks/{apple_multiarch(host)}"
811811
)
812812

813813
run([
814814
sys.executable,
815-
"Apple/testbed",
815+
"Platforms/Apple/testbed",
816816
"clone",
817817
"--platform",
818818
context.platform,
Lines changed: 15 additions & 15 deletions
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)