Skip to content

Commit 5108b27

Browse files
committed
add Package.swift.in
1 parent dc7d9b0 commit 5108b27

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

Package.swift.in

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// swift-tools-version:5.3
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "Python-iOS",
7+
platforms: [.iOS(.v9)],
8+
products: [
9+
.library(
10+
name: "Python-iOS",
11+
targets: [ // order matters!
12+
"LinkPython",
13+
"libpython3", "libssl", "libcrypto", "libffi",
14+
"PythonSupport",
15+
]),
16+
],
17+
targets: [
18+
.binaryTarget(name: "libpython3", url: "https://github.com/kewlbear/Python-iOS/releases/download/TAG/libpython3.xcframework.zip", checksum: "libpython3.xcframework_CHECKSUM"),
19+
.binaryTarget(name: "libssl", url: "https://github.com/kewlbear/Python-iOS/releases/download/TAG/libssl.xcframework.zip", checksum: "libssl.xcframework_CHECKSUM"),
20+
.binaryTarget(name: "libcrypto", url: "https://github.com/kewlbear/Python-iOS/releases/download/TAG/libcrypto.xcframework.zip", checksum: "libcrypto.xcframework_CHECKSUM"),
21+
.binaryTarget(name: "libffi", url: "https://github.com/kewlbear/Python-iOS/releases/download/TAG/libffi.xcframework.zip", checksum: "libffi.xcframework_CHECKSUM"),
22+
.target(name: "LinkPython",
23+
dependencies: [
24+
"libpython3",
25+
"libssl",
26+
"libcrypto",
27+
"libffi",
28+
],
29+
linkerSettings: [
30+
.linkedLibrary("z"),
31+
.linkedLibrary("sqlite3"),
32+
]
33+
),
34+
.target(name: "PythonSupport",
35+
dependencies: ["LinkPython"],
36+
resources: [.copy("lib")]),
37+
.testTarget(
38+
name: "PythonTests",
39+
dependencies: ["PythonSupport"]),
40+
]
41+
)

0 commit comments

Comments
 (0)