Commit | Line | Data |
---|---|---|
48174fb9 AP |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com> | |
6de7e59f | 3 | ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net> |
48174fb9 AP |
4 | ;;; |
5 | ;;; This file is part of GNU Guix. | |
6 | ;;; | |
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. | |
11 | ;;; | |
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. | |
16 | ;;; | |
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/>. | |
19 | ||
20 | (define-module (gnu packages tryton) | |
21 | #:use-module ((guix licenses) #:prefix license:) | |
22 | #:use-module (gnu packages) | |
ac257f12 | 23 | #:use-module (gnu packages check) |
a8714bf6 | 24 | #:use-module (gnu packages databases) |
c8b1defe | 25 | #:use-module (gnu packages finance) |
6de7e59f VM |
26 | #:use-module (gnu packages glib) |
27 | #:use-module (gnu packages gnome) | |
16855482 | 28 | #:use-module (gnu packages gtk) |
48174fb9 | 29 | #:use-module (gnu packages python) |
d649704e | 30 | #:use-module (gnu packages python-crypto) |
1b2f753d | 31 | #:use-module (gnu packages python-web) |
44d10b1f | 32 | #:use-module (gnu packages python-xyz) |
33dc54b0 | 33 | #:use-module (gnu packages time) |
55e1475c | 34 | #:use-module (gnu packages xml) |
48174fb9 AP |
35 | #:use-module (guix packages) |
36 | #:use-module (guix download) | |
106dd72b | 37 | #:use-module (guix utils) |
48174fb9 AP |
38 | #:use-module (guix build-system python)) |
39 | ||
f38d2b42 | 40 | (define-public python-trytond |
48174fb9 | 41 | (package |
f38d2b42 | 42 | (name "python-trytond") |
d649704e | 43 | (version "5.6.5") |
48174fb9 AP |
44 | (source |
45 | (origin | |
46 | (method url-fetch) | |
7e99221d | 47 | (uri (pypi-uri "trytond" version)) |
48174fb9 | 48 | (sha256 |
d649704e | 49 | (base32 "1n76ccv2x5csz80p42dav8rhzg2m14wdi3bj1pizhw8x2hxxfwx3")))) |
48174fb9 AP |
50 | (build-system python-build-system) |
51 | (inputs | |
52 | `(("python-dateutil" ,python-dateutil) | |
53 | ("python-genshi" ,python-genshi) | |
d649704e | 54 | ("python-lxml" ,python-lxml) |
7e99221d | 55 | ("python-magic" ,python-magic) |
d649704e VM |
56 | ("python-passlib" ,python-passlib) |
57 | ("python-polib" ,python-polib) | |
48174fb9 AP |
58 | ("python-psycopg2" ,python-psycopg2) |
59 | ("python-relatorio" ,python-relatorio) | |
48174fb9 AP |
60 | ("python-sql" ,python-sql) |
61 | ("python-werkzeug" ,python-werkzeug) | |
62 | ("python-wrapt" ,python-wrapt))) | |
63 | (native-inputs | |
64 | `(("python-mock" ,python-mock))) | |
65 | (arguments | |
66 | `(#:phases | |
67 | (modify-phases %standard-phases | |
68 | (add-before 'check 'preparations | |
69 | (lambda _ | |
fa5255fd | 70 | (setenv "DB_NAME" ":memory:") |
d649704e | 71 | (setenv "HOME" "/tmp") |
fa5255fd | 72 | #t))))) |
48174fb9 AP |
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 | |
78 | and security.") | |
79 | (license license:gpl3+))) | |
16855482 AP |
80 | |
81 | (define-public tryton | |
82 | (package | |
83 | (name "tryton") | |
6de7e59f | 84 | (version "5.6.3") |
16855482 AP |
85 | (source |
86 | (origin | |
87 | (method url-fetch) | |
974a4d5d | 88 | (uri (pypi-uri "tryton" version)) |
16855482 | 89 | (sha256 |
6de7e59f | 90 | (base32 "1dghr6x5wga3sizjvj261xndpl38si5hwiz3llm2bhmg33nplfh7")))) |
16855482 | 91 | (build-system python-build-system) |
16855482 | 92 | (arguments |
6de7e59f VM |
93 | `(#:phases |
94 | (modify-phases %standard-phases | |
95 | (add-before 'check 'change-home | |
96 | (lambda _ | |
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)))) | |
105 | #t))))) | |
106 | (native-inputs | |
107 | `(("glib-compile-schemas" ,glib "bin") | |
108 | ("gobject-introspection" ,gobject-introspection))) | |
109 | (inputs | |
110 | `(("gdk-pixbuf" ,gdk-pixbuf+svg) | |
111 | ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) | |
112 | ("gtk+" ,gtk+) | |
113 | ("python-dateutil" ,python-dateutil) | |
114 | ("python-pycairo" ,python-pycairo) | |
115 | ("python-pygobject" ,python-pygobject))) | |
16855482 AP |
116 | (home-page "https://www.tryton.org/") |
117 | (synopsis "Client component of Tryton") | |
6de7e59f VM |
118 | (description |
119 | "This package is the client component of Tryton.") | |
16855482 | 120 | (license license:gpl3+))) |
bf3563d5 | 121 | |
0a92ebde AP |
122 | (define-public python-trytond-country |
123 | (package | |
106dd72b VM |
124 | (name "python-trytond-country") |
125 | (version "5.6.0") | |
126 | (source | |
127 | (origin | |
128 | (method url-fetch) | |
129 | (uri (pypi-uri "trytond_country" version)) | |
130 | (sha256 | |
131 | (base32 "0k1xw5r2pfd5mvvg3pn3vavwjwpgmm5i6nsc8x421znk4gvvns78")))) | |
132 | (build-system python-build-system) | |
133 | (arguments | |
134 | `(#:phases | |
135 | (modify-phases %standard-phases | |
136 | (replace 'check | |
137 | (let ((runtest | |
138 | (string-append | |
139 | (assoc-ref %build-inputs "python-trytond") | |
140 | "/lib/python" | |
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"))))))) | |
147 | (native-inputs | |
148 | `(("python" ,python) | |
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))) | |
160 | (propagated-inputs | |
161 | `(("python-pycountry" ,python-pycountry) | |
162 | ("python-trytond" ,python-trytond))) | |
163 | (home-page "http://www.tryton.org/") | |
164 | (synopsis "Tryton module with countries") | |
165 | (description | |
166 | "This package provides a Tryton module with countries.") | |
167 | (license license:gpl3+))) | |
0a92ebde | 168 | |
c8b1defe AP |
169 | (define-public python-trytond-party |
170 | (package | |
171 | (name "python-trytond-party") | |
cb4ebb7f | 172 | (version "5.6.0") |
c8b1defe AP |
173 | (source |
174 | (origin | |
175 | (method url-fetch) | |
176 | (uri (pypi-uri "trytond_party" version)) | |
177 | (sha256 | |
cb4ebb7f | 178 | (base32 "0wh7g1g67g4vwxm797ra6fkfvmd3w77vl7nxj76y856cy217gbzp")))) |
c8b1defe | 179 | (build-system python-build-system) |
c8b1defe | 180 | (arguments |
cb4ebb7f VM |
181 | `(#:phases |
182 | (modify-phases %standard-phases | |
183 | (replace 'check | |
184 | (let ((runtest | |
185 | (string-append | |
186 | (assoc-ref %build-inputs "python-trytond") | |
187 | "/lib/python" | |
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"))))))) | |
194 | (native-inputs | |
195 | `(("python" ,python-minimal-wrapper) | |
c8b1defe AP |
196 | ("python-dateutil" ,python-dateutil) |
197 | ("python-genshi" ,python-genshi) | |
cb4ebb7f | 198 | ("python-lxml" ,python-lxml) |
c8b1defe | 199 | ("python-magic" ,python-magic) |
cb4ebb7f VM |
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))) | |
206 | (propagated-inputs | |
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") | |
c8b1defe AP |
213 | (description |
214 | "This package provides a Tryton module for (counter)parties and | |
215 | addresses.") | |
216 | (license license:gpl3+))) | |
217 | ||
23dc957c VM |
218 | (define-public python-trytond-currency |
219 | (package | |
220 | (name "python-trytond-currency") | |
221 | (version "5.6.0") | |
222 | (source | |
223 | (origin | |
224 | (method url-fetch) | |
225 | (uri (pypi-uri "trytond_currency" version)) | |
226 | (sha256 | |
227 | (base32 "1x6ynxpbafjpky5vfir9favijj6v5gl62szshladlx14ng6qgm68")))) | |
228 | (build-system python-build-system) | |
229 | (arguments | |
230 | `(#:phases | |
231 | (modify-phases %standard-phases | |
232 | (replace 'check | |
233 | (let ((runtest | |
234 | (string-append | |
235 | (assoc-ref %build-inputs "python-trytond") | |
236 | "/lib/python" | |
237 | ,(version-major+minor (package-version python)) | |
238 | "/site-packages/trytond/tests/run-tests.py"))) | |
239 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
240 | (add-installed-pythonpath inputs outputs) | |
241 | (invoke "python" runtest "-m" "currency"))))))) | |
242 | (native-inputs | |
243 | `(("python" ,python-minimal-wrapper) | |
244 | ("python-dateutil" ,python-dateutil) | |
245 | ("python-genshi" ,python-genshi) | |
246 | ("python-forex-python" ,python-forex-python) | |
247 | ("python-lxml" ,python-lxml) | |
248 | ("python-magic" ,python-magic) | |
249 | ("python-passlib" ,python-passlib) | |
250 | ("python-polib" ,python-polib) | |
251 | ("python-proteus" ,python-proteus) | |
252 | ("python-pycountry" ,python-pycountry) | |
253 | ("python-relatorio" ,python-relatorio) | |
254 | ("python-werkzeug" ,python-werkzeug) | |
255 | ("python-wrapt" ,python-wrapt))) | |
256 | (propagated-inputs | |
257 | `(("python-sql" ,python-sql) | |
258 | ("python-trytond" ,python-trytond))) | |
259 | (home-page "https://www.tryton.org/") | |
260 | (synopsis "Tryton module with currencies") | |
261 | (description | |
262 | "This package provides a Tryton module that defines the concepts of | |
263 | currency and rate.") | |
264 | (license license:gpl3+))) | |
265 | ||
666489d6 VM |
266 | (define-public python-trytond-company |
267 | (package | |
268 | (name "python-trytond-company") | |
269 | (version "5.6.0") | |
270 | (source | |
271 | (origin | |
272 | (method url-fetch) | |
273 | (uri (pypi-uri "trytond_company" version)) | |
274 | (sha256 | |
275 | (base32 "0fa2yswfal1fbmm0ml845lm6bwcm65fln6s1xq1wqi17xqbbx44x")))) | |
276 | (build-system python-build-system) | |
277 | (arguments | |
278 | `(#:phases | |
279 | (modify-phases %standard-phases | |
280 | (replace 'check | |
281 | (let ((runtest | |
282 | (string-append | |
283 | (assoc-ref %build-inputs "python-trytond") | |
284 | "/lib/python" | |
285 | ,(version-major+minor (package-version python)) | |
286 | "/site-packages/trytond/tests/run-tests.py"))) | |
287 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
288 | (add-installed-pythonpath inputs outputs) | |
289 | (invoke "python" runtest "-m" "company"))))))) | |
290 | (native-inputs | |
291 | `(("python" ,python-minimal-wrapper) | |
292 | ("python-dateutil" ,python-dateutil) | |
293 | ("python-genshi" ,python-genshi) | |
294 | ("python-lxml" ,python-lxml) | |
295 | ("python-magic" ,python-magic) | |
296 | ("python-passlib" ,python-passlib) | |
297 | ("python-polib" ,python-polib) | |
298 | ("python-proteus" ,python-proteus) | |
299 | ("python-relatorio" ,python-relatorio) | |
300 | ("python-sql" ,python-sql) | |
301 | ("python-werkzeug" ,python-werkzeug) | |
302 | ("python-wrapt" ,python-wrapt))) | |
303 | (propagated-inputs | |
304 | `(("python-trytond" ,python-trytond) | |
305 | ("python-trytond-currency" | |
306 | ,python-trytond-currency) | |
307 | ("python-trytond-party" ,python-trytond-party))) | |
308 | (home-page "https://www.tryton.org/") | |
309 | (synopsis "Tryton module with companies and employees") | |
310 | (description | |
311 | "This package provides a Tryton module that defines the concepts of | |
312 | company and employee and extend the user model.") | |
313 | (license license:gpl3+))) | |
314 | ||
e6e031e9 VM |
315 | (define-public python-trytond-product |
316 | (package | |
317 | (name "python-trytond-product") | |
318 | (version "5.6.1") | |
319 | (source | |
320 | (origin | |
321 | (method url-fetch) | |
322 | (uri (pypi-uri "trytond_product" version)) | |
323 | (sha256 | |
324 | (base32 "0k1sw1jfgsm9qhyhv4lzama31db6ccjx5f2a7xw96ypflfl9f1xz")))) | |
325 | (build-system python-build-system) | |
326 | (arguments | |
327 | `(#:phases | |
328 | (modify-phases %standard-phases | |
329 | (replace 'check | |
330 | (let ((runtest | |
331 | (string-append | |
332 | (assoc-ref %build-inputs "python-trytond") | |
333 | "/lib/python" | |
334 | ,(version-major+minor (package-version python)) | |
335 | "/site-packages/trytond/tests/run-tests.py"))) | |
336 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
337 | (add-installed-pythonpath inputs outputs) | |
338 | (invoke "python" runtest "-m" "product"))))))) | |
339 | (native-inputs | |
340 | `(("python" ,python-minimal-wrapper) | |
341 | ("python-dateutil" ,python-dateutil) | |
342 | ("python-genshi" ,python-genshi) | |
343 | ("python-lxml" ,python-lxml) | |
344 | ("python-magic" ,python-magic) | |
345 | ("python-passlib" ,python-passlib) | |
346 | ("python-polib" ,python-polib) | |
347 | ("python-proteus" ,python-proteus) | |
348 | ("python-relatorio" ,python-relatorio) | |
349 | ("python-werkzeug" ,python-werkzeug) | |
350 | ("python-wrapt" ,python-wrapt))) | |
351 | (propagated-inputs | |
352 | `(("python-sql" ,python-sql) | |
353 | ("python-stdnum" ,python-stdnum) | |
354 | ("python-trytond" ,python-trytond) | |
355 | ("python-trytond-company" | |
356 | ,python-trytond-company))) | |
357 | (home-page "https://www.tryton.org/") | |
358 | (synopsis "Tryton module with products") | |
359 | (description | |
360 | "This package provides a Tryton module that defines two concepts: Product | |
361 | Template and Product.") | |
362 | (license license:gpl3+))) | |
363 | ||
84cca05c VM |
364 | (define-public python-trytond-account |
365 | (package | |
366 | (name "python-trytond-account") | |
367 | (version "5.6.1") | |
368 | (source | |
369 | (origin | |
370 | (method url-fetch) | |
371 | (uri (pypi-uri "trytond_account" version)) | |
372 | (sha256 | |
373 | (base32 "17q0cxp3vkymbv62ir4c6kg9y8lx8xvz30p0asrbsnbgwl6sjm30")))) | |
374 | (build-system python-build-system) | |
375 | (arguments | |
376 | `(#:phases | |
377 | (modify-phases %standard-phases | |
378 | (replace 'check | |
379 | (let ((runtest | |
380 | (string-append | |
381 | (assoc-ref %build-inputs "python-trytond") | |
382 | "/lib/python" | |
383 | ,(version-major+minor (package-version python)) | |
384 | "/site-packages/trytond/tests/run-tests.py"))) | |
385 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
386 | (add-installed-pythonpath inputs outputs) | |
387 | (invoke "python" runtest "-m" "account"))))))) | |
388 | (native-inputs | |
389 | `(("python" ,python-minimal-wrapper) | |
390 | ("python-genshi" ,python-genshi) | |
391 | ("python-lxml" ,python-lxml) | |
392 | ("python-magic" ,python-magic) | |
393 | ("python-passlib" ,python-passlib) | |
394 | ("python-polib" ,python-polib) | |
395 | ("python-proteus" ,python-proteus) | |
396 | ("python-relatorio" ,python-relatorio) | |
397 | ("python-werkzeug" ,python-werkzeug) | |
398 | ("python-wrapt" ,python-wrapt))) | |
399 | (propagated-inputs | |
400 | `(("python-dateutil" ,python-dateutil) | |
401 | ("python-simpleeval" ,python-simpleeval) | |
402 | ("python-sql" ,python-sql) | |
403 | ("python-trytond" ,python-trytond) | |
404 | ("python-trytond-company" | |
405 | ,python-trytond-company) | |
406 | ("python-trytond-currency" | |
407 | ,python-trytond-currency) | |
408 | ("python-trytond-party" ,python-trytond-party))) | |
409 | (home-page "https://www.tryton.org/") | |
410 | (synopsis "Tryton module for accounting") | |
411 | (description | |
412 | "This package provides a Tryton module that defines the fundamentals for | |
413 | most of accounting needs.") | |
414 | (license license:gpl3+))) | |
415 | ||
6844d364 VM |
416 | (define-public python-trytond-stock |
417 | (package | |
418 | (name "python-trytond-stock") | |
419 | (version "5.6.1") | |
420 | (source | |
421 | (origin | |
422 | (method url-fetch) | |
423 | (uri (pypi-uri "trytond_stock" version)) | |
424 | (sha256 | |
425 | (base32 "13m57absscks2advpjz0mmmp6c0c4ksf9aln1brqyd0js38arw76")))) | |
426 | (build-system python-build-system) | |
427 | (arguments | |
428 | `(#:phases | |
429 | (modify-phases %standard-phases | |
430 | (replace 'check | |
431 | (let ((runtest | |
432 | (string-append | |
433 | (assoc-ref %build-inputs "python-trytond") | |
434 | "/lib/python" | |
435 | ,(version-major+minor (package-version python)) | |
436 | "/site-packages/trytond/tests/run-tests.py"))) | |
437 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
438 | (add-installed-pythonpath inputs outputs) | |
439 | (invoke "python" runtest "-m" "stock"))))))) | |
440 | (native-inputs | |
441 | `(("python" ,python-minimal-wrapper) | |
442 | ("python-genshi" ,python-genshi) | |
443 | ("python-lxml" ,python-lxml) | |
444 | ("python-magic" ,python-magic) | |
445 | ("python-passlib" ,python-passlib) | |
446 | ("python-polib" ,python-polib) | |
447 | ("python-proteus" ,python-proteus) | |
448 | ("python-relatorio" ,python-relatorio) | |
449 | ("python-werkzeug" ,python-werkzeug) | |
450 | ("python-wrapt" ,python-wrapt))) | |
451 | (propagated-inputs | |
452 | `(("python-simpleeval" ,python-simpleeval) | |
453 | ("python-sql" ,python-sql) | |
454 | ("python-trytond" ,python-trytond) | |
455 | ("python-trytond-company" | |
456 | ,python-trytond-company) | |
457 | ("python-trytond-currency" | |
458 | ,python-trytond-currency) | |
459 | ("python-trytond-party" ,python-trytond-party) | |
460 | ("python-trytond-product" | |
461 | ,python-trytond-product))) | |
462 | (home-page "https://www.tryton.org/") | |
463 | (synopsis "Tryton module for stock and inventory") | |
464 | (description | |
465 | "This package provides a Tryton module that defines the fundamentals for | |
466 | all stock management situations: Locations where products are stored, moves | |
467 | between these locations, shipments for product arrivals and departures and | |
468 | inventory to control and update stock levels.") | |
469 | (license license:gpl3+))) | |
470 | ||
bf3563d5 AP |
471 | (define-public python-proteus |
472 | (package | |
473 | (name "python-proteus") | |
a5bdb72d | 474 | (version "5.6.0") |
bf3563d5 AP |
475 | (source |
476 | (origin | |
477 | (method url-fetch) | |
478 | (uri (pypi-uri "proteus" version)) | |
479 | (sha256 | |
a5bdb72d | 480 | (base32 "0kxac5pkps243wf0xbmbd1g5bml96xl94j88y6yyzm093vyli150")))) |
bf3563d5 | 481 | (build-system python-build-system) |
a5bdb72d VM |
482 | ;; Tests require python-trytond-party which requires python-proteus. |
483 | (arguments | |
484 | `(#:tests? #f)) | |
bf3563d5 | 485 | (propagated-inputs |
a5bdb72d | 486 | `(("python-dateutil" ,python-dateutil))) |
bf3563d5 | 487 | (home-page "http://www.tryton.org/") |
a5bdb72d | 488 | (synopsis "Library to access a Tryton server as a client") |
bf3563d5 AP |
489 | (description |
490 | "This package provides a library to access Tryton server as a client.") | |
491 | (license license:lgpl3+))) |