aboutsummaryrefslogtreecommitdiff
path: root/gn/packages
diff options
context:
space:
mode:
authorEfraim Flashner2020-07-26 15:21:30 +0300
committerEfraim Flashner2020-07-26 15:21:30 +0300
commit398759fae8ccf4354e751cc3405e0a486bf39439 (patch)
tree9723dcbc8c55270b48883f22507156b3ba2ef7cd /gn/packages
parent051d2fc1f66c84c1ea0da0e49fa6712eb07414fa (diff)
downloadguix-bioinformatics-398759fae8ccf4354e751cc3405e0a486bf39439.tar.gz
A running genenetwork
Diffstat (limited to 'gn/packages')
-rw-r--r--gn/packages/genenetwork.scm9
-rw-r--r--gn/packages/python24.scm59
-rw-r--r--gn/packages/web.scm13
3 files changed, 70 insertions, 11 deletions
diff --git a/gn/packages/genenetwork.scm b/gn/packages/genenetwork.scm
index 214f040..36975bd 100644
--- a/gn/packages/genenetwork.scm
+++ b/gn/packages/genenetwork.scm
@@ -694,10 +694,9 @@ written in C")
(base32
"1s735dj8kf98gf5w58p10zzyc5766gn27j4j5yh07ksadg7h1kdi"))))
(build-system gnu-build-system)
- (propagated-inputs
+ (native-inputs
`(("ghostscript" ,ghostscript)
("graphviz" ,graphviz-2.26)
- ("httpd" ,httpd22-mod-python-24)
("python24" ,python-2.4)
("python-piddle" ,python24-piddle)
("wget" ,wget)))
@@ -708,8 +707,9 @@ written in C")
(delete 'configure)
(delete 'build)
(add-after 'patch-generated-file-shebangs 'patch-more-files
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((piddle (assoc-ref inputs "python-piddle")))
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((piddle (assoc-ref inputs "python-piddle"))
+ (out (assoc-ref outputs "out")))
(substitute* "web/webqtl/networkGraph/networkGraphUtils.py"
(("/usr/local/bin/neato") (which "neato"))
(("/usr/local/bin/circo") (which "circo"))
@@ -730,6 +730,7 @@ written in C")
(("/usr/bin/python") (which "python"))
(("/usr/bin/env python") (which "python")))
(substitute* "web/webqtl/base/webqtlConfigLocal.py"
+ (("/gnshare/gn") out)
(("PythonPath.*")
(string-append "PythonPath = '" (which "python") "'\n"))
(("PIDDLE_FONT_PATH.*/lib")
diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm
index bae5304..916c33c 100644
--- a/gn/packages/python24.scm
+++ b/gn/packages/python24.scm
@@ -3,10 +3,12 @@
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system python)
#:use-module (gn packages python)
#:use-module (past packages python)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages databases)
#:use-module (gnu packages maths)
#:use-module (gnu packages python-xyz)
#:use-module (srfi srfi-1))
@@ -435,3 +437,60 @@ clusters (computers connected via network).")
(synopsis "")
(description "")
(license license:bsd-3)))
+
+(define-public python24-mysqlclient
+ (package
+ (name "python24-mysqlclient")
+ (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))
+ (sha256
+ (base32
+ "193h09afkmz9nw2jlwfdikx1xj9sybswd2705k8jy48h1ks6fnbj"))))
+ (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-before 'check 'pre-check
+ (lambda _
+ (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"
+ ; "-e" "'create database mysqldb_test charset utf8;'")
+ #t)))
+ #:tests? #f)) ; TODO: Run the test suite
+ (native-inputs
+ `(("mariadb" ,mariadb "dev")
+ ("mariadb:bin" ,mariadb)
+ ("python-nose" ,python24-nose)
+ ("python-setuptools" ,python24-setuptools)))
+ (inputs
+ `(("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
+for Python. The design goals are:
+@itemize
+@item with Python database API version 2.0
+@item Thread-safety
+@item Thread-friendliness (threads will not block each other)
+@item Compatibility with MySQL-3.23 and later
+@end itemize")
+ (license license:gpl2+)))
diff --git a/gn/packages/web.scm b/gn/packages/web.scm
index a6ce42f..a9ec973 100644
--- a/gn/packages/web.scm
+++ b/gn/packages/web.scm
@@ -370,10 +370,6 @@ connections and other data between hits and access to Apache internals.")
(lambda _
;; Make sure we're in the correct folder
(chdir "../mod_python-3.3.1")
- ;; We can't import cPickle because we don't wrap with Python.
- (substitute* (find-files "." "\\.py$")
- (("import cPickle")
- "try:\n import cPickle\nexcept:\n import pickle as cPickle"))
#t))
(add-after 'change-directory 'bootstrap-mod-python
(lambda* (#:key inputs #:allow-other-keys)
@@ -383,12 +379,15 @@ connections and other data between hits and access to Apache internals.")
(tcl-version ,(version-major+minor (package-version tcl))))
(substitute* "configure.in"
(("PY_LIBS=.*")
- (string-append "PY_LIBS=-L" python "/lib/python" py-version "\n"))
- (("PY_LDFLAGS=.*")
- (string-append "PY_LDFLAGS=\"-lpython" py-version
+ (string-append "PY_LIBS=\"" python
+ "/lib/libpython" py-version ".so "
+ " -lpthread -ldl -lutil -lm" ; LIB[SMC]
+ " -lpython" py-version
" -lreadline -lssl -lcrypto"
" -ltk" tcl-version " -ltcl" tcl-version
" -lgdbm -ltirpc -lnsl -lz\"\n"))
+ (("PY_LDFLAGS=.*")
+ (string-append "PY_LDFLAGS=\"-Wl,-rpath=" python "/lib -Wl,-rpath=" python "/lib/python" py-version "/lib-dynload\"\n"))
(("PY_INCLUDES=.*")
(string-append "PY_INCLUDES=-I" python "/include/python" py-version "\n")))
(invoke "autoreconf" "-vfi"))))