-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: Add support for building and installing sqlcipher3 with OpenSSL on macOS #134
base: master
Are you sure you want to change the base?
Conversation
… on macOS - Added function to set SQLCipher paths, including OpenSSL paths, to ensure headers and libraries are correctly located. - Updated environment variables. - Modified the `install_pysqlcipher` function to use `pypa/build` and `pypa/installer` for building and installing sqlcipher3. - Implemented checks for existing symlinks before creating them to avoid FileExistsError. - Ensured compatibility with both Intel and M1 Mac architectures by adjusting symlink creation logic.
for more information, see https://pre-commit.ci
Hey @Bide-UK , sorry for the super late response. Awesome work, really wanted to add Mac supported for this. Did you check if the install process is still compatible with Windows? If you can't test on Windows give me a little time and i will make sure it works! |
Using this fork of sqlcipher3 could also be a solution. It has fully built wheels with included sqlcipher binaries for macOS, windows, and Linux. https://github.com/laggykiller/sqlcipher3 Haven't tested it out myself though. |
Man, thank you so much for sharing @cvdub! I tested it on Windows, and it works perfectly!! I've been looking for wheels for ages, even tried making my own GitHub actions to build them but never managed to do so successfully... @Bide-UK, will still check out your PR, would be a nice fallback option:) Edit: Added the sqlcipher-wheels package as dependency, works like a charm, also in the CI tests!! |
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.
This looks pretty nice, although i think in the current state this will break the Windows install (see comment). A simple platform check should resolve this, as most of the install process on Windows is unaffected by your PR!
@@ -104,6 +170,10 @@ def install_pysqlcipher( | |||
print("No OPENSSL_LIBNAME environment variable found, updating `setup.py`!") | |||
patch_pysqlcipher_setup(pysqlcipher_dir, crypto_lib) | |||
|
|||
# Set environment paths and create symlinks |
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.
Should this be done on all platforms? It seems like at least the create_symlinks
method won't work on Windows. Maybe we can just add a platform check before calling it?
The sqlcipher dependency can now be installed using pre-built wheels with included sqlcipher binaries. This makes the whole library installable via pip!
install_pysqlcipher
function to usepypa/build
andpypa/installer
for building and installing sqlcipher3.