From 24399d8600d7ed7337e02512c10a8c3e8da7438b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=99=E9=9D=99=E5=9C=B0=E7=99=BD=E8=89=B2=E5=A4=96?= =?UTF-8?q?=E5=A5=97?= <296019487@qq.com> Date: Fri, 30 Apr 2021 16:49:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?M1=20mac=20pro=20=E5=AE=89=E8=A3=85python?= =?UTF-8?q?=E5=9C=A8/Library/Frameworks/=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PythonKit/PythonLibrary.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PythonKit/PythonLibrary.swift b/PythonKit/PythonLibrary.swift index d205717..acfafd6 100644 --- a/PythonKit/PythonLibrary.swift +++ b/PythonKit/PythonLibrary.swift @@ -81,7 +81,7 @@ extension PythonLibrary { #if canImport(Darwin) private static var libraryNames = ["Python.framework/Versions/:/Python"] private static var libraryPathExtensions = [""] - private static var librarySearchPaths = ["", "/usr/local/Frameworks/"] + private static var librarySearchPaths = ["", "/usr/local/Frameworks/","/Library/Frameworks/"] private static var libraryVersionSeparator = "." #elseif os(Linux) private static var libraryNames = ["libpython:", "libpython:m"] From cc260cd5d7ff76053fa0016833a37d03f5ab36eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=99=E9=9D=99=E5=9C=B0=E7=99=BD=E8=89=B2=E5=A4=96?= =?UTF-8?q?=E5=A5=97?= <296019487@qq.com> Date: Mon, 10 May 2021 09:03:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0podpec?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PythonKit.podspec | 28 ++++++++++++++++++++++++++++ PythonKit/PythonLibrary.swift | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 PythonKit.podspec diff --git a/PythonKit.podspec b/PythonKit.podspec new file mode 100644 index 0000000..d609692 --- /dev/null +++ b/PythonKit.podspec @@ -0,0 +1,28 @@ +# Run `pod lib lint PythonKit.podspec' to ensure this is a valid spec. + +Pod::Spec.new do |s| + s.name = 'PythonKit' + s.version = '1.0.1' + s.swift_versions = ['5.3'] + s.summary = '...' + + s.description = <<-DESC + description. + DESC + + s.homepage = 'https://github.com/pvieito/PythonKit.git' + s.license = { :type => 'MIT' } + s.author = { '静静的白色外套' => '296019487@qq.com' } + s.source = { :git => '', :tag => s.version.to_s } + s.social_media_url = '' + + s.swift_version = '5.3' + s.ios.deployment_target = '13.0' + s.tvos.deployment_target = '13.0' + s.macos.deployment_target = '11.0' + s.watchos.deployment_target = '6.0' + + s.source_files = 'PythonKit/**/*.swift' + + +end diff --git a/PythonKit/PythonLibrary.swift b/PythonKit/PythonLibrary.swift index acfafd6..2229c08 100644 --- a/PythonKit/PythonLibrary.swift +++ b/PythonKit/PythonLibrary.swift @@ -270,7 +270,8 @@ extension PythonLibrary { // Methods of `PythonLibrary` used for logging messages. extension PythonLibrary { private static func log(_ message: String) { - guard Environment.loaderLogging.value != nil else { return } + +// guard Environment.loaderLogging.value != nil else { return } fputs(message + "\n", stderr) } }