1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
3 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages tryton)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages check)
24 #:use-module (gnu packages databases)
25 #:use-module (gnu packages finance)
26 #:use-module (gnu packages glib)
27 #:use-module (gnu packages gnome)
28 #:use-module (gnu packages gtk)
29 #:use-module (gnu packages python)
30 #:use-module (gnu packages python-crypto)
31 #:use-module (gnu packages python-web)
32 #:use-module (gnu packages python-xyz)
33 #:use-module (gnu packages time)
34 #:use-module (gnu packages xml)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix utils)
38 #:use-module (guix build-system python))
40 (define-public python-trytond
42 (name "python-trytond")
47 (uri (pypi-uri "trytond" version))
49 (base32 "1n76ccv2x5csz80p42dav8rhzg2m14wdi3bj1pizhw8x2hxxfwx3"))))
50 (build-system python-build-system)
52 `(("python-dateutil" ,python-dateutil)
53 ("python-genshi" ,python-genshi)
54 ("python-lxml" ,python-lxml)
55 ("python-magic" ,python-magic)
56 ("python-passlib" ,python-passlib)
57 ("python-polib" ,python-polib)
58 ("python-psycopg2" ,python-psycopg2)
59 ("python-relatorio" ,python-relatorio)
60 ("python-sql" ,python-sql)
61 ("python-werkzeug" ,python-werkzeug)
62 ("python-wrapt" ,python-wrapt)))
64 `(("python-mock" ,python-mock)))
67 (modify-phases %standard-phases
68 (add-before 'check 'preparations
70 (setenv "DB_NAME" ":memory:")
71 (setenv "HOME" "/tmp")
73 (home-page "https://www.tryton.org/")
74 (synopsis "Server component of Tryton")
75 (description "Tryton is a three-tier high-level general purpose
76 application platform using PostgreSQL as its main database engine. It is the
77 core base of a complete business solution providing modularity, scalability
79 (license license:gpl3+)))
88 (uri (pypi-uri "tryton" version))
90 (base32 "1dghr6x5wga3sizjvj261xndpl38si5hwiz3llm2bhmg33nplfh7"))))
91 (build-system python-build-system)
94 (modify-phases %standard-phases
95 (add-before 'check 'change-home
97 ;; Change from /homeless-shelter to /tmp for write permission.
98 (setenv "HOME" "/tmp")))
99 (add-after 'install 'wrap-gi-python
100 (lambda* (#:key inputs outputs #:allow-other-keys)
101 (let ((out (assoc-ref outputs "out"))
102 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
103 (wrap-program (string-append out "/bin/tryton")
104 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
107 `(("glib-compile-schemas" ,glib "bin")
108 ("gobject-introspection" ,gobject-introspection)))
110 `(("gdk-pixbuf" ,gdk-pixbuf+svg)
111 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
113 ("python-dateutil" ,python-dateutil)
114 ("python-pycairo" ,python-pycairo)
115 ("python-pygobject" ,python-pygobject)))
116 (home-page "https://www.tryton.org/")
117 (synopsis "Client component of Tryton")
119 "This package is the client component of Tryton.")
120 (license license:gpl3+)))
122 (define-public python-trytond-country
124 (name "python-trytond-country")
129 (uri (pypi-uri "trytond_country" version))
131 (base32 "0k1xw5r2pfd5mvvg3pn3vavwjwpgmm5i6nsc8x421znk4gvvns78"))))
132 (build-system python-build-system)
135 (modify-phases %standard-phases
139 (assoc-ref %build-inputs "python-trytond")
141 ,(version-major+minor (package-version python))
142 "/site-packages/trytond/tests/run-tests.py")))
143 (lambda* (#:key inputs outputs #:allow-other-keys)
144 (add-installed-pythonpath inputs outputs)
145 ;; Doctest contains one test that requires internet access.
146 (invoke "python" runtest "-m" "country" "--no-doctest")))))))
149 ("python-dateutil" ,python-dateutil)
150 ("python-genshi" ,python-genshi)
151 ("python-lxml" ,python-lxml)
152 ("python-magic" ,python-magic)
153 ("python-passlib" ,python-passlib)
154 ("python-polib" ,python-polib)
155 ("python-proteus" ,python-proteus)
156 ("python-relatorio" ,python-relatorio)
157 ("python-sql" ,python-sql)
158 ("python-werkzeug" ,python-werkzeug)
159 ("python-wrapt" ,python-wrapt)))
161 `(("python-pycountry" ,python-pycountry)
162 ("python-trytond" ,python-trytond)))
163 (home-page "http://www.tryton.org/")
164 (synopsis "Tryton module with countries")
166 "This package provides a Tryton module with countries.")
167 (license license:gpl3+)))
169 (define-public python-trytond-party
171 (name "python-trytond-party")
176 (uri (pypi-uri "trytond_party" version))
178 (base32 "0wh7g1g67g4vwxm797ra6fkfvmd3w77vl7nxj76y856cy217gbzp"))))
179 (build-system python-build-system)
182 (modify-phases %standard-phases
186 (assoc-ref %build-inputs "python-trytond")
188 ,(version-major+minor (package-version python))
189 "/site-packages/trytond/tests/run-tests.py")))
190 (lambda* (#:key inputs outputs #:allow-other-keys)
191 (add-installed-pythonpath inputs outputs)
192 ;; Doctest 'scenario_party_phone_number.rst' fails.
193 (invoke "python" runtest "-m" "party" "--no-doctest")))))))
195 `(("python" ,python-minimal-wrapper)
196 ("python-dateutil" ,python-dateutil)
197 ("python-genshi" ,python-genshi)
198 ("python-lxml" ,python-lxml)
199 ("python-magic" ,python-magic)
200 ("python-passlib" ,python-passlib)
201 ("python-polib" ,python-polib)
202 ("python-proteus" ,python-proteus)
203 ("python-relatorio" ,python-relatorio)
204 ("python-werkzeug" ,python-werkzeug)
205 ("python-wrapt" ,python-wrapt)))
207 `(("python-sql" ,python-sql)
208 ("python-stnum" ,python-stdnum)
209 ("python-trytond" ,python-trytond)
210 ("python-trytond-country" ,python-trytond-country)))
211 (home-page "https://www.tryton.org/")
212 (synopsis "Tryton module for parties and addresses")
214 "This package provides a Tryton module for (counter)parties and
216 (license license:gpl3+)))
218 (define-public python-proteus
220 (name "python-proteus")
225 (uri (pypi-uri "proteus" version))
227 (base32 "0kxac5pkps243wf0xbmbd1g5bml96xl94j88y6yyzm093vyli150"))))
228 (build-system python-build-system)
229 ;; Tests require python-trytond-party which requires python-proteus.
233 `(("python-dateutil" ,python-dateutil)))
234 (home-page "http://www.tryton.org/")
235 (synopsis "Library to access a Tryton server as a client")
237 "This package provides a library to access Tryton server as a client.")
238 (license license:lgpl3+)))