Skip to content

Commit 878cda6

Browse files
committed
Add script to install python
1 parent 72eb8ea commit 878cda6

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,4 @@ Python/site-packages/*
131131
!Python/site-packages/requirements.txt
132132
!Python/site-packages/install.sh
133133

134+
Python/VERSIONS

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
setup: setup-langchain
2+
3+
setup-langchain:
4+
cd Python; \
5+
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; \
6+
tar -xzvf Python-3.11-macOS-support.b1.tar.gz; \
7+
rm Python-3.11-macOS-support.b1.tar.gz; \
8+
cp module.modulemap Python.xcframework/macos-arm64_x86_64/Headers/module.modulemap
9+
cd Python/site-packages; \
10+
sh ./install.sh
11+
12+
.PHONY: setup setup-langchain

Python/site-packages/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ python3.11 -m pip install -r requirements.txt -t .
77

88
rm pip/__init__.py
99
cp ../pip_init.py pip/__init__.py
10-
find . -name "__pycache__" -exec rm -rf {} \;
11-
find "*.so" -delete
10+
find . -name "__pycache__" -exec rm -rf {} \; || true
11+
find "*.so" -delete || true

VERSIONS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Python version: 3.11.0
2+
Build: b1
3+
Min macOS version: 10.15
4+
---------------------
5+
libFFI: macOS native
6+
BZip2: 1.0.8
7+
OpenSSL: 3.0.5
8+
XZ: 5.2.6

0 commit comments

Comments
 (0)