1 ;;;; -*- Mode: LISP; Syntax: Ansi-Common-Lisp; Base: 10; -*-
3 (defpackage :postmodern-system
4 (:use :common-lisp :asdf)
6 (in-package :postmodern-system)
8 ;; Change this to manually turn threading support on or off.
9 (eval-when (:compile-toplevel :load-toplevel :execute)
10 #+(or allegro armedbear clasp cmu corman (and digitool ccl-5.1)
11 ecl lispworks openmcl sbcl genera)
12 (pushnew :postmodern-thread-safe *features*)
14 #+(or allegro clasp clisp ecl lispworks mcl openmcl cmu sbcl armedbear)
15 (pushnew :postmodern-use-mop *features*))
17 (defsystem "postmodern"
18 :description "PostgreSQL programming API"
19 :author "Marijn Haverbeke <marijnh@gmail.com>"
20 :maintainer "Sabra Crolleton <sabra.crolleton@gmail.com>"
21 :homepage "https://github.com/marijnh/Postmodern"
24 :depends-on ("alexandria"
30 (:feature :postmodern-use-mop "closer-mop")
31 (:feature :postmodern-thread-safe "bordeaux-threads"))
33 ((:module "postmodern"
34 :components ((:file "package")
36 (:file "connect" :depends-on ("package" "config"))
37 (:file "json-encoder" :depends-on ("package" "config"))
38 (:file "query" :depends-on ("connect" "json-encoder" "config"))
39 (:file "prepare" :depends-on ("query" "config"))
40 (:file "roles" :depends-on ("query" "config"))
41 (:file "util" :depends-on ("query" "roles" "config"))
42 (:file "transaction" :depends-on ("query" "config"))
43 (:file "namespace" :depends-on ("query" "config"))
44 (:file "execute-file" :depends-on ("query" "config"))
45 (:file "table" :depends-on ("util" "transaction" "query" "config")
46 :if-feature :postmodern-use-mop)
47 (:file "deftable" :depends-on
48 ("query" (:feature :postmodern-use-mop "table" "config"))))))
49 :in-order-to ((test-op (test-op "postmodern/tests"))))
51 (defsystem "postmodern/tests"
52 :depends-on ("postmodern" "fiveam" "simple-date" "simple-date/postgres-glue"
53 "cl-postgres/tests" "s-sql/tests" "local-time"
54 "cl-postgres+local-time")
56 ((:module "postmodern/tests"
57 :components ((:file "test-package")
59 (:file "test-prepared-statements" :depends-on ("test-package" "tests")
60 :if-feature :postmodern-use-mop)
61 (:file "test-binary-prepared-statements" :depends-on ("test-package" "tests")
62 :if-feature :postmodern-use-mop)
63 (:file "test-binary-parameters" :depends-on ("test-package" "tests")
64 :if-feature :postmodern-use-mop)
65 (:file "test-return-types" :depends-on ("tests" "test-package"))
66 (:file "test-table-info" :depends-on ("test-package" "tests"))
67 (:file "test-return-types-timestamps" :depends-on ("test-package" "tests"))
68 (:file "test-transactions" :depends-on ("test-package" "tests"))
69 (:file "test-roles" :depends-on ("test-package" "tests"))
70 #-abcl (:file "test-dao" :depends-on ("test-package" "tests"))
71 #+abcl (:file "abcl-test-dao" :depends-on ("test-package" "tests"))
72 (:file "test-execute-file" :depends-on ("test-package" "tests")))))
74 :perform (test-op (o c)
75 (uiop:symbol-call :cl-postgres-tests '#:prompt-connection)
76 (uiop:symbol-call :fiveam '#:run! :postmodern)))