Skip to content

Commit c5113d2

Browse files
committed
Disable Python integration
Running Chromadb through PythonKit doesn't seem like a good approach.
1 parent 81cae6b commit c5113d2

File tree

5 files changed

+7
-14
lines changed

5 files changed

+7
-14
lines changed

Copilot for Xcode.xcodeproj/project.pbxproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
C8216B782980370100AD38C7 /* ReloadLaunchAgent.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8216B772980370100AD38C7 /* ReloadLaunchAgent.swift */; };
2323
C8216B7D2980374300AD38C7 /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = C8216B7C2980374300AD38C7 /* ArgumentParser */; };
2424
C8216B802980378300AD38C7 /* Helper in Embed XPCService */ = {isa = PBXBuildFile; fileRef = C8216B70298036EC00AD38C7 /* Helper */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
25-
C83E5DEB2A38CD000071506D /* site-packages in Resources */ = {isa = PBXBuildFile; fileRef = C83E5DE92A38CD000071506D /* site-packages */; };
26-
C83E5DEC2A38CD000071506D /* python-stdlib in Resources */ = {isa = PBXBuildFile; fileRef = C83E5DEA2A38CD000071506D /* python-stdlib */; };
2725
C8520301293C4D9000460097 /* Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8520300293C4D9000460097 /* Helpers.swift */; };
2826
C861A6A329E5503F005C41A3 /* PromptToCodeCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = C861A6A229E5503F005C41A3 /* PromptToCodeCommand.swift */; };
2927
C861E6112994F6070056CB02 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C861E6102994F6070056CB02 /* AppDelegate.swift */; };
@@ -486,8 +484,6 @@
486484
files = (
487485
C861E6152994F6080056CB02 /* Assets.xcassets in Resources */,
488486
C81291D72994FE6900196E12 /* Main.storyboard in Resources */,
489-
C83E5DEB2A38CD000071506D /* site-packages in Resources */,
490-
C83E5DEC2A38CD000071506D /* python-stdlib in Resources */,
491487
);
492488
runOnlyForDeploymentPostprocessing = 0;
493489
};
@@ -511,7 +507,7 @@
511507
);
512508
runOnlyForDeploymentPostprocessing = 0;
513509
shellPath = /bin/sh;
514-
shellScript = "set -e\necho \"Signing as $EXPANDED_CODE_SIGN_IDENTITY_NAME ($EXPANDED_CODE_SIGN_IDENTITY)\"\nfind \"$CODESIGNING_FOLDER_PATH/Contents/Resources/python-stdlib/lib-dynload\" -name \"*.so\" -exec /usr/bin/codesign --force --sign \"$EXPANDED_CODE_SIGN_IDENTITY\" -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags --generate-entitlement-der {} \\;\n";
510+
shellScript = "#set -e\n#echo \"Signing as $EXPANDED_CODE_SIGN_IDENTITY_NAME ($EXPANDED_CODE_SIGN_IDENTITY)\"\n#find \"$CODESIGNING_FOLDER_PATH/Contents/Resources/python-stdlib/lib-dynload\" -name \"*.so\" -exec /usr/bin/codesign --force --sign \"$EXPANDED_CODE_SIGN_IDENTITY\" -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags --generate-entitlement-der {} \\;\n";
515511
};
516512
C8A3B1782A2894E10046E809 /* Sign Python Site Packages */ = {
517513
isa = PBXShellScriptBuildPhase;
@@ -530,7 +526,7 @@
530526
);
531527
runOnlyForDeploymentPostprocessing = 0;
532528
shellPath = /bin/sh;
533-
shellScript = "set -e\necho \"Signing as $EXPANDED_CODE_SIGN_IDENTITY_NAME ($EXPANDED_CODE_SIGN_IDENTITY)\"\nfind \"$CODESIGNING_FOLDER_PATH/Contents/Resources/site-packages\" -type f \\( -name \"*.so\" -o -name \"*.dylib\" \\) -exec /usr/bin/codesign --force --sign \"$EXPANDED_CODE_SIGN_IDENTITY\" -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags --generate-entitlement-der {} \\;\n";
529+
shellScript = "#set -e\n#echo \"Signing as $EXPANDED_CODE_SIGN_IDENTITY_NAME ($EXPANDED_CODE_SIGN_IDENTITY)\"\n#find \"$CODESIGNING_FOLDER_PATH/Contents/Resources/site-packages\" -type f \\( -name \"*.so\" -o -name \"*.dylib\" \\) -exec /usr/bin/codesign --force --sign \"$EXPANDED_CODE_SIGN_IDENTITY\" -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags --generate-entitlement-der {} \\;\n";
534530
};
535531
/* End PBXShellScriptBuildPhase section */
536532

DEVELOPMENT.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ Most of the logics are implemented inside the package `Core`.
2727

2828
## Building and Archiving the App
2929

30-
1. (Run `make setup` to install python and packages. But I am still considering if we should include it in the app)
31-
2. Build or archive the Copilot for Xcode target.
30+
1. Build or archive the Copilot for Xcode target.
3231

3332
## Testing Extension
3433

ExtensionService/AppDelegate.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import FileChangeChecker
44
import LaunchAgentManager
55
import Logger
66
import Preferences
7-
import PythonHelper
87
import Service
98
import ServiceManagement
109
import ServiceUpdateMigration
@@ -48,7 +47,6 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate {
4847
Task {
4948
do {
5049
try await ServiceUpdateMigrator().migrate()
51-
await initializePython()
5250
} catch {
5351
Logger.service.error(error.localizedDescription)
5452
}

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
setup: setup-langchain
1+
setup:
2+
echo "Setup."
23

34
setup-langchain:
5+
echo "Don't setup LangChain!"
46
cd Python; \
57
curl -L https://github.com/beeware/Python-Apple-support/releases/download/3.11-b1/Python-3.11-macOS-support.b1.tar.gz -o Python-3.11-macOS-support.b1.tar.gz; \
68
tar -xzvf Python-3.11-macOS-support.b1.tar.gz; \

Tool/Package.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let package = Package(
88
platforms: [.macOS(.v12)],
99
products: [
1010
.library(name: "Terminal", targets: ["Terminal"]),
11-
.library(name: "LangChain", targets: ["LangChain", "PythonHelper"]),
11+
.library(name: "LangChain", targets: ["LangChain"]),
1212
.library(name: "ExternalServices", targets: ["BingSearchService"]),
1313
.library(name: "Preferences", targets: ["Preferences", "Configs"]),
1414
.library(name: "Logger", targets: ["Logger"]),
@@ -38,10 +38,8 @@ let package = Package(
3838
.target(
3939
name: "LangChain",
4040
dependencies: [
41-
"PythonHelper",
4241
"OpenAIService",
4342
.product(name: "Parsing", package: "swift-parsing"),
44-
.product(name: "PythonKit", package: "PythonKit"),
4543
]
4644
),
4745

0 commit comments

Comments
 (0)