Skip to content

Commit bd81489

Browse files
committedNov 19, 2020
prepare release
1 parent 5adb5e7 commit bd81489

File tree

3 files changed

+5
-30
lines changed

3 files changed

+5
-30
lines changed
 

‎Package.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
// swift-tools-version:5.3
2-
// The swift-tools-version declares the minimum version of Swift required to build this package.
32

43
import PackageDescription
54

65
let package = Package(
76
name: "Python-iOS",
7+
platforms: [.iOS(.v9)],
88
products: [
9-
// Products define the executables and libraries a package produces, and make them visible to other packages.
109
.library(
1110
name: "Python-iOS",
1211
targets: ["Symbols", "Python", "BZip2", "OpenSSL", "XZ", "Resources"]),
1312
],
1413
dependencies: [
15-
// Dependencies declare other packages that this package depends on.
16-
// .package(url: /* package url */, from: "1.0.0"),
1714
.package(url: "https://github.com/alloyapple/CSqlite3.git", .branch("master")),
1815
],
1916
targets: [

‎README.md

+2-23
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,11 @@ This swift package enables you to use python modules in your iOS apps.
1010

1111
## Usage
1212

13-
```
14-
import CPython
15-
import Resources
16-
17-
setenv("PYTHONOPTIMIZE", "1", 1)
18-
setenv("PYTHONDONTWRITEBYTECODE", "1", 1)
19-
setenv("PYTHONUNBUFFERED", "1", 1)
20-
21-
guard let pythonHome = Resources.libURL?
22-
.deletingLastPathComponent()
23-
.path else { fatalError() }
24-
let wHome = Py_DecodeLocale(pythonHome, nil)
25-
Py_SetPythonHome(wHome)
26-
27-
setenv("PYTHONPATH",
28-
FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0].path,
29-
1)
30-
31-
setenv("TMP", NSTemporaryDirectory(), 1)
32-
33-
Py_Initialize()
34-
```
13+
See https://github.com/kewlbear/YoutubeDL.
3514

3615
## Credits
3716

38-
This package uses pre-built version of libraries downloaded from https://github.com/beeware/Python-Apple-support.
17+
This package uses pre-built version of Python downloaded from https://github.com/beeware/Python-Apple-support.
3918

4019
## License
4120

‎Tests/PythonTests/PythonTests.swift

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import XCTest
2-
@testable import Symbols
2+
@testable import Resources
33

44
final class PythonTests: XCTestCase {
55
func testExample() {
6-
let x = _Py_True
7-
PyNumber_Add(nil, nil)
6+
Init()
87
}
98

109
static var allTests = [

0 commit comments

Comments
 (0)