-
Notifications
You must be signed in to change notification settings - Fork 107
Install neo4j with zip files in macos instead of brew. #772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
f24c001 to
61ccb0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modifies the macOS installation process to use pre-built binaries downloaded directly via zip/tar files instead of relying on Homebrew, eliminating the dependency on Xcode in older macOS systems like macOS-12.
Key changes:
- Replaces Homebrew-based Neo4j installation with direct binary downloads for macOS
- Adds support for both ARM64 and x86_64 architectures on macOS
- Updates test infrastructure to verify installation on both macOS architectures
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/memmachine/installation/utilities.py | Adds macOS JDK download URLs for both ARM64 and x64 architectures |
| src/memmachine/installation/memmachine_configure.py | Refactors MacosEnvironment to inherit from LinuxEnvironment and implements manual binary installation instead of Homebrew |
| tests/memmachine/installation/test_memmachine_configure.py | Updates mock environment and adds test coverage for both ARM64 and x64 macOS installations |
| .github/workflows/installation-test.yml | Adds macos-15-intel to the test matrix and updates conditional logic for macOS-specific steps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| neo4j_tar_path = str(Path(self.install_dir, LINUX_NEO4J_TAR_NAME)) | ||
| self.environment.download_file(LINUX_NEO4J_URL, neo4j_tar_path) | ||
| self.environment.extract_tar(neo4j_tar_path, self.install_dir) | ||
| neo4j_dir = str(Path(self.install_dir) / "neo4j-community-2025.09.0") |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Neo4j version is hardcoded here but defined as NEO4J_DIR_NAME in utilities.py. Use NEO4J_DIR_NAME instead to maintain consistency and avoid duplication. This should be: neo4j_dir = str(Path(self.install_dir) / NEO4J_DIR_NAME)
| neo4j_dir = str(Path(self.install_dir) / "neo4j-community-2025.09.0") | |
| neo4j_dir = str(Path(self.install_dir) / NEO4J_DIR_NAME) |
| def extract_tar(self, zip_path: str, extract_to: str) -> None: | ||
| self.extracted_files[zip_path] = extract_to |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter name 'zip_path' is misleading since this method extracts tar files, not zip files. Rename it to 'tar_path' to accurately reflect the file type being processed.
| def extract_tar(self, zip_path: str, extract_to: str) -> None: | |
| self.extracted_files[zip_path] = extract_to | |
| def extract_tar(self, tar_path: str, extract_to: str) -> None: | |
| self.extracted_files[tar_path] = extract_to |
| # | ||
| - name: macOS - Install Ollama | ||
| if: matrix.os == 'macos-latest' | ||
| if: matrix.os == 'macos-latest' or matrix.os == 'macos-15-intel' |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conditional expression uses Python syntax ('or') instead of GitHub Actions YAML syntax. This should use '||' for proper workflow evaluation: if: matrix.os == 'macos-latest' || matrix.os == 'macos-15-intel'
| - name: macOS - Test installation | ||
| if: matrix.os == 'macos-latest' | ||
| if: matrix.os == 'macos-latest' or matrix.os == 'macos-15-intel' |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conditional expression uses Python syntax ('or') instead of GitHub Actions YAML syntax. This should use '||' for proper workflow evaluation: if: matrix.os == 'macos-latest' || matrix.os == 'macos-15-intel'
| if: matrix.os == 'macos-latest' or matrix.os == 'macos-15-intel' | |
| if: matrix.os == 'macos-latest' || matrix.os == 'macos-15-intel' |
|
@mwqgithub You may need to check if those copilot comments make sense. |
Yes, I think these comments are very useful. Let me fix them. |
048fefc to
81190cf
Compare
Purpose of the change
Support configuration script in older macos systems. Avoid installing xcode
Description
In older macos systems like macos-12, homebrew doesn't provide pre-compiled jdk and jdk has to be compiled locally when installing neo4j. This makes the installation of neo4j depends on Xcode, which is very large.
So we would like to switch to download the pre-built java binary and neo4j binary directly and extract them. Like we do in linux and windows.
Fixes/Closes
Fixes #758
Type of change
How Has This Been Tested?
Checklist
Maintainer Checklist