aboutsummaryrefslogtreecommitdiff
path: root/gn/services/genenetwork.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gn/services/genenetwork.scm')
-rw-r--r--gn/services/genenetwork.scm68
1 files changed, 38 insertions, 30 deletions
diff --git a/gn/services/genenetwork.scm b/gn/services/genenetwork.scm
index 0137e94..7de1821 100644
--- a/gn/services/genenetwork.scm
+++ b/gn/services/genenetwork.scm
@@ -3,17 +3,10 @@
(use-modules (gnu)
(ice-9 match)
(past packages python)
+ (past packages web)
(gn packages genenetwork)
- (gn packages python24)
- (gn packages web))
+ (gn packages python24))
(use-service-modules web)
-(use-package-modules python)
-
-(define %python-path
- "/lib/python2.4/site-packages")
-
-(define %mod-python-path
- (file-append httpd22-mod-python-24 %python-path))
(define %default-httpd22-modules
(map (match-lambda
@@ -82,28 +75,32 @@
(firmware '())
(packages (cons* python-2.4
- ;httpd-mod-python-24
- ;python24-qtlreaper
- ;python24-htmlgen-GN1
- ;python24-json-GN1
- ;python24-piddle
- ;python24-pyx-GN1
- ;python24-pyxlwriter
- ;python24-svg-GN1
+ python24-htmlgen-GN1
+ python24-json-GN1
+ python24-mysqlclient ; MySQLdb
+ python24-numarray
+ python24-piddle
+ python24-pp
+ python24-pyx
+ python24-pyxlwriter
+ python24-qtlreaper
+ python24-svg-GN1
%base-packages))
(services (list (service httpd-service-type
(httpd-configuration
- (package httpd22-mod-python-24) ; Must be httpd-2.2?
+ ;; Must be a httpd-2.2 variant.
+ (package httpd22-with-mod-python)
(config
(httpd-config-file
(server-name "www.genenetwork.org")
- (server-root httpd22-mod-python-24) ; Defaults to httpd, must be combo package.
+ ;; Defaults to httpd, should be same as 'package' above.
+ (server-root httpd22-with-mod-python)
(user "nobody")
(group "root")
+ ;; Only while debugging
(pid-file "/tmp/httpd-genenetwork1")
(error-log "/tmp/httpd-genenetwork1-error-log")
- (document-root (file-append genenetwork1 "/web"))
(listen '("8042"))
(modules (cons*
(httpd-module
@@ -111,21 +108,32 @@
(file "modules/mod_python.so"))
%default-httpd22-modules))
(extra-config (list "\
-TypesConfig etc/httpd/mime.types
-#for apache-2.2, ignored by apache-2.4
+TypesConfig " httpd22-with-mod-python "/etc/httpd/mime.types
DefaultType application/octet-stream
-# Should PythonPath just be genenetwork1/web/webqtl?
-PythonPath \"sys.path+['" (file-append python-2.4 "/lib/python2.4") "', '" %mod-python-path "', '" (file-append genenetwork1 "/web/webqtl") "']\"
-<Directory " (file-append genenetwork1 "/web/webqtl") ">
- AddHandler mod_python .py
- PythonHandler mod_python.publisher
- PythonAutoReload Off
+# DocumentRoot MUST NOT be in the PythonPath. Because genenetwork1 must be in PythonPath we leave the document-root keyword above unset.
+PythonPath \"['/run/current-system/profile/lib/python2.4', '/run/current-system/profile/lib/python2.4/site-packages', '" httpd22-with-mod-python "/lib/python2.4/site-packages', '" genenetwork1 "/web/webqtl']\"
+# same as 'listen' above
+NameVirtualHost *:8042
+<VirtualHost *:8042>
+ DocumentRoot "genenetwork1 "/web
+</VirtualHost>
+<Directory " genenetwork1 "/web/webqtl>
+ PythonOption session FileSession
+ #what is the difference between these two?
+ #AddHandler mod_python .py
+ SetHandler python-program
+ #publisher has more debug information
+ PythonHandler " genenetwork1 "/web/webqtl/main.py
+ #PythonHandler mod_python.publisher
+ #PythonHandler mod_python.cgihandler
+ # only while debugging:
PythonDebug On
</Directory>
+# only while debugging:
<Location /mpinfo>
SetHandler python-program
PythonHandler mod_python.testhandler
</Location>")))))))))
-;PythonPath \"sys.path+['" (file-append python-2.4 "/lib/python2.4") "', '" %mod-python-path "', '" (file-append python24-qtlreaper %python-path) "', '" (file-append python24-json-GN1 %python-path) "', '" (file-append python24-piddle %python-path) "', '" (file-append python24-pyx-GN1 %python-path) "', '" (file-append python24-pyxlwriter-GN1 %python-path) "', '" (file-append python24-svg-GN1 %python-path) "', '" (file-append python24-htmlgen-GN1) "', '" (file-append genenetwork1 "/web/webqtl") "']\"
-;PythonPath \"sys.path+['" (file-append python-2.4 "/lib/python2.4") "', '" %mod-python-path "', '" (file-append genenetwork1 "/web/webqtl") "']\"
+;; guix system container -L /path/to/guix-past/modules/ -L /path/to/guix-bioinformatics/ /path/to/guix-bioinformatics/gn/services/genenetwork.scm --network
+;; xdg-open http://localhost:8042