[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql 20391923d1 292/427: Add option to disable local bu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql 20391923d1 292/427: Add option to disable local builds. |
Date: |
Tue, 13 Dec 2022 02:59:52 -0500 (EST) |
branch: elpa/emacsql
commit 20391923d1db2472927e711004e52cda790c6656
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Add option to disable local builds.
---
README.md | 4 +++-
emacsql-sqlite.el | 35 ++++++++++++++++++++++++-----------
2 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index 8b5a0296f3..8a1758ac67 100644
--- a/README.md
+++ b/README.md
@@ -291,9 +291,11 @@ SQLite binary:
* Linux x86 and x86_64
* OS X x86_64
* Windows x86 and x86_64, including Cygwin
+ * Linux armv6l (Raspberry Pi + Raspbian)
The customization variable `emacsql-sqlite-automatic-fetch` controls
-the behavior of SQLite binary fetching.
+the behavior of SQLite binary fetching, and the variable
+`emacsql-sqlite-automatic-build` enables/disables local builds.
### Ignored Features
diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el
index de7b9299f4..f61184be98 100644
--- a/emacsql-sqlite.el
+++ b/emacsql-sqlite.el
@@ -16,6 +16,16 @@ download. A value of `no' will always deny the download."
:group 'emacsql
:type '(choice (const nil) (const yes) (const no)))
+(defcustom emacsql-sqlite-automatic-build t
+ "When non-nil, attempt to automatically build the SQLite binary locally.
+When enabled, the C compiler build will be attempted on every
+EmacSQL update, when the Elisp files are built. If it takes your
+computer a long time to build the binary (e.g. 10 minutes on a
+Raspberry Pi) it may be worth always fetching the pre-built
+version."
+ :group 'emacsql
+ :type 'boolean)
+
(defvar emacsql-sqlite-executable
(expand-file-name (format "bin/emacsql-sqlite-%s%s" (emacsql-system-tuple)
(if (memq system-type '(windows-nt cygwin ms-dos))
@@ -115,17 +125,20 @@ If called with non-nil ASYNC the return value is
meaningless."
(options (emacsql-sqlite-compile-switches))
(output (list "-o" emacsql-sqlite-executable))
(arguments (nconc ldlibs cflags options files output)))
- (if (not cc)
- (prog1 nil
- (message "Could not find C compiler, skipping SQLite compilation"))
- (mkdir (expand-file-name "bin" emacsql-data-root) t)
- (message "Compiling EmacSQL SQLite binary ...")
- (let ((log (get-buffer-create byte-compile-log-buffer)))
- (with-current-buffer log
- (let ((inhibit-read-only t))
- (insert (mapconcat #'identity (cons cc arguments) " ") "\n")
- (eql 0 (apply #'call-process cc nil (if async 0 t) t
- arguments))))))))
+ (cond ((not cc)
+ (prog1 nil
+ (message "Could not find C compiler, skipping SQLite build")))
+ ((not emacsql-sqlite-automatic-build)
+ (prog1 nil
+ (message "Local SQLite build disabled, skipping")))
+ (t (mkdir (expand-file-name "bin" emacsql-data-root) t)
+ (message "Compiling EmacSQL SQLite binary ...")
+ (let ((log (get-buffer-create byte-compile-log-buffer)))
+ (with-current-buffer log
+ (let ((inhibit-read-only t))
+ (insert (mapconcat #'identity (cons cc arguments) " ") "\n")
+ (eql 0 (apply #'call-process cc nil (if async 0 t) t
+ arguments)))))))))
;; SQLite binary fetching
- [nongnu] elpa/emacsql 5c423307a8 254/427: Fix README typo., (continued)
- [nongnu] elpa/emacsql 5c423307a8 254/427: Fix README typo., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c5e1ccef73 257/427: Flesh out the rest of mysql-connection's constructor., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql be9c46c274 259/427: Change the way tuples are computed., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql de9b3633d2 262/427: Oops do clean with distclean., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 0f5f560f8b 267/427: Fix README example typo., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 203cff9007 269/427: Rename the project to EmacSQL., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 38bd19ed6f 276/427: Oops, use the right equality., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 50e47ee01a 278/427: Remove shell quote., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 6c7576e497 295/427: Rename condition emacsql-lock to emacsql-locked., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 39ce3b9736 287/427: Smarter identifier identification in expressions., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 20391923d1 292/427: Add option to disable local builds.,
ELPA Syncer <=
- [nongnu] elpa/emacsql b375cd7759 294/427: Bump version number due to protocol change., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b60d9e05e2 277/427: Flesh out some docstrings., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ce05c8b2e2 305/427: Fix MySQL quoting., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3e16afce8b 281/427: Escape backslashes as well., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3c57f9a986 308/427: Adjust MySQL isolation level., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c68f11b74e 313/427: Register emacsql-pg for unit testing., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ef4bcec524 321/427: Conform to elisp header conventions, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c1ea25c872 322/427: Drop Windows issue from README (fixed in 24.4)., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 2bc599d856 327/427: Add separate package headers for each backend., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e498dd1dea 336/427: Drop emacsql-escape-format's KIND argument., ELPA Syncer, 2022/12/13