vendor: add complete multi-platform support (runtime + dev)

- Add vendor-macos-dev target for macOS development wheels
- Add vendor-linux-arm and vendor-linux-arm-dev for ARM64 Linux
- Update vendor-all-dev to include all 3 platforms
- Update install_offline.sh to detect aarch64/arm64/x86_64
- Update .gitignore to track all official vendor directories
- Add clean-vendor and clean targets

Vendor directories now include:
- macos-arm64/ and macos-arm64-dev/
- linux-x86_64/ and linux-x86_64-dev/
- linux-aarch64/ and linux-aarch64-dev/

Supports: Mac (native), x86 Linux servers, ARM64 Linux (Mac containers)
This commit is contained in:
LC mac
2026-01-12 17:57:08 +08:00
parent c380986e26
commit fb01a84ea6
41 changed files with 55 additions and 17 deletions

View File

@@ -116,6 +116,21 @@ vendor-macos: requirements.txt
cd $(VENDOR_MACOS) && shasum -a 256 *.whl > SHA256SUMS
@echo "✓ macOS ARM64 wheels: $(VENDOR_MACOS)/"
.PHONY: vendor-macos-dev
vendor-macos-dev: requirements-dev.txt
@echo "Building macOS ARM64 dev wheels (native)..."
@if [ ! -f ".venv312/bin/pip" ]; then \
echo "ERROR: .venv312 not found. Create it first:"; \
echo " python3.12 -m venv .venv312 && source .venv312/bin/activate"; \
exit 1; \
fi
mkdir -p $(VENDOR_MACOS)-dev
.venv312/bin/pip download --dest $(VENDOR_MACOS)-dev -r requirements-dev.txt
.venv312/bin/pip wheel --wheel-dir $(VENDOR_MACOS)-dev --no-deps $(VENDOR_MACOS)-dev/*.tar.gz 2>/dev/null || true
rm -f $(VENDOR_MACOS)-dev/*.tar.gz
cd $(VENDOR_MACOS)-dev && shasum -a 256 *.whl > SHA256SUMS
@echo "✓ macOS ARM64 dev wheels: $(VENDOR_MACOS)-dev/"
.PHONY: vendor-linux
vendor-linux: requirements.txt
@echo "Building Linux x86_64 wheels (Docker)..."
@@ -190,15 +205,15 @@ vendor-all: vendor-macos vendor-linux vendor-linux-arm
@echo "Commit with: git add vendor/ && git commit -m 'vendor: update wheels'"
.PHONY: vendor-all-dev
vendor-all-dev: vendor-linux vendor-linux-dev vendor-linux-arm vendor-linux-arm-dev
vendor-all-dev: vendor-macos-dev vendor-linux-dev vendor-linux-arm-dev
@echo ""
@echo "✓ All platform wheels (runtime + dev):"
@echo " Linux x86_64 (runtime): $(VENDOR_LINUX_X86)/"
@echo "✓ All platform dev wheels built:"
@echo " macOS ARM64 (dev): $(VENDOR_MACOS)-dev/"
@echo " Linux x86_64 (dev): $(VENDOR_LINUX_X86)-dev/"
@echo " Linux aarch64 (runtime): $(VENDOR_LINUX_ARM)/"
@echo " Linux aarch64 (dev): $(VENDOR_LINUX_ARM)-dev/"
@echo ""
@echo "For macOS dev wheels, run on native macOS"
@echo "Commit with: git add vendor/ && git commit -m 'vendor: update dev wheels'"
.PHONY: vendor-linux-dev
vendor-linux-dev: requirements-dev.txt