[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add and use sqlite-legacy-for-python
From: |
Christopher Allan Webber |
Subject: |
[PATCH] Add and use sqlite-legacy-for-python |
Date: |
Fri, 12 Feb 2016 16:13:52 -0800 |
User-agent: |
mu4e 0.9.13; emacs 24.5.1 |
Ludovic Courtès writes:
> Pjotr Prins <address@hidden> skribis:
>
>> Patch b24765139c8940541b23f84592d3580d53f71d71
>>
>> (define-public sqlite
>> (package
>> (name "sqlite")
>> - (version "3.8.11.1")
>> + (version "3.10.0")
>> (source (origin
>>
>> is the cause of python(2|3)-sqlalchemy breaking. I confirmed that by
>> regressing to the original sqlite package. Since the python binding is
>> part of the interpreter, I suspect there may be more python modules
>> vulnerable. I updated python-sqlalchemy to latest and that makes no
>> difference. Its tests fail on sqlite 3.10.0 and pass on 3.8.11.1.
>>
>> What do we do? Revert on this sqlite patch for the new guix release?
>> Or add a second sqlite package and have that as a python dependency?
>
> I would do the latter, assuming that soon a new python-sqlalchemy
> release would solve the problem. WDYT?
>
> This is probably OK since python-sqlalchemy is a leaf, and so we’re
> unlikely to end up mixing two different SQLite versions.
>
> Ludo’.
Will sqlalchemy really remain a leaf node? I hope not, since I'm
working on packaging MediaGoblin now :)
Regardless, I agree that the second approach seems to be the right one.
I've built a modified package, sqlite-legacy-for-python, and put it to
use. I built it and confirmed it builds fine and that the tests pass,
and with it, the tests pass in python-sqlalchemy too.
Ok to push?
>From 20b9e3ac19b77b33f88d45e33ad9ceafacbdb1bd Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <address@hidden>
Date: Fri, 12 Feb 2016 16:09:52 -0800
Subject: [PATCH] gnu: Add sqlite-legacy-for-python and use it in python's
definition.
* gnu/packages/database.scm (sqlite-legacy-for-python): New variable.
* gnu/packages/python.scm (python): Use sqlite-legacy-for-python.
---
gnu/packages/databases.scm | 30 ++++++++++++++++++++++++++++++
gnu/packages/python.scm | 3 ++-
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index b36f5d8..c00cbb4 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2015 Sou Bunnbu <address@hidden>
;;; Copyright © 2015 Leo Famulari <address@hidden>
;;; Copyright © 2016 Efraim Flashner <address@hidden>
+;;; Copyright © 2016 Christopher Allan Webber <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -388,6 +389,35 @@ widely deployed SQL database engine in the world. The
source code for SQLite
is in the public domain.")
(license public-domain)))
+;; Python packages (well, at least python-sqlalchemy) break with the latest
+;; release of sqlite, so we need to keep this around for legacy purposes...
+(define-public sqlite-legacy-for-python
+ (package
+ (inherit sqlite)
+ (version "3.8.11.1")
+ ;; Repeating a lot of the above definition... there's no way around it!
+ (source (origin
+ (method url-fetch)
+ (uri (let ((numeric-version
+ (match (string-split version #\.)
+ ((first-digit other-digits ...)
+ (string-append first-digit
+ (string-pad-right
+ (string-concatenate
+ (map (cut string-pad <> 2 #\0)
+ other-digits))
+ 6 #\0))))))
+ (list
+ (string-append
+ "https://fossies.org/linux/misc/sqlite-autoconf-"
+ numeric-version ".tar.gz")
+ (string-append
+ "http://distfiles.gentoo.org/distfiles/"
+ "/sqlite-autoconf-" numeric-version ".tar.gz"))))
+ (sha256
+ (base32
+ "1dnkl4qr1dgaprbyf3jddfiynkhxnin86qabni47wjlc0fnb16gv"))))))
+
(define-public tdb
(package
(name "tdb")
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3758eed..8d6f520 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -233,7 +233,8 @@
`(("bzip2" ,bzip2)
("gdbm" ,gdbm)
("libffi" ,libffi) ; for ctypes
- ("sqlite" ,sqlite) ; for sqlite extension
+ ;; Hopefully soon we'll have this back at vanilla sqlite
+ ("sqlite" ,sqlite-legacy-for-python) ; for sqlite extension
("openssl" ,openssl)
("readline" ,readline)
("zlib" ,zlib)
--
2.6.3
- sqlite update causes failure of python-sqlalchemy, Pjotr Prins, 2016/02/08
- Re: sqlite update causes failure of python-sqlalchemy, Ludovic Courtès, 2016/02/09
- [PATCH] Add and use sqlite-legacy-for-python,
Christopher Allan Webber <=
- Re: [PATCH] Add and use sqlite-legacy-for-python, Thompson, David, 2016/02/12
- Re: [PATCH] Add and use sqlite-legacy-for-python, Christopher Allan Webber, 2016/02/12
- Re: [PATCH] Add and use sqlite-legacy-for-python, Christopher Allan Webber, 2016/02/14
- Re: [PATCH] Add and use sqlite-legacy-for-python, Christopher Allan Webber, 2016/02/15
- Re: [PATCH] Add and use sqlite-legacy-for-python, Christopher Allan Webber, 2016/02/15
- Re: [PATCH] Add and use sqlite-legacy-for-python, Pjotr Prins, 2016/02/15
- Re: [PATCH] Add and use sqlite-legacy-for-python, Ludovic Courtès, 2016/02/21
- Re: [PATCH] Add and use sqlite-legacy-for-python, Andreas Enge, 2016/02/13