aboutsummaryrefslogtreecommitdiff
path: root/gn
diff options
context:
space:
mode:
Diffstat (limited to 'gn')
-rw-r--r--gn/packages/genenetwork.scm3
-rw-r--r--gn/packages/python24.scm83
-rw-r--r--gn/packages/statistics.scm7
3 files changed, 69 insertions, 24 deletions
diff --git a/gn/packages/genenetwork.scm b/gn/packages/genenetwork.scm
index 7b1650a..98be132 100644
--- a/gn/packages/genenetwork.scm
+++ b/gn/packages/genenetwork.scm
@@ -849,7 +849,8 @@ written in C")
;; Where GN1 is located:
(("/gnshare/gn") out)
;; Where the database is located:
- (("tux01") "localhost"))
+ (("tux01.uthsc.edu") "localhost"))
+ ;(("tux01.uthsc.edu") "lily.uthsc.edu"))
;; This directory is expected to be writable
(symlink "/tmp" "web/tmp")
#t)))
diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm
index 6f27e22..51f4fe9 100644
--- a/gn/packages/python24.scm
+++ b/gn/packages/python24.scm
@@ -5,6 +5,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system python)
+ #:use-module (gn packages databases)
#:use-module (gn packages python)
#:use-module (gn packages statistics)
#:use-module (past packages python)
@@ -13,6 +14,7 @@
#:use-module (gnu packages maths)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages statistics)
+ #:use-module (gnu packages tls)
#:use-module (srfi srfi-1))
(define (default-python2.4)
@@ -397,45 +399,82 @@ clusters (computers connected via network).")
(version "1.2.5")
(source
(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/PyMySQL/mysqlclient-python")
- (commit "MySQLdb-1.2.5")))
- (file-name (git-file-name name version))
+ (method url-fetch)
+ (uri (pypi-uri "MySQL-python" version ".zip"))
(sha256
(base32
- "193h09afkmz9nw2jlwfdikx1xj9sybswd2705k8jy48h1ks6fnbj"))))
+ "0x0c2jg0bb3pp84njaqiic050qkyd7ymwhfvhipnimg58yv40441"))
+ ;(patches
+ ; (list
+ ; (origin
+ ; (method url-fetch)
+ ; (uri "https://sources.debian.org/data/main/p/python-mysqldb/1.2.3-2.1/debian/patches/03_converters_set2str.patch")
+ ; (file-name "mysqlclient-converters_set2str.patch")
+ ; (sha256
+ ; (base32
+ ; "0xkbfscy6kqc84lij1ml7d8vxf5xqi99vx5ha75cg8yyx6cvv34i")))
+ ; (origin
+ ; (method url-fetch)
+ ; (uri "https://github.com/PyMySQL/mysqlclient-python/commit/d663649f851794dffa84010db6290e693d4baab8.patch")
+ ; (file-name "mysqlclient-mariadb-10.2-compat.patch")
+ ; (sha256
+ ; (base32
+ ; "0pz2r8l7299yhl58w0zp0kplg1h9zi3qv9ynpcidxm8mf8884284")))
+ ; ))
+ ))
(build-system python-build-system)
(arguments
`(#:python ,python-2.4
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'dont-create-release-file
- (lambda _
- (substitute* "setup_common.py"
- (("MySQLdb/release.py")
- (string-append (getcwd) "/release.py")))
- #t))
+ ;(add-after 'unpack 'work-with-newer-mysql
+ ; (lambda _
+ ; (substitute* '("_mysql.c"
+ ; "MySQLdb/connections.py")
+ ; (("unix_socket") "socket"))
+ ;; ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%s' at line 1")
+ ;(substitute* "MySQLdb/cursors.py"
+ ; (("query % tuple.*")
+ ; "query = query.encode(db.unicode_literal.charset)\n"))
+ ; #t))
(add-before 'check 'pre-check
(lambda _
+ ;; All of these tests require a running mysql server.
+ ;; When they are all deleted there are no tests.
+ (delete-file "tests/test_MySQLdb_dbapi20.py") ; 35 tests, 54 errors
+ (delete-file "tests/test_MySQLdb_capabilities.py") ; 20 tests, 20 errors
+ (delete-file "tests/test_MySQLdb_nonstandard.py") ; 14 tests, 6 errors
+ (mkdir-p "/tmp/mysqld")
(call-with-output-file "/tmp/my.cnf"
(lambda (p)
(format p
"[mysqld]~@
- datadir=/tmp~@
- socket=/tmp/mysql.sock~%")))
- (system* "mysqld" "--defaults-file=/tmp/my.cnf" "--bootstrap")
- ;(invoke "mysql" "-S" "/tmp/mysql.sock"
+ datadir = /tmp/mysqld~@
+ port = 3306~@
+ user = nixbld~@
+ #character-set-server = utf8mb4~@
+ socket = /tmp/mysqld/mysql.sock~%")))
+ (setenv "TESTDB" "/tmp/my.cnf")
+ ;(system "mysqld --defaults-file=/tmp/my.cnf --initialize &") ; mariadb
+ ;(system (string-append (assoc-ref %build-inputs "mysql") "/libexec/mysqld --defaults-file=/tmp/my.cnf &")) ; mysql-5.0
+ (system "mysqld --defaults-file=/tmp/my.cnf &") ; mysql-5.5
+ (sleep 5)
+ (system "mysqladmin -S /tmp/mysqld/mysql.sock variables")
+ ;(invoke "mysqladmin" "-S" "/tmp/mysqld/mysql.sock" "variables")
+ (system "mysql -S /tmp/mysqld/mysql.sock -e 'create database mysqldb_test charset utf8;'")
+ ;(invoke "mysql" "-S" "/tmp/mysqld/mysql.sock"
; "-e" "'create database mysqldb_test charset utf8;'")
- #t)))
- #:tests? #f)) ; TODO: Run the test suite
+ #t))
+ )
+ #:tests? #t)) ; TODO: Run the test suite
(native-inputs
- `(("mariadb" ,mariadb "dev")
- ("mariadb:bin" ,mariadb)
+ `(("mysql" ,mysql-5.5)
("python-nose" ,python24-nose)
- ("python-setuptools" ,python24-setuptools)))
+ ("python-setuptools" ,python24-setuptools)
+ ("unzip" ,unzip)))
(inputs
- `(("zlib" ,zlib)))
+ `(("openssl" ,openssl-1.0)
+ ("zlib" ,zlib)))
(home-page "http://mysql-python.sourceforge.net/")
(synopsis "Python interface to MySQL")
(description "MySQLdb is an interface to the popular MySQL database server
diff --git a/gn/packages/statistics.scm b/gn/packages/statistics.scm
index 73194fb..0926921 100644
--- a/gn/packages/statistics.scm
+++ b/gn/packages/statistics.scm
@@ -165,7 +165,12 @@ interaction networks.")
"/R-" version ".tar.gz"))
(sha256
(base32
- "1mjmq95s5nrwppbzic6lzanjq65j3sxg85l1q09c0fxdin7s70y5"))))
+ "1mjmq95s5nrwppbzic6lzanjq65j3sxg85l1q09c0fxdin7s70y5"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (delete-file "NEWS.pdf")
+ #t))))
(arguments
(substitute-keyword-arguments (package-arguments r-minimal)
((#:tests? _ #t) #t)